Skip to content

Commit 13dccb4

Browse files
authored
Arm cosmosdb release (Azure#15016)
* arm-cosmosdb-release * arm-cosmosdb-release
1 parent 4ea0547 commit 13dccb4

Some content is hidden

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

41 files changed

+13855
-3682
lines changed

sdk/cosmosdb/arm-cosmosdb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@azure/arm-cosmosdb",
33
"author": "Microsoft Corporation",
44
"description": "CosmosDBManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "12.1.0",
5+
"version": "13.0.0",
66
"dependencies": {
77
"@azure/ms-rest-azure-js": "^2.0.1",
88
"@azure/ms-rest-js": "^2.0.4",

sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts

Lines changed: 131 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
import * as msRest from "@azure/ms-rest-js";
1111
import * as Models from "./models";
1212
import * as Mappers from "./models/mappers";
13+
import * as Parameters from "./models/parameters";
1314
import * as operations from "./operations";
1415
import { CosmosDBManagementClientContext } from "./cosmosDBManagementClientContext";
1516

16-
1717
class CosmosDBManagementClient extends CosmosDBManagementClientContext {
1818
// Operation groups
1919
databaseAccounts: operations.DatabaseAccounts;
@@ -34,17 +34,31 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
3434
tableResources: operations.TableResources;
3535
cassandraResources: operations.CassandraResources;
3636
gremlinResources: operations.GremlinResources;
37+
restorableDatabaseAccounts: operations.RestorableDatabaseAccounts;
3738
notebookWorkspaces: operations.NotebookWorkspaces;
39+
restorableSqlDatabases: operations.RestorableSqlDatabases;
40+
restorableSqlContainers: operations.RestorableSqlContainers;
41+
restorableSqlResources: operations.RestorableSqlResources;
42+
restorableMongodbDatabases: operations.RestorableMongodbDatabases;
43+
restorableMongodbCollections: operations.RestorableMongodbCollections;
44+
restorableMongodbResources: operations.RestorableMongodbResources;
45+
cassandraClusters: operations.CassandraClusters;
46+
cassandraDataCenters: operations.CassandraDataCenters;
3847
privateLinkResources: operations.PrivateLinkResources;
3948
privateEndpointConnections: operations.PrivateEndpointConnections;
49+
service: operations.Service;
4050

4151
/**
4252
* Initializes a new instance of the CosmosDBManagementClient class.
4353
* @param credentials Credentials needed for the client to connect to Azure.
4454
* @param subscriptionId The ID of the target subscription.
4555
* @param [options] The parameter options
4656
*/
47-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) {
57+
constructor(
58+
credentials: msRest.ServiceClientCredentials,
59+
subscriptionId: string,
60+
options?: Models.CosmosDBManagementClientOptions
61+
) {
4862
super(credentials, subscriptionId, options);
4963
this.databaseAccounts = new operations.DatabaseAccounts(this);
5064
this.operations = new operations.Operations(this);
@@ -64,13 +78,128 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext {
6478
this.tableResources = new operations.TableResources(this);
6579
this.cassandraResources = new operations.CassandraResources(this);
6680
this.gremlinResources = new operations.GremlinResources(this);
81+
this.restorableDatabaseAccounts = new operations.RestorableDatabaseAccounts(this);
6782
this.notebookWorkspaces = new operations.NotebookWorkspaces(this);
83+
this.restorableSqlDatabases = new operations.RestorableSqlDatabases(this);
84+
this.restorableSqlContainers = new operations.RestorableSqlContainers(this);
85+
this.restorableSqlResources = new operations.RestorableSqlResources(this);
86+
this.restorableMongodbDatabases = new operations.RestorableMongodbDatabases(this);
87+
this.restorableMongodbCollections = new operations.RestorableMongodbCollections(this);
88+
this.restorableMongodbResources = new operations.RestorableMongodbResources(this);
89+
this.cassandraClusters = new operations.CassandraClusters(this);
90+
this.cassandraDataCenters = new operations.CassandraDataCenters(this);
6891
this.privateLinkResources = new operations.PrivateLinkResources(this);
6992
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
93+
this.service = new operations.Service(this);
94+
}
95+
96+
/**
97+
* List Cosmos DB locations and their properties
98+
* @param [options] The optional parameters
99+
* @returns Promise<Models.LocationListResponse>
100+
*/
101+
locationList(options?: msRest.RequestOptionsBase): Promise<Models.LocationListResponse>;
102+
/**
103+
* @param callback The callback
104+
*/
105+
locationList(callback: msRest.ServiceCallback<Models.LocationListResult>): void;
106+
/**
107+
* @param options The optional parameters
108+
* @param callback The callback
109+
*/
110+
locationList(
111+
options: msRest.RequestOptionsBase,
112+
callback: msRest.ServiceCallback<Models.LocationListResult>
113+
): void;
114+
locationList(
115+
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationListResult>,
116+
callback?: msRest.ServiceCallback<Models.LocationListResult>
117+
): Promise<Models.LocationListResponse> {
118+
return this.sendOperationRequest(
119+
{
120+
options
121+
},
122+
locationListOperationSpec,
123+
callback
124+
) as Promise<Models.LocationListResponse>;
125+
}
126+
127+
/**
128+
* Get the properties of an existing Cosmos DB location
129+
* @param location Cosmos DB region, with spaces between words and each word capitalized.
130+
* @param [options] The optional parameters
131+
* @returns Promise<Models.LocationGetResponse>
132+
*/
133+
locationGet(
134+
location: string,
135+
options?: msRest.RequestOptionsBase
136+
): Promise<Models.LocationGetResponse>;
137+
/**
138+
* @param location Cosmos DB region, with spaces between words and each word capitalized.
139+
* @param callback The callback
140+
*/
141+
locationGet(location: string, callback: msRest.ServiceCallback<Models.LocationGetResult>): void;
142+
/**
143+
* @param location Cosmos DB region, with spaces between words and each word capitalized.
144+
* @param options The optional parameters
145+
* @param callback The callback
146+
*/
147+
locationGet(
148+
location: string,
149+
options: msRest.RequestOptionsBase,
150+
callback: msRest.ServiceCallback<Models.LocationGetResult>
151+
): void;
152+
locationGet(
153+
location: string,
154+
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationGetResult>,
155+
callback?: msRest.ServiceCallback<Models.LocationGetResult>
156+
): Promise<Models.LocationGetResponse> {
157+
return this.sendOperationRequest(
158+
{
159+
location,
160+
options
161+
},
162+
locationGetOperationSpec,
163+
callback
164+
) as Promise<Models.LocationGetResponse>;
70165
}
71166
}
72167

73168
// Operation Specifications
169+
const serializer = new msRest.Serializer(Mappers);
170+
const locationListOperationSpec: msRest.OperationSpec = {
171+
httpMethod: "GET",
172+
path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations",
173+
urlParameters: [Parameters.subscriptionId],
174+
queryParameters: [Parameters.apiVersion],
175+
headerParameters: [Parameters.acceptLanguage],
176+
responses: {
177+
200: {
178+
bodyMapper: Mappers.LocationListResult
179+
},
180+
default: {
181+
bodyMapper: Mappers.CloudError
182+
}
183+
},
184+
serializer
185+
};
186+
187+
const locationGetOperationSpec: msRest.OperationSpec = {
188+
httpMethod: "GET",
189+
path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}",
190+
urlParameters: [Parameters.subscriptionId, Parameters.location],
191+
queryParameters: [Parameters.apiVersion],
192+
headerParameters: [Parameters.acceptLanguage],
193+
responses: {
194+
200: {
195+
bodyMapper: Mappers.LocationGetResult
196+
},
197+
default: {
198+
bodyMapper: Mappers.CloudError
199+
}
200+
},
201+
serializer
202+
};
74203

75204
export {
76205
CosmosDBManagementClient,

sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js";
1212
import * as msRestAzure from "@azure/ms-rest-azure-js";
1313

1414
const packageName = "@azure/arm-cosmosdb";
15-
const packageVersion = "12.1.0";
15+
const packageVersion = "13.0.0";
1616

1717
export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceClient {
1818
credentials: msRest.ServiceClientCredentials;
@@ -25,12 +25,16 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli
2525
* @param subscriptionId The ID of the target subscription.
2626
* @param [options] The parameter options
2727
*/
28-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) {
28+
constructor(
29+
credentials: msRest.ServiceClientCredentials,
30+
subscriptionId: string,
31+
options?: Models.CosmosDBManagementClientOptions
32+
) {
2933
if (credentials == undefined) {
30-
throw new Error('\'credentials\' cannot be null.');
34+
throw new Error("'credentials' cannot be null.");
3135
}
3236
if (subscriptionId == undefined) {
33-
throw new Error('\'subscriptionId\' cannot be null.');
37+
throw new Error("'subscriptionId' cannot be null.");
3438
}
3539

3640
if (!options) {
@@ -43,8 +47,8 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli
4347

4448
super(credentials, options);
4549

46-
this.apiVersion = '2021-03-15';
47-
this.acceptLanguage = 'en-US';
50+
this.apiVersion = "2021-04-01-preview";
51+
this.acceptLanguage = "en-US";
4852
this.longRunningOperationRetryTimeout = 30;
4953
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5054
this.requestContentType = "application/json; charset=utf-8";
@@ -54,7 +58,10 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli
5458
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
5559
this.acceptLanguage = options.acceptLanguage;
5660
}
57-
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
61+
if (
62+
options.longRunningOperationRetryTimeout !== null &&
63+
options.longRunningOperationRetryTimeout !== undefined
64+
) {
5865
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
5966
}
6067
}
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
discriminators,
11+
ApiProperties,
12+
ARMProxyResource,
13+
ARMResourceProperties,
14+
AutoscaleSettings,
15+
AutoscaleSettingsResource,
16+
AutoUpgradePolicyResource,
17+
AzureEntityResource,
18+
BackupPolicy,
19+
BackupResource,
20+
BackupResourceProperties,
21+
BaseResource,
22+
Capability,
23+
CassandraKeyspaceCreateUpdateParameters,
24+
CassandraKeyspaceGetPropertiesOptions,
25+
CassandraKeyspaceGetPropertiesResource,
26+
CassandraKeyspaceGetResults,
27+
CassandraKeyspaceResource,
28+
CassandraPartitionKey,
29+
CassandraSchema,
30+
CassandraTableCreateUpdateParameters,
31+
CassandraTableGetPropertiesOptions,
32+
CassandraTableGetPropertiesResource,
33+
CassandraTableGetResults,
34+
CassandraTableResource,
35+
Certificate,
36+
CloudError,
37+
ClusterKey,
38+
ClusterNodeStatus,
39+
ClusterNodeStatusNodesItem,
40+
ClusterResource,
41+
ClusterResourceProperties,
42+
Column,
43+
CompositePath,
44+
ConflictResolutionPolicy,
45+
ConsistencyPolicy,
46+
ContainerPartitionKey,
47+
ContinuousModeBackupPolicy,
48+
CorsPolicy,
49+
CreateUpdateOptions,
50+
DatabaseAccountCreateUpdateParameters,
51+
DatabaseAccountCreateUpdateProperties,
52+
DatabaseAccountGetResults,
53+
DatabaseRestoreResource,
54+
DataCenterResource,
55+
DataCenterResourceProperties,
56+
DataTransferRegionalServiceResource,
57+
DataTransferServiceResourceProperties,
58+
DefaultRequestDatabaseAccountCreateUpdateProperties,
59+
ErrorResponse,
60+
ExcludedPath,
61+
FailoverPolicy,
62+
GremlinDatabaseCreateUpdateParameters,
63+
GremlinDatabaseGetPropertiesOptions,
64+
GremlinDatabaseGetPropertiesResource,
65+
GremlinDatabaseGetResults,
66+
GremlinDatabaseResource,
67+
GremlinGraphCreateUpdateParameters,
68+
GremlinGraphGetPropertiesOptions,
69+
GremlinGraphGetPropertiesResource,
70+
GremlinGraphGetResults,
71+
GremlinGraphResource,
72+
IncludedPath,
73+
Indexes,
74+
IndexingPolicy,
75+
IpAddressOrRange,
76+
ListBackups,
77+
ListClusters,
78+
Location,
79+
LocationGetResult,
80+
LocationProperties,
81+
ManagedServiceIdentity,
82+
ManagedServiceIdentityUserAssignedIdentitiesValue,
83+
MongoDBCollectionCreateUpdateParameters,
84+
MongoDBCollectionGetPropertiesOptions,
85+
MongoDBCollectionGetPropertiesResource,
86+
MongoDBCollectionGetResults,
87+
MongoDBCollectionResource,
88+
MongoDBDatabaseCreateUpdateParameters,
89+
MongoDBDatabaseGetPropertiesOptions,
90+
MongoDBDatabaseGetPropertiesResource,
91+
MongoDBDatabaseGetResults,
92+
MongoDBDatabaseResource,
93+
MongoIndex,
94+
MongoIndexKeys,
95+
MongoIndexOptions,
96+
NotebookWorkspace,
97+
NotebookWorkspaceCreateUpdateParameters,
98+
OptionsResource,
99+
PeriodicModeBackupPolicy,
100+
PeriodicModeProperties,
101+
Permission,
102+
PrivateEndpointConnection,
103+
PrivateEndpointProperty,
104+
PrivateLinkResource,
105+
PrivateLinkServiceConnectionStateProperty,
106+
ProxyResource,
107+
RegionalServiceResource,
108+
RepairPostBody,
109+
Resource,
110+
RestoreParameters,
111+
RestoreReqeustDatabaseAccountCreateUpdateProperties,
112+
SeedNode,
113+
ServiceResource,
114+
ServiceResourceProperties,
115+
SpatialSpec,
116+
SqlContainerCreateUpdateParameters,
117+
SqlContainerGetPropertiesOptions,
118+
SqlContainerGetPropertiesResource,
119+
SqlContainerGetResults,
120+
SqlContainerResource,
121+
SqlDatabaseCreateUpdateParameters,
122+
SqlDatabaseGetPropertiesOptions,
123+
SqlDatabaseGetPropertiesResource,
124+
SqlDatabaseGetResults,
125+
SqlDatabaseResource,
126+
SqlDedicatedGatewayRegionalServiceResource,
127+
SqlDedicatedGatewayServiceResourceProperties,
128+
SqlRoleAssignmentGetResults,
129+
SqlRoleDefinitionGetResults,
130+
SqlStoredProcedureCreateUpdateParameters,
131+
SqlStoredProcedureGetPropertiesResource,
132+
SqlStoredProcedureGetResults,
133+
SqlStoredProcedureResource,
134+
SqlTriggerCreateUpdateParameters,
135+
SqlTriggerGetPropertiesResource,
136+
SqlTriggerGetResults,
137+
SqlTriggerResource,
138+
SqlUserDefinedFunctionCreateUpdateParameters,
139+
SqlUserDefinedFunctionGetPropertiesResource,
140+
SqlUserDefinedFunctionGetResults,
141+
SqlUserDefinedFunctionResource,
142+
SystemData,
143+
TableCreateUpdateParameters,
144+
TableGetPropertiesOptions,
145+
TableGetPropertiesResource,
146+
TableGetResults,
147+
TableResource,
148+
ThroughputPolicyResource,
149+
ThroughputSettingsGetPropertiesResource,
150+
ThroughputSettingsGetResults,
151+
ThroughputSettingsResource,
152+
ThroughputSettingsUpdateParameters,
153+
TrackedResource,
154+
UniqueKey,
155+
UniqueKeyPolicy,
156+
VirtualNetworkRule
157+
} from "../models/mappers";

0 commit comments

Comments
 (0)