Skip to content

Commit addb46e

Browse files
authored
[SQL] Add ServerConfigurationOption cmdlets (#21535)
* Generate SDK * Add cmdlets * add tests * add help files * Update src/Sql/Sql/help/Az.Sql.md * Update src/Sql/Sql/help/Az.Sql.md * add online version to help files * fix help examples * fix static analysis err in examples
1 parent 30cc356 commit addb46e

27 files changed

+11366
-7
lines changed
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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.Management.Sql
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+
/// ServerConfigurationOptionsOperations operations.
23+
/// </summary>
24+
public partial interface IServerConfigurationOptionsOperations
25+
{
26+
/// <summary>
27+
/// Gets a list of managed instance server configuration options.
28+
/// </summary>
29+
/// <param name='resourceGroupName'>
30+
/// The name of the resource group that contains the resource. You can
31+
/// obtain this value from the Azure Resource Manager API or the
32+
/// portal.
33+
/// </param>
34+
/// <param name='managedInstanceName'>
35+
/// The name of the managed instance.
36+
/// </param>
37+
/// <param name='customHeaders'>
38+
/// The headers that will be added to request.
39+
/// </param>
40+
/// <param name='cancellationToken'>
41+
/// The cancellation token.
42+
/// </param>
43+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
44+
/// Thrown when the operation returned an invalid status code
45+
/// </exception>
46+
/// <exception cref="Microsoft.Rest.SerializationException">
47+
/// Thrown when unable to deserialize the response
48+
/// </exception>
49+
/// <exception cref="Microsoft.Rest.ValidationException">
50+
/// Thrown when a required parameter is null
51+
/// </exception>
52+
Task<AzureOperationResponse<IPage<ServerConfigurationOption>>> ListByManagedInstanceWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
53+
/// <summary>
54+
/// Gets managed instance server configuration option.
55+
/// </summary>
56+
/// <param name='resourceGroupName'>
57+
/// The name of the resource group that contains the resource. You can
58+
/// obtain this value from the Azure Resource Manager API or the
59+
/// portal.
60+
/// </param>
61+
/// <param name='managedInstanceName'>
62+
/// The name of the managed instance.
63+
/// </param>
64+
/// <param name='customHeaders'>
65+
/// The headers that will be added to request.
66+
/// </param>
67+
/// <param name='cancellationToken'>
68+
/// The cancellation token.
69+
/// </param>
70+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
71+
/// Thrown when the operation returned an invalid status code
72+
/// </exception>
73+
/// <exception cref="Microsoft.Rest.SerializationException">
74+
/// Thrown when unable to deserialize the response
75+
/// </exception>
76+
/// <exception cref="Microsoft.Rest.ValidationException">
77+
/// Thrown when a required parameter is null
78+
/// </exception>
79+
Task<AzureOperationResponse<ServerConfigurationOption>> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
80+
/// <summary>
81+
/// Updates managed instance server configuration option.
82+
/// </summary>
83+
/// <param name='resourceGroupName'>
84+
/// The name of the resource group that contains the resource. You can
85+
/// obtain this value from the Azure Resource Manager API or the
86+
/// portal.
87+
/// </param>
88+
/// <param name='managedInstanceName'>
89+
/// The name of the managed instance.
90+
/// </param>
91+
/// <param name='parameters'>
92+
/// Server configuration option parameters.
93+
/// </param>
94+
/// <param name='customHeaders'>
95+
/// The headers that will be added to request.
96+
/// </param>
97+
/// <param name='cancellationToken'>
98+
/// The cancellation token.
99+
/// </param>
100+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
101+
/// Thrown when the operation returned an invalid status code
102+
/// </exception>
103+
/// <exception cref="Microsoft.Rest.SerializationException">
104+
/// Thrown when unable to deserialize the response
105+
/// </exception>
106+
/// <exception cref="Microsoft.Rest.ValidationException">
107+
/// Thrown when a required parameter is null
108+
/// </exception>
109+
Task<AzureOperationResponse<ServerConfigurationOption>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, ServerConfigurationOption parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
110+
/// <summary>
111+
/// Updates managed instance server configuration option.
112+
/// </summary>
113+
/// <param name='resourceGroupName'>
114+
/// The name of the resource group that contains the resource. You can
115+
/// obtain this value from the Azure Resource Manager API or the
116+
/// portal.
117+
/// </param>
118+
/// <param name='managedInstanceName'>
119+
/// The name of the managed instance.
120+
/// </param>
121+
/// <param name='parameters'>
122+
/// Server configuration option parameters.
123+
/// </param>
124+
/// <param name='customHeaders'>
125+
/// The headers that will be added to request.
126+
/// </param>
127+
/// <param name='cancellationToken'>
128+
/// The cancellation token.
129+
/// </param>
130+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
131+
/// Thrown when the operation returned an invalid status code
132+
/// </exception>
133+
/// <exception cref="Microsoft.Rest.SerializationException">
134+
/// Thrown when unable to deserialize the response
135+
/// </exception>
136+
/// <exception cref="Microsoft.Rest.ValidationException">
137+
/// Thrown when a required parameter is null
138+
/// </exception>
139+
Task<AzureOperationResponse<ServerConfigurationOption>> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, ServerConfigurationOption parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
140+
/// <summary>
141+
/// Gets a list of managed instance server configuration options.
142+
/// </summary>
143+
/// <param name='nextPageLink'>
144+
/// The NextLink from the previous successful call to List operation.
145+
/// </param>
146+
/// <param name='customHeaders'>
147+
/// The headers that will be added to request.
148+
/// </param>
149+
/// <param name='cancellationToken'>
150+
/// The cancellation token.
151+
/// </param>
152+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
153+
/// Thrown when the operation returned an invalid status code
154+
/// </exception>
155+
/// <exception cref="Microsoft.Rest.SerializationException">
156+
/// Thrown when unable to deserialize the response
157+
/// </exception>
158+
/// <exception cref="Microsoft.Rest.ValidationException">
159+
/// Thrown when a required parameter is null
160+
/// </exception>
161+
Task<AzureOperationResponse<IPage<ServerConfigurationOption>>> ListByManagedInstanceNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
162+
}
163+
}

