Skip to content

Commit 63c3b4d

Browse files
authored
[Websites] Cmdlets for ASE v2 (and v3 in preview) (#14214)
* ASE first draft * Merge * Add Private DNS and restructure services. * Implement new external Service provider reference and add docs/help * NSG and Route Table logic * Improvements based on design review * Add Scenario tests * Merge psd1 * Add online version reference * Add references to Network/KeyVault for testing * Added KeyVault and Network for Scenario Tests * Update change log * Explicit specifying new cmdlets * small fix
1 parent 731de15 commit 63c3b4d

File tree

190 files changed

+82228
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+82228
-126
lines changed

src/Websites/Websites.Helper/Network/DefaultSecurityRulesOperations.cs

Lines changed: 628 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.PowerShell.Cmdlets.Websites.Helper.Network
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Azure;
15+
using Models;
16+
using System.Threading;
17+
using System.Threading.Tasks;
18+
19+
/// <summary>
20+
/// Extension methods for DefaultSecurityRulesOperations.
21+
/// </summary>
22+
public static partial class DefaultSecurityRulesOperationsExtensions
23+
{
24+
/// <summary>
25+
/// Gets all default security rules in a network security group.
26+
/// </summary>
27+
/// <param name='operations'>
28+
/// The operations group for this extension method.
29+
/// </param>
30+
/// <param name='resourceGroupName'>
31+
/// The name of the resource group.
32+
/// </param>
33+
/// <param name='networkSecurityGroupName'>
34+
/// The name of the network security group.
35+
/// </param>
36+
public static IPage<SecurityRule> List(this IDefaultSecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName)
37+
{
38+
return operations.ListAsync(resourceGroupName, networkSecurityGroupName).GetAwaiter().GetResult();
39+
}
40+
41+
/// <summary>
42+
/// Gets all default security rules in a network security group.
43+
/// </summary>
44+
/// <param name='operations'>
45+
/// The operations group for this extension method.
46+
/// </param>
47+
/// <param name='resourceGroupName'>
48+
/// The name of the resource group.
49+
/// </param>
50+
/// <param name='networkSecurityGroupName'>
51+
/// The name of the network security group.
52+
/// </param>
53+
/// <param name='cancellationToken'>
54+
/// The cancellation token.
55+
/// </param>
56+
public static async Task<IPage<SecurityRule>> ListAsync(this IDefaultSecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName, CancellationToken cancellationToken = default(CancellationToken))
57+
{
58+
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, networkSecurityGroupName, null, cancellationToken).ConfigureAwait(false))
59+
{
60+
return _result.Body;
61+
}
62+
}
63+
64+
/// <summary>
65+
/// Get the specified default network security rule.
66+
/// </summary>
67+
/// <param name='operations'>
68+
/// The operations group for this extension method.
69+
/// </param>
70+
/// <param name='resourceGroupName'>
71+
/// The name of the resource group.
72+
/// </param>
73+
/// <param name='networkSecurityGroupName'>
74+
/// The name of the network security group.
75+
/// </param>
76+
/// <param name='defaultSecurityRuleName'>
77+
/// The name of the default security rule.
78+
/// </param>
79+
public static SecurityRule Get(this IDefaultSecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName, string defaultSecurityRuleName)
80+
{
81+
return operations.GetAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName).GetAwaiter().GetResult();
82+
}
83+
84+
/// <summary>
85+
/// Get the specified default network security rule.
86+
/// </summary>
87+
/// <param name='operations'>
88+
/// The operations group for this extension method.
89+
/// </param>
90+
/// <param name='resourceGroupName'>
91+
/// The name of the resource group.
92+
/// </param>
93+
/// <param name='networkSecurityGroupName'>
94+
/// The name of the network security group.
95+
/// </param>
96+
/// <param name='defaultSecurityRuleName'>
97+
/// The name of the default security rule.
98+
/// </param>
99+
/// <param name='cancellationToken'>
100+
/// The cancellation token.
101+
/// </param>
102+
public static async Task<SecurityRule> GetAsync(this IDefaultSecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName, string defaultSecurityRuleName, CancellationToken cancellationToken = default(CancellationToken))
103+
{
104+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, null, cancellationToken).ConfigureAwait(false))
105+
{
106+
return _result.Body;
107+
}
108+
}
109+
110+
/// <summary>
111+
/// Gets all default security rules in a network security group.
112+
/// </summary>
113+
/// <param name='operations'>
114+
/// The operations group for this extension method.
115+
/// </param>
116+
/// <param name='nextPageLink'>
117+
/// The NextLink from the previous successful call to List operation.
118+
/// </param>
119+
public static IPage<SecurityRule> ListNext(this IDefaultSecurityRulesOperations operations, string nextPageLink)
120+
{
121+
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
122+
}
123+
124+
/// <summary>
125+
/// Gets all default security rules in a network security group.
126+
/// </summary>
127+
/// <param name='operations'>
128+
/// The operations group for this extension method.
129+
/// </param>
130+
/// <param name='nextPageLink'>
131+
/// The NextLink from the previous successful call to List operation.
132+
/// </param>
133+
/// <param name='cancellationToken'>
134+
/// The cancellation token.
135+
/// </param>
136+
public static async Task<IPage<SecurityRule>> ListNextAsync(this IDefaultSecurityRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
137+
{
138+
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
139+
{
140+
return _result.Body;
141+
}
142+
}
143+
144+
}
145+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.PowerShell.Cmdlets.Websites.Helper.Network
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Azure;
15+
using Models;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Threading;
19+
using System.Threading.Tasks;
20+
21+
/// <summary>
22+
/// DefaultSecurityRulesOperations operations.
23+
/// </summary>
24+
public partial interface IDefaultSecurityRulesOperations
25+
{
26+
/// <summary>
27+
/// Gets all default security rules in a network security group.
28+
/// </summary>
29+
/// <param name='resourceGroupName'>
30+
/// The name of the resource group.
31+
/// </param>
32+
/// <param name='networkSecurityGroupName'>
33+
/// The name of the network security group.
34+
/// </param>
35+
/// <param name='customHeaders'>
36+
/// The headers that will be added to request.
37+
/// </param>
38+
/// <param name='cancellationToken'>
39+
/// The cancellation token.
40+
/// </param>
41+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
42+
/// Thrown when the operation returned an invalid status code
43+
/// </exception>
44+
/// <exception cref="Microsoft.Rest.SerializationException">
45+
/// Thrown when unable to deserialize the response
46+
/// </exception>
47+
/// <exception cref="Microsoft.Rest.ValidationException">
48+
/// Thrown when a required parameter is null
49+
/// </exception>
50+
Task<AzureOperationResponse<IPage<SecurityRule>>> ListWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
51+
/// <summary>
52+
/// Get the specified default network security rule.
53+
/// </summary>
54+
/// <param name='resourceGroupName'>
55+
/// The name of the resource group.
56+
/// </param>
57+
/// <param name='networkSecurityGroupName'>
58+
/// The name of the network security group.
59+
/// </param>
60+
/// <param name='defaultSecurityRuleName'>
61+
/// The name of the default security rule.
62+
/// </param>
63+
/// <param name='customHeaders'>
64+
/// The headers that will be added to request.
65+
/// </param>
66+
/// <param name='cancellationToken'>
67+
/// The cancellation token.
68+
/// </param>
69+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
70+
/// Thrown when the operation returned an invalid status code
71+
/// </exception>
72+
/// <exception cref="Microsoft.Rest.SerializationException">
73+
/// Thrown when unable to deserialize the response
74+
/// </exception>
75+
/// <exception cref="Microsoft.Rest.ValidationException">
76+
/// Thrown when a required parameter is null
77+
/// </exception>
78+
Task<AzureOperationResponse<SecurityRule>> GetWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string defaultSecurityRuleName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
79+
/// <summary>
80+
/// Gets all default security rules in a network security group.
81+
/// </summary>
82+
/// <param name='nextPageLink'>
83+
/// The NextLink from the previous successful call to List operation.
84+
/// </param>
85+
/// <param name='customHeaders'>
86+
/// The headers that will be added to request.
87+
/// </param>
88+
/// <param name='cancellationToken'>
89+
/// The cancellation token.
90+
/// </param>
91+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
92+
/// Thrown when the operation returned an invalid status code
93+
/// </exception>
94+
/// <exception cref="Microsoft.Rest.SerializationException">
95+
/// Thrown when unable to deserialize the response
96+
/// </exception>
97+
/// <exception cref="Microsoft.Rest.ValidationException">
98+
/// Thrown when a required parameter is null
99+
/// </exception>
100+
Task<AzureOperationResponse<IPage<SecurityRule>>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
101+
}
102+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.PowerShell.Cmdlets.Websites.Helper.Network
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Azure;
15+
using Models;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Threading;
19+
using System.Threading.Tasks;
20+
21+
/// <summary>
22+
/// NetworkInterfacesOperations operations.
23+
/// </summary>
24+
public partial interface INetworkInterfacesOperations
25+
{
26+
/// <summary>
27+
/// Gets information about the specified network interface.
28+
/// </summary>
29+
/// <param name='resourceGroupName'>
30+
/// The name of the resource group.
31+
/// </param>
32+
/// <param name='networkInterfaceName'>
33+
/// The name of the network interface.
34+
/// </param>
35+
/// <param name='expand'>
36+
/// Expands referenced resources.
37+
/// </param>
38+
/// <param name='customHeaders'>
39+
/// The headers that will be added to request.
40+
/// </param>
41+
/// <param name='cancellationToken'>
42+
/// The cancellation token.
43+
/// </param>
44+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
45+
/// Thrown when the operation returned an invalid status code
46+
/// </exception>
47+
/// <exception cref="Microsoft.Rest.SerializationException">
48+
/// Thrown when unable to deserialize the response
49+
/// </exception>
50+
/// <exception cref="Microsoft.Rest.ValidationException">
51+
/// Thrown when a required parameter is null
52+
/// </exception>
53+
Task<AzureOperationResponse<NetworkInterface>> GetWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
54+
}
55+
}

0 commit comments

Comments
 (0)