Skip to content

Commit 1dd5ada

Browse files
mattgotteinerMatt GotteinerVeryEarly
authored
[Az.Search] RBAC support (#21322)
* generate SDK, fix existing cmdlets, update cmdlets to support auth options * fixing tests * update help * update * Update src/Search/Search/Az.Search.psd1 Co-authored-by: Yabo Hu <[email protected]> * feedback * feedback * fixing tests * fixing tests * addressing feedback --------- Co-authored-by: Matt Gotteiner <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent 5b22be6 commit 1dd5ada

File tree

131 files changed

+28556
-38455
lines changed

Some content is hidden

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

131 files changed

+28556
-38455
lines changed

src/Search/Search.Management.Sdk/Generated/AdminKeysOperations.cs

Lines changed: 494 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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.Search
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 AdminKeysOperations.
21+
/// </summary>
22+
public static partial class AdminKeysOperationsExtensions
23+
{
24+
/// <summary>
25+
/// Gets the primary and secondary admin API keys for the specified Azure
26+
/// Cognitive Search service.
27+
/// <see href="https://aka.ms/search-manage" />
28+
/// </summary>
29+
/// <param name='operations'>
30+
/// The operations group for this extension method.
31+
/// </param>
32+
/// <param name='resourceGroupName'>
33+
/// The name of the resource group within the current subscription. You can
34+
/// obtain this value from the Azure Resource Manager API or the portal.
35+
/// </param>
36+
/// <param name='searchServiceName'>
37+
/// The name of the Azure Cognitive Search service associated with the
38+
/// specified resource group.
39+
/// </param>
40+
/// <param name='searchManagementRequestOptions'>
41+
/// Additional parameters for the operation
42+
/// </param>
43+
public static AdminKeyResult Get(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
44+
{
45+
return operations.GetAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult();
46+
}
47+
48+
/// <summary>
49+
/// Gets the primary and secondary admin API keys for the specified Azure
50+
/// Cognitive Search service.
51+
/// <see href="https://aka.ms/search-manage" />
52+
/// </summary>
53+
/// <param name='operations'>
54+
/// The operations group for this extension method.
55+
/// </param>
56+
/// <param name='resourceGroupName'>
57+
/// The name of the resource group within the current subscription. You can
58+
/// obtain this value from the Azure Resource Manager API or the portal.
59+
/// </param>
60+
/// <param name='searchServiceName'>
61+
/// The name of the Azure Cognitive Search service associated with the
62+
/// specified resource group.
63+
/// </param>
64+
/// <param name='searchManagementRequestOptions'>
65+
/// Additional parameters for the operation
66+
/// </param>
67+
/// <param name='cancellationToken'>
68+
/// The cancellation token.
69+
/// </param>
70+
public static async Task<AdminKeyResult> GetAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
71+
{
72+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
73+
{
74+
return _result.Body;
75+
}
76+
}
77+
78+
/// <summary>
79+
/// Regenerates either the primary or secondary admin API key. You can only
80+
/// regenerate one key at a time.
81+
/// <see href="https://aka.ms/search-manage" />
82+
/// </summary>
83+
/// <param name='operations'>
84+
/// The operations group for this extension method.
85+
/// </param>
86+
/// <param name='resourceGroupName'>
87+
/// The name of the resource group within the current subscription. You can
88+
/// obtain this value from the Azure Resource Manager API or the portal.
89+
/// </param>
90+
/// <param name='searchServiceName'>
91+
/// The name of the Azure Cognitive Search service associated with the
92+
/// specified resource group.
93+
/// </param>
94+
/// <param name='keyKind'>
95+
/// Specifies which key to regenerate. Valid values include 'primary' and
96+
/// 'secondary'. Possible values include: 'Primary', 'Secondary'
97+
/// </param>
98+
/// <param name='searchManagementRequestOptions'>
99+
/// Additional parameters for the operation
100+
/// </param>
101+
public static AdminKeyResult Regenerate(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
102+
{
103+
return operations.RegenerateAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).GetAwaiter().GetResult();
104+
}
105+
106+
/// <summary>
107+
/// Regenerates either the primary or secondary admin API key. You can only
108+
/// regenerate one key at a time.
109+
/// <see href="https://aka.ms/search-manage" />
110+
/// </summary>
111+
/// <param name='operations'>
112+
/// The operations group for this extension method.
113+
/// </param>
114+
/// <param name='resourceGroupName'>
115+
/// The name of the resource group within the current subscription. You can
116+
/// obtain this value from the Azure Resource Manager API or the portal.
117+
/// </param>
118+
/// <param name='searchServiceName'>
119+
/// The name of the Azure Cognitive Search service associated with the
120+
/// specified resource group.
121+
/// </param>
122+
/// <param name='keyKind'>
123+
/// Specifies which key to regenerate. Valid values include 'primary' and
124+
/// 'secondary'. Possible values include: 'Primary', 'Secondary'
125+
/// </param>
126+
/// <param name='searchManagementRequestOptions'>
127+
/// Additional parameters for the operation
128+
/// </param>
129+
/// <param name='cancellationToken'>
130+
/// The cancellation token.
131+
/// </param>
132+
public static async Task<AdminKeyResult> RegenerateAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
133+
{
134+
using (var _result = await operations.RegenerateWithHttpMessagesAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
135+
{
136+
return _result.Body;
137+
}
138+
}
139+
140+
}
141+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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.Search
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+
/// AdminKeysOperations operations.
23+
/// </summary>
24+
public partial interface IAdminKeysOperations
25+
{
26+
/// <summary>
27+
/// Gets the primary and secondary admin API keys for the specified
28+
/// Azure Cognitive Search service.
29+
/// <see href="https://aka.ms/search-manage" />
30+
/// </summary>
31+
/// <param name='resourceGroupName'>
32+
/// The name of the resource group within the current subscription. You
33+
/// can obtain this value from the Azure Resource Manager API or the
34+
/// portal.
35+
/// </param>
36+
/// <param name='searchServiceName'>
37+
/// The name of the Azure Cognitive Search service associated with the
38+
/// specified resource group.
39+
/// </param>
40+
/// <param name='searchManagementRequestOptions'>
41+
/// Additional parameters for the operation
42+
/// </param>
43+
/// <param name='customHeaders'>
44+
/// The headers that will be added to request.
45+
/// </param>
46+
/// <param name='cancellationToken'>
47+
/// The cancellation token.
48+
/// </param>
49+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
50+
/// Thrown when the operation returned an invalid status code
51+
/// </exception>
52+
/// <exception cref="Microsoft.Rest.SerializationException">
53+
/// Thrown when unable to deserialize the response
54+
/// </exception>
55+
/// <exception cref="Microsoft.Rest.ValidationException">
56+
/// Thrown when a required parameter is null
57+
/// </exception>
58+
Task<AzureOperationResponse<AdminKeyResult>> GetWithHttpMessagesAsync(string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
59+
/// <summary>
60+
/// Regenerates either the primary or secondary admin API key. You can
61+
/// only regenerate one key at a time.
62+
/// <see href="https://aka.ms/search-manage" />
63+
/// </summary>
64+
/// <param name='resourceGroupName'>
65+
/// The name of the resource group within the current subscription. You
66+
/// can obtain this value from the Azure Resource Manager API or the
67+
/// portal.
68+
/// </param>
69+
/// <param name='searchServiceName'>
70+
/// The name of the Azure Cognitive Search service associated with the
71+
/// specified resource group.
72+
/// </param>
73+
/// <param name='keyKind'>
74+
/// Specifies which key to regenerate. Valid values include 'primary'
75+
/// and 'secondary'. Possible values include: 'Primary', 'Secondary'
76+
/// </param>
77+
/// <param name='searchManagementRequestOptions'>
78+
/// Additional parameters for the operation
79+
/// </param>
80+
/// <param name='customHeaders'>
81+
/// The headers that will be added to request.
82+
/// </param>
83+
/// <param name='cancellationToken'>
84+
/// The cancellation token.
85+
/// </param>
86+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
87+
/// Thrown when the operation returned an invalid status code
88+
/// </exception>
89+
/// <exception cref="Microsoft.Rest.SerializationException">
90+
/// Thrown when unable to deserialize the response
91+
/// </exception>
92+
/// <exception cref="Microsoft.Rest.ValidationException">
93+
/// Thrown when a required parameter is null
94+
/// </exception>
95+
Task<AzureOperationResponse<AdminKeyResult>> RegenerateWithHttpMessagesAsync(string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
96+
}
97+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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.Search
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+
/// Operations operations.
23+
/// </summary>
24+
public partial interface IOperations
25+
{
26+
/// <summary>
27+
/// Lists all of the available REST API operations of the
28+
/// Microsoft.Search provider.
29+
/// </summary>
30+
/// <param name='customHeaders'>
31+
/// The headers that will be added to request.
32+
/// </param>
33+
/// <param name='cancellationToken'>
34+
/// The cancellation token.
35+
/// </param>
36+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
37+
/// Thrown when the operation returned an invalid status code
38+
/// </exception>
39+
/// <exception cref="Microsoft.Rest.SerializationException">
40+
/// Thrown when unable to deserialize the response
41+
/// </exception>
42+
/// <exception cref="Microsoft.Rest.ValidationException">
43+
/// Thrown when a required parameter is null
44+
/// </exception>
45+
Task<AzureOperationResponse<IEnumerable<Operation>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
46+
}
47+
}

0 commit comments

Comments
 (0)