src/Sql/Sql.Sdk/Generated/ISqlManagementClient.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,5 +503,10 @@ public partial interface ISqlManagementClient : System.IDisposable
503503
/// </summary>
504504
IServersOperations Servers { get; }
505505

506+
/// <summary>
507+
/// Gets the IServerConfigurationOptionsOperations.
508+
/// </summary>
509+
IServerConfigurationOptionsOperations ServerConfigurationOptions { get; }
510+
506511
}
507512
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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.Management.Sql.Models
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Serialization;
15+
using Newtonsoft.Json;
16+
using System.Linq;
17+
18+
/// <summary>
19+
/// A server configuration option
20+
/// </summary>
21+
[Rest.Serialization.JsonTransformation]
22+
public partial class ServerConfigurationOption : ProxyResource
23+
{
24+
/// <summary>
25+
/// Initializes a new instance of the ServerConfigurationOption class.
26+
/// </summary>
27+
public ServerConfigurationOption()
28+
{
29+
CustomInit();
30+
}
31+
32+
/// <summary>
33+
/// Initializes a new instance of the ServerConfigurationOption class.
34+
/// </summary>
35+
/// <param name="serverConfigurationOptionValue">Value of the server
36+
/// configuration option.</param>
37+
/// <param name="id">Resource ID.</param>
38+
/// <param name="name">Resource name.</param>
39+
/// <param name="type">Resource type.</param>
40+
/// <param name="provisioningState">Provisioning state of server
41+
/// configuration option. Possible values include: 'Created',
42+
/// 'InProgress', 'Succeeded', 'Failed', 'Canceled'</param>
43+
public ServerConfigurationOption(int serverConfigurationOptionValue, string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string))
44+
: base(id, name, type)
45+
{
46+
ServerConfigurationOptionValue = serverConfigurationOptionValue;
47+
ProvisioningState = provisioningState;
48+
CustomInit();
49+
}
50+
51+
/// <summary>
52+
/// An initialization method that performs custom operations like setting defaults
53+
/// </summary>
54+
partial void CustomInit();
55+
56+
/// <summary>
57+
/// Gets or sets value of the server configuration option.
58+
/// </summary>
59+
[JsonProperty(PropertyName = "properties.serverConfigurationOptionValue")]
60+
public int ServerConfigurationOptionValue { get; set; }
61+
62+
/// <summary>
63+
/// Gets provisioning state of server configuration option. Possible
64+
/// values include: 'Created', 'InProgress', 'Succeeded', 'Failed',
65+
/// 'Canceled'
66+
/// </summary>
67+
[JsonProperty(PropertyName = "properties.provisioningState")]
68+
public string ProvisioningState { get; private set; }
69+
70+
/// <summary>
71+
/// Validate the object.
72+
/// </summary>
73+
/// <exception cref="ValidationException">
74+
/// Thrown if validation fails
75+
/// </exception>
76+
public virtual void Validate()
77+
{
78+
}
79+
}
80+
}

src/Sql/Sql.Sdk/Generated/SdkInfo_SqlManagementClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SqlManagementCl
9494
new Tuple<string, string, string>("Sql", "ServerAzureADAdministrators", "2020-11-01-preview"),
9595
new Tuple<string, string, string>("Sql", "ServerAzureADOnlyAuthentications", "2020-11-01-preview"),
9696
new Tuple<string, string, string>("Sql", "ServerBlobAuditingPolicies", "2021-11-01-preview"),
97+
new Tuple<string, string, string>("Sql", "ServerConfigurationOptions", "2022-08-01-preview"),
9798
new Tuple<string, string, string>("Sql", "ServerDevOpsAuditSettings", "2020-11-01-preview"),
9899
new Tuple<string, string, string>("Sql", "ServerDnsAliases", "2020-11-01-preview"),
99100
new Tuple<string, string, string>("Sql", "ServerKeys", "2020-11-01-preview"),

0 commit comments

Comments
 (0)