Skip to content

Commit 76f645c

Browse files
ashwinisingh01dingmeng-xuepjohari-msvidai-msftwyunchi-ms
authored
CosmosDB Mongo API RBAC Release (#19595)
* Add SDK source code * Update AssemblyInfo.cs * generated code * build fix * mongo rbac changes * update test records * Update New-AzCosmosDBMongoDBPrivilege.md * Update New-AzCosmosDBMongoDBPrivilege.md * Update New-AzCosmosDBMongoDBPrivilege.md * Update New-AzCosmosDBMongoDBPrivilegeResource.md * Update New-AzCosmosDBMongoDBRole.md * update help * update recordings * update recordings * update static analysis * Cosmos DB Service related changes * Added help files * Resolved nit * Static Analysis another nit * Update Az.CosmosDB.psd1 * Added service tests recording * Update ExampleIssues.csv * Update ExampleIssues.csv * Update New-AzCosmosDBAccount.md * Delete ExampleIssues.csv * Update New-AzCosmosDBMongoDBRoleDefinition.md Added backtick for cmdlets in examples that were separated in multi-lines * Update New-AzCosmosDBMongoDBUserDefinition.md * Update Update-AzCosmosDBMongoDBRoleDefinition.md * Update Update-AzCosmosDBMongoDBUserDefinition.md * update examples Co-authored-by: dingmeng-xue <[email protected]> Co-authored-by: Praful Johari <[email protected]> Co-authored-by: Vincent Dai <[email protected]> Co-authored-by: Yunchi Wang <[email protected]> Co-authored-by: NanxiangLiu <[email protected]>
1 parent ba9e966 commit 76f645c

File tree

506 files changed

+210663
-23875
lines changed

Some content is hidden

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

506 files changed

+210663
-23875
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<PsModuleName>CosmosDB</PsModuleName>
5+
</PropertyGroup>
6+
7+
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
8+
9+
<PropertyGroup>
10+
<TargetFramework>netstandard2.0</TargetFramework>
11+
<AssemblyName>Microsoft.Azure.PowerShell.CosmosDB.Sdk</AssemblyName>
12+
<RootNamespace>Microsoft.Azure.Management.CosmosDB</RootNamespace>
13+
<NoWarn>$(NoWarn);CS0108;CS1573</NoWarn>
14+
</PropertyGroup>
15+
16+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
17+
18+
</Project>

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraClustersOperations.cs

Lines changed: 3020 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraClustersOperationsExtensions.cs

Lines changed: 789 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraDataCentersOperations.cs

Lines changed: 1456 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraDataCentersOperationsExtensions.cs

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraResourcesOperations.cs

Lines changed: 6545 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CassandraResourcesOperationsExtensions.cs

Lines changed: 2065 additions & 0 deletions
Large diffs are not rendered by default.

src/CosmosDB/CosmosDB.Sdk/Generated/CollectionOperations.cs

Lines changed: 842 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
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.CosmosDB
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+
/// Extension methods for CollectionOperations.
23+
/// </summary>
24+
public static partial class CollectionOperationsExtensions
25+
{
26+
/// <summary>
27+
/// Retrieves the metrics determined by the given filter for the given database
28+
/// account and collection.
29+
/// </summary>
30+
/// <param name='operations'>
31+
/// The operations group for this extension method.
32+
/// </param>
33+
/// <param name='resourceGroupName'>
34+
/// The name of the resource group. The name is case insensitive.
35+
/// </param>
36+
/// <param name='accountName'>
37+
/// Cosmos DB database account name.
38+
/// </param>
39+
/// <param name='databaseRid'>
40+
/// Cosmos DB database rid.
41+
/// </param>
42+
/// <param name='collectionRid'>
43+
/// Cosmos DB collection rid.
44+
/// </param>
45+
/// <param name='filter'>
46+
/// An OData filter expression that describes a subset of metrics to return.
47+
/// The parameters that can be filtered are name.value (name of the metric, can
48+
/// have an or of multiple names), startTime, endTime, and timeGrain. The
49+
/// supported operator is eq.
50+
/// </param>
51+
public static IEnumerable<Metric> ListMetrics(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter)
52+
{
53+
return operations.ListMetricsAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).GetAwaiter().GetResult();
54+
}
55+
56+
/// <summary>
57+
/// Retrieves the metrics determined by the given filter for the given database
58+
/// account and collection.
59+
/// </summary>
60+
/// <param name='operations'>
61+
/// The operations group for this extension method.
62+
/// </param>
63+
/// <param name='resourceGroupName'>
64+
/// The name of the resource group. The name is case insensitive.
65+
/// </param>
66+
/// <param name='accountName'>
67+
/// Cosmos DB database account name.
68+
/// </param>
69+
/// <param name='databaseRid'>
70+
/// Cosmos DB database rid.
71+
/// </param>
72+
/// <param name='collectionRid'>
73+
/// Cosmos DB collection rid.
74+
/// </param>
75+
/// <param name='filter'>
76+
/// An OData filter expression that describes a subset of metrics to return.
77+
/// The parameters that can be filtered are name.value (name of the metric, can
78+
/// have an or of multiple names), startTime, endTime, and timeGrain. The
79+
/// supported operator is eq.
80+
/// </param>
81+
/// <param name='cancellationToken'>
82+
/// The cancellation token.
83+
/// </param>
84+
public static async Task<IEnumerable<Metric>> ListMetricsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter, CancellationToken cancellationToken = default(CancellationToken))
85+
{
86+
using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter, null, cancellationToken).ConfigureAwait(false))
87+
{
88+
return _result.Body;
89+
}
90+
}
91+
92+
/// <summary>
93+
/// Retrieves the usages (most recent storage data) for the given collection.
94+
/// </summary>
95+
/// <param name='operations'>
96+
/// The operations group for this extension method.
97+
/// </param>
98+
/// <param name='resourceGroupName'>
99+
/// The name of the resource group. The name is case insensitive.
100+
/// </param>
101+
/// <param name='accountName'>
102+
/// Cosmos DB database account name.
103+
/// </param>
104+
/// <param name='databaseRid'>
105+
/// Cosmos DB database rid.
106+
/// </param>
107+
/// <param name='collectionRid'>
108+
/// Cosmos DB collection rid.
109+
/// </param>
110+
/// <param name='filter'>
111+
/// An OData filter expression that describes a subset of usages to return. The
112+
/// supported parameter is name.value (name of the metric, can have an or of
113+
/// multiple names).
114+
/// </param>
115+
public static IEnumerable<Usage> ListUsages(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter = default(string))
116+
{
117+
return operations.ListUsagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).GetAwaiter().GetResult();
118+
}
119+
120+
/// <summary>
121+
/// Retrieves the usages (most recent storage data) for the given collection.
122+
/// </summary>
123+
/// <param name='operations'>
124+
/// The operations group for this extension method.
125+
/// </param>
126+
/// <param name='resourceGroupName'>
127+
/// The name of the resource group. The name is case insensitive.
128+
/// </param>
129+
/// <param name='accountName'>
130+
/// Cosmos DB database account name.
131+
/// </param>
132+
/// <param name='databaseRid'>
133+
/// Cosmos DB database rid.
134+
/// </param>
135+
/// <param name='collectionRid'>
136+
/// Cosmos DB collection rid.
137+
/// </param>
138+
/// <param name='filter'>
139+
/// An OData filter expression that describes a subset of usages to return. The
140+
/// supported parameter is name.value (name of the metric, can have an or of
141+
/// multiple names).
142+
/// </param>
143+
/// <param name='cancellationToken'>
144+
/// The cancellation token.
145+
/// </param>
146+
public static async Task<IEnumerable<Usage>> ListUsagesAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
147+
{
148+
using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter, null, cancellationToken).ConfigureAwait(false))
149+
{
150+
return _result.Body;
151+
}
152+
}
153+
154+
/// <summary>
155+
/// Retrieves metric definitions for the given collection.
156+
/// </summary>
157+
/// <param name='operations'>
158+
/// The operations group for this extension method.
159+
/// </param>
160+
/// <param name='resourceGroupName'>
161+
/// The name of the resource group. The name is case insensitive.
162+
/// </param>
163+
/// <param name='accountName'>
164+
/// Cosmos DB database account name.
165+
/// </param>
166+
/// <param name='databaseRid'>
167+
/// Cosmos DB database rid.
168+
/// </param>
169+
/// <param name='collectionRid'>
170+
/// Cosmos DB collection rid.
171+
/// </param>
172+
public static IEnumerable<MetricDefinition> ListMetricDefinitions(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid)
173+
{
174+
return operations.ListMetricDefinitionsAsync(resourceGroupName, accountName, databaseRid, collectionRid).GetAwaiter().GetResult();
175+
}
176+
177+
/// <summary>
178+
/// Retrieves metric definitions for the given collection.
179+
/// </summary>
180+
/// <param name='operations'>
181+
/// The operations group for this extension method.
182+
/// </param>
183+
/// <param name='resourceGroupName'>
184+
/// The name of the resource group. The name is case insensitive.
185+
/// </param>
186+
/// <param name='accountName'>
187+
/// Cosmos DB database account name.
188+
/// </param>
189+
/// <param name='databaseRid'>
190+
/// Cosmos DB database rid.
191+
/// </param>
192+
/// <param name='collectionRid'>
193+
/// Cosmos DB collection rid.
194+
/// </param>
195+
/// <param name='cancellationToken'>
196+
/// The cancellation token.
197+
/// </param>
198+
public static async Task<IEnumerable<MetricDefinition>> ListMetricDefinitionsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, CancellationToken cancellationToken = default(CancellationToken))
199+
{
200+
using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, null, cancellationToken).ConfigureAwait(false))
201+
{
202+
return _result.Body;
203+
}
204+
}
205+
206+
}
207+
}

0 commit comments

Comments
 (0)