mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-23 12:37:25 +00:00
2904 lines
109 KiB
TypeScript
2904 lines
109 KiB
TypeScript
|
export interface DatabaseAccountsListResult {
|
|||
|
/* List of database account and their properties. */
|
|||
|
readonly value: DatabaseAccountGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlDatabaseListResult {
|
|||
|
/* List of SQL databases and their properties. */
|
|||
|
readonly value: SqlDatabaseGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlContainerListResult {
|
|||
|
/* List of containers and their properties. */
|
|||
|
readonly value: SqlContainerGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlStoredProcedureListResult {
|
|||
|
/* List of storedProcedures and their properties. */
|
|||
|
readonly value: SqlStoredProcedureGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlUserDefinedFunctionListResult {
|
|||
|
/* List of userDefinedFunctions and their properties. */
|
|||
|
readonly value: SqlUserDefinedFunctionGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlTriggerListResult {
|
|||
|
/* List of triggers and their properties. */
|
|||
|
readonly value: SqlTriggerGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface MongoDBDatabaseListResult {
|
|||
|
/* List of MongoDB databases and their properties. */
|
|||
|
readonly value: MongoDBDatabaseGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface MongoDBCollectionListResult {
|
|||
|
/* List of MongoDB collections and their properties. */
|
|||
|
readonly value: MongoDBCollectionGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface TableListResult {
|
|||
|
/* List of Table and their properties. */
|
|||
|
readonly value: TableGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraKeyspaceListResult {
|
|||
|
/* List of Cassandra keyspaces and their properties. */
|
|||
|
readonly value: CassandraKeyspaceGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraTableListResult {
|
|||
|
/* List of Cassandra tables and their properties. */
|
|||
|
readonly value: CassandraTableGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface GremlinDatabaseListResult {
|
|||
|
/* List of Gremlin databases and their properties. */
|
|||
|
readonly value: GremlinDatabaseGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface GremlinGraphListResult {
|
|||
|
/* List of graphs and their properties. */
|
|||
|
readonly value: GremlinGraphGetResults[];
|
|||
|
}
|
|||
|
|
|||
|
export interface ErrorResponse {
|
|||
|
/* Error code. */
|
|||
|
code: string;
|
|||
|
/* Error message indicating why the operation failed. */
|
|||
|
message: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface ErrorResponseUpdatedFormat {
|
|||
|
/* undefined */
|
|||
|
error: unknown;
|
|||
|
}
|
|||
|
|
|||
|
export interface FailoverPolicies {
|
|||
|
/* List of failover policies. */
|
|||
|
failoverPolicies: FailoverPolicy[];
|
|||
|
}
|
|||
|
|
|||
|
export interface FailoverPolicy {
|
|||
|
/* The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>. */
|
|||
|
readonly id: string;
|
|||
|
/* The name of the region in which the database account exists. */
|
|||
|
locationName: string;
|
|||
|
/* The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. */
|
|||
|
failoverPriority: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface RegionForOnlineOffline {
|
|||
|
/* Cosmos DB region, with spaces between words and each word capitalized. */
|
|||
|
region: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface Location {
|
|||
|
/* The unique identifier of the region within the database account. Example: <accountName>-<locationName>. */
|
|||
|
readonly id: string;
|
|||
|
/* The name of the region. */
|
|||
|
locationName: string;
|
|||
|
/* The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/ */
|
|||
|
readonly documentEndpoint: string;
|
|||
|
/* undefined */
|
|||
|
provisioningState: ProvisioningState;
|
|||
|
|
|||
|
/* The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. */
|
|||
|
failoverPriority: number;
|
|||
|
/* Flag to indicate whether or not this region is an AvailabilityZone region */
|
|||
|
isZoneRedundant: boolean;
|
|||
|
}
|
|||
|
|
|||
|
export interface ARMResourceProperties {
|
|||
|
/* The unique resource identifier of the ARM resource. */
|
|||
|
readonly id: string;
|
|||
|
/* The name of the ARM resource. */
|
|||
|
readonly name: string;
|
|||
|
/* The type of Azure resource. */
|
|||
|
readonly type: string;
|
|||
|
/* The location of the resource group to which the resource belongs. */
|
|||
|
location: string;
|
|||
|
/* undefined */
|
|||
|
tags: Tags;
|
|||
|
|
|||
|
/* undefined */
|
|||
|
identity: ManagedServiceIdentity;
|
|||
|
}
|
|||
|
|
|||
|
export interface ARMProxyResource {
|
|||
|
/* The unique resource identifier of the database account. */
|
|||
|
readonly id: string;
|
|||
|
/* The name of the database account. */
|
|||
|
readonly name: string;
|
|||
|
/* The type of Azure resource. */
|
|||
|
readonly type: string;
|
|||
|
}
|
|||
|
|
|||
|
export type DatabaseAccountGetResults = ARMResourceProperties & {
|
|||
|
/* Indicates the type of database account. This can only be set at database account creation. */
|
|||
|
kind: string;
|
|||
|
/* undefined */
|
|||
|
properties: DatabaseAccountGetProperties;
|
|||
|
|
|||
|
/* The system meta data relating to this resource. */
|
|||
|
readonly systemData: unknown;
|
|||
|
};
|
|||
|
|
|||
|
export interface ExtendedResourceProperties {
|
|||
|
/* A system generated property. A unique identifier. */
|
|||
|
readonly _rid: string;
|
|||
|
/* A system generated property that denotes the last updated timestamp of the resource. */
|
|||
|
readonly _ts: undefined;
|
|||
|
/* A system generated property representing the resource etag required for optimistic concurrency control. */
|
|||
|
readonly _etag: string;
|
|||
|
}
|
|||
|
|
|||
|
export type ThroughputSettingsGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB resource throughput */
|
|||
|
properties: ThroughputSettingsGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface ThroughputSettingsGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlDatabaseGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB SQL database */
|
|||
|
properties: SqlDatabaseGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlDatabaseGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlContainerGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB container */
|
|||
|
properties: SqlContainerGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlContainerGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlStoredProcedureGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB storedProcedure */
|
|||
|
properties: SqlStoredProcedureGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlStoredProcedureGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlUserDefinedFunctionGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB userDefinedFunction */
|
|||
|
properties: SqlUserDefinedFunctionGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlUserDefinedFunctionGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlTriggerGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB trigger */
|
|||
|
properties: SqlTriggerGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlTriggerGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type MongoDBDatabaseGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB MongoDB database */
|
|||
|
properties: MongoDBDatabaseGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface MongoDBDatabaseGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type MongoDBCollectionGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB MongoDB collection */
|
|||
|
properties: MongoDBCollectionGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface MongoDBCollectionGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type TableGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB Table */
|
|||
|
properties: TableGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface TableGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type CassandraKeyspaceGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB Cassandra keyspace */
|
|||
|
properties: CassandraKeyspaceGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface CassandraKeyspaceGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type CassandraTableGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB Cassandra table */
|
|||
|
properties: CassandraTableGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface CassandraTableGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type GremlinDatabaseGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB SQL database */
|
|||
|
properties: GremlinDatabaseGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface GremlinDatabaseGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export type GremlinGraphGetResults = ARMResourceProperties & {
|
|||
|
/* The properties of an Azure Cosmos DB Gremlin graph */
|
|||
|
properties: GremlinGraphGetProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface GremlinGraphGetProperties {
|
|||
|
/* undefined */
|
|||
|
resource: undefined;
|
|||
|
/* undefined */
|
|||
|
options: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export interface ConsistencyPolicy {
|
|||
|
/* The default consistency level and configuration settings of the Cosmos DB account. */
|
|||
|
defaultConsistencyLevel: string;
|
|||
|
/* When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. */
|
|||
|
maxStalenessPrefix: number;
|
|||
|
/* When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. */
|
|||
|
maxIntervalInSeconds: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountGetProperties {
|
|||
|
/* undefined */
|
|||
|
provisioningState: ProvisioningState;
|
|||
|
|
|||
|
/* The connection endpoint for the Cosmos DB database account. */
|
|||
|
readonly documentEndpoint: string;
|
|||
|
/* The offer type for the Cosmos DB database account. Default value: Standard. */
|
|||
|
readonly databaseAccountOfferType: DatabaseAccountOfferType;
|
|||
|
|
|||
|
/* List of IpRules. */
|
|||
|
ipRules: IPRules;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable/disable Virtual Network ACL rules. */
|
|||
|
isVirtualNetworkFilterEnabled: boolean;
|
|||
|
/* Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */
|
|||
|
enableAutomaticFailover: boolean;
|
|||
|
/* The consistency policy for the Cosmos DB database account. */
|
|||
|
consistencyPolicy: ConsistencyPolicy;
|
|||
|
|
|||
|
/* List of Cosmos DB capabilities for the account */
|
|||
|
capabilities: Capability[];
|
|||
|
|
|||
|
/* An array that contains the write location for the Cosmos DB account. */
|
|||
|
readonly writeLocations: Location[];
|
|||
|
|
|||
|
/* An array that contains of the read locations enabled for the Cosmos DB account. */
|
|||
|
readonly readLocations: Location[];
|
|||
|
|
|||
|
/* An array that contains all of the locations enabled for the Cosmos DB account. */
|
|||
|
readonly locations: Location[];
|
|||
|
|
|||
|
/* An array that contains the regions ordered by their failover priorities. */
|
|||
|
readonly failoverPolicies: FailoverPolicy[];
|
|||
|
|
|||
|
/* List of Virtual Network ACL rules configured for the Cosmos DB account. */
|
|||
|
virtualNetworkRules: VirtualNetworkRule[];
|
|||
|
|
|||
|
/* List of Private Endpoint Connections configured for the Cosmos DB account. */
|
|||
|
readonly privateEndpointConnections: PrivateEndpointConnection[];
|
|||
|
|
|||
|
/* Enables the account to write in multiple locations */
|
|||
|
enableMultipleWriteLocations: boolean;
|
|||
|
/* Enables the cassandra connector on the Cosmos DB C* account */
|
|||
|
enableCassandraConnector: boolean;
|
|||
|
/* The cassandra connector offer type for the Cosmos DB database C* account. */
|
|||
|
connectorOffer: ConnectorOffer;
|
|||
|
|
|||
|
/* Disable write operations on metadata resources (databases, containers, throughput) via account keys */
|
|||
|
disableKeyBasedMetadataWriteAccess: boolean;
|
|||
|
/* The URI of the key vault */
|
|||
|
keyVaultKeyUri: string;
|
|||
|
/* Whether requests from Public Network are allowed */
|
|||
|
publicNetworkAccess: PublicNetworkAccess;
|
|||
|
|
|||
|
/* Flag to indicate whether Free Tier is enabled. */
|
|||
|
enableFreeTier: boolean;
|
|||
|
/* API specific properties. */
|
|||
|
apiProperties: ApiProperties;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable storage analytics. */
|
|||
|
enableAnalyticalStorage: boolean;
|
|||
|
/* A unique identifier assigned to the database account */
|
|||
|
readonly instanceId: string;
|
|||
|
/* Enum to indicate the mode of account creation. */
|
|||
|
createMode: CreateMode;
|
|||
|
|
|||
|
/* Parameters to indicate the information about the restore. */
|
|||
|
restoreParameters: RestoreParameters;
|
|||
|
|
|||
|
/* The object representing the policy for taking backups on an account. */
|
|||
|
backupPolicy: BackupPolicy;
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountCreateUpdateProperties {
|
|||
|
/* The consistency policy for the Cosmos DB account. */
|
|||
|
consistencyPolicy: ConsistencyPolicy;
|
|||
|
|
|||
|
/* An array that contains the georeplication locations enabled for the Cosmos DB account. */
|
|||
|
locations: Location[];
|
|||
|
|
|||
|
/* The offer type for the database */
|
|||
|
databaseAccountOfferType: DatabaseAccountOfferType;
|
|||
|
|
|||
|
/* List of IpRules. */
|
|||
|
ipRules: IPRules;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable/disable Virtual Network ACL rules. */
|
|||
|
isVirtualNetworkFilterEnabled: boolean;
|
|||
|
/* Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */
|
|||
|
enableAutomaticFailover: boolean;
|
|||
|
/* List of Cosmos DB capabilities for the account */
|
|||
|
capabilities: Capability[];
|
|||
|
|
|||
|
/* List of Virtual Network ACL rules configured for the Cosmos DB account. */
|
|||
|
virtualNetworkRules: VirtualNetworkRule[];
|
|||
|
|
|||
|
/* Enables the account to write in multiple locations */
|
|||
|
enableMultipleWriteLocations: boolean;
|
|||
|
/* Enables the cassandra connector on the Cosmos DB C* account */
|
|||
|
enableCassandraConnector: boolean;
|
|||
|
/* The cassandra connector offer type for the Cosmos DB database C* account. */
|
|||
|
connectorOffer: ConnectorOffer;
|
|||
|
|
|||
|
/* Disable write operations on metadata resources (databases, containers, throughput) via account keys */
|
|||
|
disableKeyBasedMetadataWriteAccess: boolean;
|
|||
|
/* The URI of the key vault */
|
|||
|
keyVaultKeyUri: string;
|
|||
|
/* Whether requests from Public Network are allowed */
|
|||
|
publicNetworkAccess: PublicNetworkAccess;
|
|||
|
|
|||
|
/* Flag to indicate whether Free Tier is enabled. */
|
|||
|
enableFreeTier: boolean;
|
|||
|
/* API specific properties. Currently, supported only for MongoDB API. */
|
|||
|
apiProperties: ApiProperties;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable storage analytics. */
|
|||
|
enableAnalyticalStorage: boolean;
|
|||
|
/* Enum to indicate the mode of account creation. */
|
|||
|
createMode: CreateMode;
|
|||
|
|
|||
|
/* The object representing the policy for taking backups on an account. */
|
|||
|
backupPolicy: BackupPolicy;
|
|||
|
}
|
|||
|
|
|||
|
export type RestoreReqeustDatabaseAccountCreateUpdateProperties = DatabaseAccountCreateUpdateProperties & {
|
|||
|
/* Parameters to indicate the information about the restore. */
|
|||
|
restoreParameters: RestoreParameters;
|
|||
|
};
|
|||
|
|
|||
|
export type DatabaseAccountCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Indicates the type of database account. This can only be set at database account creation. */
|
|||
|
kind: string;
|
|||
|
/* undefined */
|
|||
|
properties: DatabaseAccountCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface DatabaseAccountUpdateProperties {
|
|||
|
/* The consistency policy for the Cosmos DB account. */
|
|||
|
consistencyPolicy: ConsistencyPolicy;
|
|||
|
|
|||
|
/* An array that contains the georeplication locations enabled for the Cosmos DB account. */
|
|||
|
locations: Location[];
|
|||
|
|
|||
|
/* List of IpRules. */
|
|||
|
ipRules: IPRules;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable/disable Virtual Network ACL rules. */
|
|||
|
isVirtualNetworkFilterEnabled: boolean;
|
|||
|
/* Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */
|
|||
|
enableAutomaticFailover: boolean;
|
|||
|
/* List of Cosmos DB capabilities for the account */
|
|||
|
capabilities: Capability[];
|
|||
|
|
|||
|
/* List of Virtual Network ACL rules configured for the Cosmos DB account. */
|
|||
|
virtualNetworkRules: VirtualNetworkRule[];
|
|||
|
|
|||
|
/* Enables the account to write in multiple locations */
|
|||
|
enableMultipleWriteLocations: boolean;
|
|||
|
/* Enables the cassandra connector on the Cosmos DB C* account */
|
|||
|
enableCassandraConnector: boolean;
|
|||
|
/* The cassandra connector offer type for the Cosmos DB database C* account. */
|
|||
|
connectorOffer: ConnectorOffer;
|
|||
|
|
|||
|
/* Disable write operations on metadata resources (databases, containers, throughput) via account keys */
|
|||
|
disableKeyBasedMetadataWriteAccess: boolean;
|
|||
|
/* The URI of the key vault */
|
|||
|
keyVaultKeyUri: string;
|
|||
|
/* Whether requests from Public Network are allowed */
|
|||
|
publicNetworkAccess: PublicNetworkAccess;
|
|||
|
|
|||
|
/* Flag to indicate whether Free Tier is enabled. */
|
|||
|
enableFreeTier: boolean;
|
|||
|
/* API specific properties. Currently, supported only for MongoDB API. */
|
|||
|
apiProperties: ApiProperties;
|
|||
|
|
|||
|
/* Flag to indicate whether to enable storage analytics. */
|
|||
|
enableAnalyticalStorage: boolean;
|
|||
|
/* The object representing the policy for taking backups on an account. */
|
|||
|
backupPolicy: BackupPolicy;
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountUpdateParameters {
|
|||
|
/* undefined */
|
|||
|
tags: Tags;
|
|||
|
|
|||
|
/* The location of the resource group to which the resource belongs. */
|
|||
|
location: string;
|
|||
|
/* undefined */
|
|||
|
properties: DatabaseAccountUpdateProperties;
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountListReadOnlyKeysResult {
|
|||
|
/* Base 64 encoded value of the primary read-only key. */
|
|||
|
readonly primaryReadonlyMasterKey: string;
|
|||
|
/* Base 64 encoded value of the secondary read-only key. */
|
|||
|
readonly secondaryReadonlyMasterKey: string;
|
|||
|
}
|
|||
|
|
|||
|
export type DatabaseAccountListKeysResult = DatabaseAccountListReadOnlyKeysResult & {
|
|||
|
/* Base 64 encoded value of the primary read-write key. */
|
|||
|
readonly primaryMasterKey: string;
|
|||
|
/* Base 64 encoded value of the secondary read-write key. */
|
|||
|
readonly secondaryMasterKey: string;
|
|||
|
};
|
|||
|
|
|||
|
export interface DatabaseAccountConnectionString {
|
|||
|
/* Value of the connection string */
|
|||
|
readonly connectionString: string;
|
|||
|
/* Description of the connection string */
|
|||
|
readonly description: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountListConnectionStringsResult {
|
|||
|
/* An array that contains the connection strings for the Cosmos DB account. */
|
|||
|
connectionStrings: DatabaseAccountConnectionString[];
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseAccountRegenerateKeyParameters {
|
|||
|
/* The access key to regenerate. */
|
|||
|
keyKind: string;
|
|||
|
}
|
|||
|
|
|||
|
/* The offer type for the Cosmos DB database account. */
|
|||
|
type DatabaseAccountOfferType = "Standard";
|
|||
|
export type ThroughputSettingsUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to update Azure Cosmos DB resource throughput. */
|
|||
|
properties: ThroughputSettingsUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface ThroughputSettingsUpdateProperties {
|
|||
|
/* The standard JSON format of a resource throughput */
|
|||
|
resource: ThroughputSettingsResource;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlDatabaseCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB SQL database. */
|
|||
|
properties: SqlDatabaseCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlDatabaseCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a SQL database */
|
|||
|
resource: SqlDatabaseResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlContainerCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB container. */
|
|||
|
properties: SqlContainerCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlContainerCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a container */
|
|||
|
resource: SqlContainerResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlStoredProcedureCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB storedProcedure. */
|
|||
|
properties: SqlStoredProcedureCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlStoredProcedureCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a storedProcedure */
|
|||
|
resource: SqlStoredProcedureResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlUserDefinedFunctionCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB userDefinedFunction. */
|
|||
|
properties: SqlUserDefinedFunctionCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlUserDefinedFunctionCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a userDefinedFunction */
|
|||
|
resource: SqlUserDefinedFunctionResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type SqlTriggerCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB trigger. */
|
|||
|
properties: SqlTriggerCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface SqlTriggerCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a trigger */
|
|||
|
resource: SqlTriggerResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type MongoDBDatabaseCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB MongoDB database. */
|
|||
|
properties: MongoDBDatabaseCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface MongoDBDatabaseCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a MongoDB database */
|
|||
|
resource: MongoDBDatabaseResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type MongoDBCollectionCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB MongoDB collection. */
|
|||
|
properties: MongoDBCollectionCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface MongoDBCollectionCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a MongoDB collection */
|
|||
|
resource: MongoDBCollectionResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type TableCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB Table. */
|
|||
|
properties: TableCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface TableCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a Table */
|
|||
|
resource: TableResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type CassandraKeyspaceCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB Cassandra keyspace. */
|
|||
|
properties: CassandraKeyspaceCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface CassandraKeyspaceCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a Cassandra keyspace */
|
|||
|
resource: CassandraKeyspaceResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type CassandraTableCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB Cassandra table. */
|
|||
|
properties: CassandraTableCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface CassandraTableCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a Cassandra table */
|
|||
|
resource: CassandraTableResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type GremlinDatabaseCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB Gremlin database. */
|
|||
|
properties: GremlinDatabaseCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface GremlinDatabaseCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a Gremlin database */
|
|||
|
resource: GremlinDatabaseResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export type GremlinGraphCreateUpdateParameters = ARMResourceProperties & {
|
|||
|
/* Properties to create and update Azure Cosmos DB Gremlin graph. */
|
|||
|
properties: GremlinGraphCreateUpdateProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface GremlinGraphCreateUpdateProperties {
|
|||
|
/* The standard JSON format of a Gremlin graph */
|
|||
|
resource: GremlinGraphResource;
|
|||
|
|
|||
|
/* A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */
|
|||
|
options: CreateUpdateOptions;
|
|||
|
}
|
|||
|
|
|||
|
export interface ThroughputSettingsResource {
|
|||
|
/* Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. */
|
|||
|
throughput: number;
|
|||
|
/* Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. */
|
|||
|
autoscaleSettings: AutoscaleSettingsResource;
|
|||
|
|
|||
|
/* The minimum throughput of the resource */
|
|||
|
readonly minimumThroughput: string;
|
|||
|
/* The throughput replace is pending */
|
|||
|
readonly offerReplacePending: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface AutoscaleSettingsResource {
|
|||
|
/* Represents maximum throughput container can scale up to. */
|
|||
|
maxThroughput: number;
|
|||
|
/* Cosmos DB resource auto-upgrade policy */
|
|||
|
autoUpgradePolicy: AutoUpgradePolicyResource;
|
|||
|
|
|||
|
/* Represents target maximum throughput container can scale up to once offer is no longer in pending state. */
|
|||
|
readonly targetMaxThroughput: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface AutoUpgradePolicyResource {
|
|||
|
/* Represents throughput policy which service must adhere to for auto-upgrade */
|
|||
|
throughputPolicy: ThroughputPolicyResource;
|
|||
|
}
|
|||
|
|
|||
|
export interface ThroughputPolicyResource {
|
|||
|
/* Determines whether the ThroughputPolicy is active or not */
|
|||
|
isEnabled: boolean;
|
|||
|
/* Represents the percentage by which throughput can increase every time throughput policy kicks in. */
|
|||
|
incrementPercent: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface OptionsResource {
|
|||
|
/* Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. */
|
|||
|
throughput: number;
|
|||
|
/* Specifies the Autoscale settings. */
|
|||
|
autoscaleSettings: AutoscaleSettings;
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlDatabaseResource {
|
|||
|
/* Name of the Cosmos DB SQL database */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlContainerResource {
|
|||
|
/* Name of the Cosmos DB SQL container */
|
|||
|
id: string;
|
|||
|
/* The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container */
|
|||
|
indexingPolicy: IndexingPolicy;
|
|||
|
|
|||
|
/* The configuration of the partition key to be used for partitioning data into multiple partitions */
|
|||
|
partitionKey: ContainerPartitionKey;
|
|||
|
|
|||
|
/* Default time to live */
|
|||
|
defaultTtl: number;
|
|||
|
/* The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. */
|
|||
|
uniqueKeyPolicy: UniqueKeyPolicy;
|
|||
|
|
|||
|
/* The conflict resolution policy for the container. */
|
|||
|
conflictResolutionPolicy: ConflictResolutionPolicy;
|
|||
|
}
|
|||
|
|
|||
|
export interface IndexingPolicy {
|
|||
|
/* Indicates if the indexing policy is automatic */
|
|||
|
automatic: boolean;
|
|||
|
/* Indicates the indexing mode. */
|
|||
|
indexingMode: string;
|
|||
|
/* List of paths to include in the indexing */
|
|||
|
includedPaths: IncludedPath[];
|
|||
|
|
|||
|
/* List of paths to exclude from indexing */
|
|||
|
excludedPaths: ExcludedPath[];
|
|||
|
|
|||
|
/* List of composite path list */
|
|||
|
compositeIndexes: CompositePathList[];
|
|||
|
|
|||
|
/* List of spatial specifics */
|
|||
|
spatialIndexes: SpatialSpec[];
|
|||
|
}
|
|||
|
|
|||
|
export interface ExcludedPath {
|
|||
|
/* The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) */
|
|||
|
path: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface IncludedPath {
|
|||
|
/* The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) */
|
|||
|
path: string;
|
|||
|
/* List of indexes for this path */
|
|||
|
indexes: Indexes[];
|
|||
|
}
|
|||
|
|
|||
|
export interface Indexes {
|
|||
|
/* The datatype for which the indexing behavior is applied to. */
|
|||
|
dataType: string;
|
|||
|
/* The precision of the index. -1 is maximum precision. */
|
|||
|
precision: number;
|
|||
|
/* Indicates the type of index. */
|
|||
|
kind: string;
|
|||
|
}
|
|||
|
|
|||
|
/* List of composite path */
|
|||
|
type CompositePathList = CompositePath[];
|
|||
|
export interface CompositePath {
|
|||
|
/* The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) */
|
|||
|
path: string;
|
|||
|
/* Sort order for composite paths. */
|
|||
|
order: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface SpatialSpec {
|
|||
|
/* The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) */
|
|||
|
path: string;
|
|||
|
/* List of path's spatial type */
|
|||
|
types: SpatialType[];
|
|||
|
}
|
|||
|
|
|||
|
/* Indicates the spatial type of index. */
|
|||
|
type SpatialType = "Point" | "LineString" | "Polygon" | "MultiPolygon";
|
|||
|
export interface ContainerPartitionKey {
|
|||
|
/* List of paths using which data within the container can be partitioned */
|
|||
|
paths: Path[];
|
|||
|
|
|||
|
/* Indicates the kind of algorithm used for partitioning */
|
|||
|
kind: string;
|
|||
|
/* Indicates the version of the partition key definition */
|
|||
|
version: number;
|
|||
|
}
|
|||
|
|
|||
|
/* A path. These typically start with root (/path) */
|
|||
|
type Path = string;
|
|||
|
export interface UniqueKeyPolicy {
|
|||
|
/* List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. */
|
|||
|
uniqueKeys: UniqueKey[];
|
|||
|
}
|
|||
|
|
|||
|
export interface UniqueKey {
|
|||
|
/* List of paths must be unique for each document in the Azure Cosmos DB service */
|
|||
|
paths: Path[];
|
|||
|
}
|
|||
|
|
|||
|
export interface ConflictResolutionPolicy {
|
|||
|
/* Indicates the conflict resolution mode. */
|
|||
|
mode: string;
|
|||
|
/* The conflict resolution path in the case of LastWriterWins mode. */
|
|||
|
conflictResolutionPath: string;
|
|||
|
/* The procedure to resolve conflicts in the case of custom mode. */
|
|||
|
conflictResolutionProcedure: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlStoredProcedureResource {
|
|||
|
/* Name of the Cosmos DB SQL storedProcedure */
|
|||
|
id: string;
|
|||
|
/* Body of the Stored Procedure */
|
|||
|
body: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlUserDefinedFunctionResource {
|
|||
|
/* Name of the Cosmos DB SQL userDefinedFunction */
|
|||
|
id: string;
|
|||
|
/* Body of the User Defined Function */
|
|||
|
body: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface SqlTriggerResource {
|
|||
|
/* Name of the Cosmos DB SQL trigger */
|
|||
|
id: string;
|
|||
|
/* Body of the Trigger */
|
|||
|
body: string;
|
|||
|
/* Type of the Trigger */
|
|||
|
triggerType: string;
|
|||
|
/* The operation the trigger is associated with */
|
|||
|
triggerOperation: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface MongoDBDatabaseResource {
|
|||
|
/* Name of the Cosmos DB MongoDB database */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface MongoDBCollectionResource {
|
|||
|
/* Name of the Cosmos DB MongoDB collection */
|
|||
|
id: string;
|
|||
|
/* A key-value pair of shard keys to be applied for the request. */
|
|||
|
shardKey: ShardKeys;
|
|||
|
|
|||
|
/* List of index keys */
|
|||
|
indexes: MongoIndex[];
|
|||
|
|
|||
|
/* Analytical TTL. */
|
|||
|
analyticalStorageTtl: number;
|
|||
|
}
|
|||
|
|
|||
|
/* The shard key and partition kind pair, only support "Hash" partition kind */
|
|||
|
type ShardKeys = { [key: string]: string };
|
|||
|
export interface MongoIndex {
|
|||
|
/* Cosmos DB MongoDB collection index keys */
|
|||
|
key: MongoIndexKeys;
|
|||
|
|
|||
|
/* Cosmos DB MongoDB collection index key options */
|
|||
|
options: MongoIndexOptions;
|
|||
|
}
|
|||
|
|
|||
|
export interface MongoIndexKeys {
|
|||
|
/* List of keys for each MongoDB collection in the Azure Cosmos DB service */
|
|||
|
keys: Key[];
|
|||
|
}
|
|||
|
|
|||
|
/* A Key. */
|
|||
|
type Key = string;
|
|||
|
export interface MongoIndexOptions {
|
|||
|
/* Expire after seconds */
|
|||
|
expireAfterSeconds: number;
|
|||
|
/* Is unique or not */
|
|||
|
unique: boolean;
|
|||
|
}
|
|||
|
|
|||
|
export interface TableResource {
|
|||
|
/* Name of the Cosmos DB table */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraKeyspaceResource {
|
|||
|
/* Name of the Cosmos DB Cassandra keyspace */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraTableResource {
|
|||
|
/* Name of the Cosmos DB Cassandra table */
|
|||
|
id: string;
|
|||
|
/* Time to live of the Cosmos DB Cassandra table */
|
|||
|
defaultTtl: number;
|
|||
|
/* Schema of the Cosmos DB Cassandra table */
|
|||
|
schema: CassandraSchema;
|
|||
|
|
|||
|
/* Analytical TTL. */
|
|||
|
analyticalStorageTtl: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraSchema {
|
|||
|
/* List of Cassandra table columns. */
|
|||
|
columns: Column[];
|
|||
|
|
|||
|
/* List of partition key. */
|
|||
|
partitionKeys: CassandraPartitionKey[];
|
|||
|
|
|||
|
/* List of cluster key. */
|
|||
|
clusterKeys: ClusterKey[];
|
|||
|
}
|
|||
|
|
|||
|
export interface Column {
|
|||
|
/* Name of the Cosmos DB Cassandra table column */
|
|||
|
name: string;
|
|||
|
/* Type of the Cosmos DB Cassandra table column */
|
|||
|
type: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface CassandraPartitionKey {
|
|||
|
/* Name of the Cosmos DB Cassandra table partition key */
|
|||
|
name: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface ClusterKey {
|
|||
|
/* Name of the Cosmos DB Cassandra table cluster key */
|
|||
|
name: string;
|
|||
|
/* Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc" */
|
|||
|
orderBy: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface GremlinDatabaseResource {
|
|||
|
/* Name of the Cosmos DB Gremlin database */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface GremlinGraphResource {
|
|||
|
/* Name of the Cosmos DB Gremlin graph */
|
|||
|
id: string;
|
|||
|
/* The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph */
|
|||
|
indexingPolicy: IndexingPolicy;
|
|||
|
|
|||
|
/* The configuration of the partition key to be used for partitioning data into multiple partitions */
|
|||
|
partitionKey: ContainerPartitionKey;
|
|||
|
|
|||
|
/* Default time to live */
|
|||
|
defaultTtl: number;
|
|||
|
/* The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. */
|
|||
|
uniqueKeyPolicy: UniqueKeyPolicy;
|
|||
|
|
|||
|
/* The conflict resolution policy for the graph. */
|
|||
|
conflictResolutionPolicy: ConflictResolutionPolicy;
|
|||
|
}
|
|||
|
|
|||
|
export interface CreateUpdateOptions {
|
|||
|
/* Request Units per second. For example, "throughput": 10000. */
|
|||
|
throughput: number;
|
|||
|
/* Specifies the Autoscale settings. */
|
|||
|
autoscaleSettings: AutoscaleSettings;
|
|||
|
}
|
|||
|
|
|||
|
export interface AutoscaleSettings {
|
|||
|
/* Represents maximum throughput, the resource can scale up to. */
|
|||
|
maxThroughput: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface Capability {
|
|||
|
/* Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". */
|
|||
|
name: string;
|
|||
|
}
|
|||
|
|
|||
|
/* Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */
|
|||
|
type Tags = { [key: string]: string };
|
|||
|
export interface ManagedServiceIdentity {
|
|||
|
/* The principal id of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|||
|
readonly principalId: string;
|
|||
|
/* The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. */
|
|||
|
readonly tenantId: string;
|
|||
|
/* The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */
|
|||
|
type: string;
|
|||
|
}
|
|||
|
|
|||
|
/* The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. */
|
|||
|
type ProvisioningState = string;
|
|||
|
|
|||
|
/* Array of IpAddressOrRange objects. */
|
|||
|
type IPRules = IpAddressOrRange[];
|
|||
|
export interface IpAddressOrRange {
|
|||
|
/* A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. */
|
|||
|
ipAddressOrRange: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface VirtualNetworkRule {
|
|||
|
/* Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. */
|
|||
|
id: string;
|
|||
|
/* Create firewall rule before the virtual network has vnet service endpoint enabled. */
|
|||
|
ignoreMissingVNetServiceEndpoint: boolean;
|
|||
|
}
|
|||
|
|
|||
|
export type PrivateEndpointConnection = unknown & {
|
|||
|
/* Resource properties. */
|
|||
|
properties: PrivateEndpointConnectionProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface PrivateEndpointConnectionProperties {
|
|||
|
/* Private endpoint which the connection belongs to. */
|
|||
|
privateEndpoint: PrivateEndpointProperty;
|
|||
|
|
|||
|
/* Connection State of the Private Endpoint Connection. */
|
|||
|
privateLinkServiceConnectionState: PrivateLinkServiceConnectionStateProperty;
|
|||
|
}
|
|||
|
|
|||
|
export interface PrivateEndpointProperty {
|
|||
|
/* Resource id of the private endpoint. */
|
|||
|
id: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface PrivateLinkServiceConnectionStateProperty {
|
|||
|
/* The private link service connection status. */
|
|||
|
status: string;
|
|||
|
/* Any action that is required beyond basic workflow (approve/ reject/ disconnect) */
|
|||
|
readonly actionsRequired: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface Operation {
|
|||
|
/* Operation name: {provider}/{resource}/{operation} */
|
|||
|
name: string;
|
|||
|
/* The object that represents the operation. */
|
|||
|
display: undefined;
|
|||
|
}
|
|||
|
|
|||
|
export interface OperationListResult {
|
|||
|
/* List of operations supported by the Resource Provider. */
|
|||
|
value: Operation[];
|
|||
|
|
|||
|
/* URL to get the next set of operation list results if there are any. */
|
|||
|
nextLink: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface UsagesResult {
|
|||
|
/* The list of usages for the database. A usage is a point in time metric */
|
|||
|
readonly value: Usage[];
|
|||
|
}
|
|||
|
|
|||
|
export interface Usage {
|
|||
|
/* The unit of the metric. */
|
|||
|
unit: UnitType;
|
|||
|
|
|||
|
/* The name information for the metric. */
|
|||
|
readonly name: MetricName;
|
|||
|
|
|||
|
/* The quota period used to summarize the usage values. */
|
|||
|
readonly quotaPeriod: string;
|
|||
|
/* Maximum value for this metric */
|
|||
|
readonly limit: number;
|
|||
|
/* Current value for this metric */
|
|||
|
readonly currentValue: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface PartitionUsagesResult {
|
|||
|
/* The list of partition-level usages for the database. A usage is a point in time metric */
|
|||
|
readonly value: PartitionUsage[];
|
|||
|
}
|
|||
|
|
|||
|
export type PartitionUsage = Usage & {
|
|||
|
/* The partition id (GUID identifier) of the usages. */
|
|||
|
readonly partitionId: string;
|
|||
|
/* The partition key range id (integer identifier) of the usages. */
|
|||
|
readonly partitionKeyRangeId: string;
|
|||
|
};
|
|||
|
|
|||
|
export interface MetricDefinitionsListResult {
|
|||
|
/* The list of metric definitions for the account. */
|
|||
|
readonly value: MetricDefinition[];
|
|||
|
}
|
|||
|
|
|||
|
export interface MetricDefinition {
|
|||
|
/* The list of metric availabilities for the account. */
|
|||
|
readonly metricAvailabilities: MetricAvailability[];
|
|||
|
|
|||
|
/* The primary aggregation type of the metric. */
|
|||
|
readonly primaryAggregationType: string;
|
|||
|
/* The unit of the metric. */
|
|||
|
unit: UnitType;
|
|||
|
|
|||
|
/* The resource uri of the database. */
|
|||
|
readonly resourceUri: string;
|
|||
|
/* The name information for the metric. */
|
|||
|
readonly name: MetricName;
|
|||
|
}
|
|||
|
|
|||
|
export interface MetricAvailability {
|
|||
|
/* The time grain to be used to summarize the metric values. */
|
|||
|
readonly timeGrain: string;
|
|||
|
/* The retention for the metric values. */
|
|||
|
readonly retention: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface MetricListResult {
|
|||
|
/* The list of metrics for the account. */
|
|||
|
readonly value: Metric[];
|
|||
|
}
|
|||
|
|
|||
|
export interface Metric {
|
|||
|
/* The start time for the metric (ISO-8601 format). */
|
|||
|
readonly startTime: string;
|
|||
|
/* The end time for the metric (ISO-8601 format). */
|
|||
|
readonly endTime: string;
|
|||
|
/* The time grain to be used to summarize the metric values. */
|
|||
|
readonly timeGrain: string;
|
|||
|
/* The unit of the metric. */
|
|||
|
unit: UnitType;
|
|||
|
|
|||
|
/* The name information for the metric. */
|
|||
|
readonly name: MetricName;
|
|||
|
|
|||
|
/* The metric values for the specified time window and timestep. */
|
|||
|
readonly metricValues: MetricValue[];
|
|||
|
}
|
|||
|
|
|||
|
export interface MetricName {
|
|||
|
/* The name of the metric. */
|
|||
|
readonly value: string;
|
|||
|
/* The friendly name of the metric. */
|
|||
|
readonly localizedValue: string;
|
|||
|
}
|
|||
|
|
|||
|
export interface MetricValue {
|
|||
|
/* The number of values for the metric. */
|
|||
|
readonly _count: number;
|
|||
|
/* The average value of the metric. */
|
|||
|
readonly average: number;
|
|||
|
/* The max value of the metric. */
|
|||
|
readonly maximum: number;
|
|||
|
/* The min value of the metric. */
|
|||
|
readonly minimum: number;
|
|||
|
/* The metric timestamp (ISO-8601 format). */
|
|||
|
readonly timestamp: string;
|
|||
|
/* The total value of the metric. */
|
|||
|
readonly total: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface PercentileMetricListResult {
|
|||
|
/* The list of percentile metrics for the account. */
|
|||
|
readonly value: PercentileMetric[];
|
|||
|
}
|
|||
|
|
|||
|
export interface PercentileMetric {
|
|||
|
/* The start time for the metric (ISO-8601 format). */
|
|||
|
readonly startTime: string;
|
|||
|
/* The end time for the metric (ISO-8601 format). */
|
|||
|
readonly endTime: string;
|
|||
|
/* The time grain to be used to summarize the metric values. */
|
|||
|
readonly timeGrain: string;
|
|||
|
/* The unit of the metric. */
|
|||
|
unit: UnitType;
|
|||
|
|
|||
|
/* The name information for the metric. */
|
|||
|
readonly name: MetricName;
|
|||
|
|
|||
|
/* The percentile metric values for the specified time window and timestep. */
|
|||
|
readonly metricValues: PercentileMetricValue[];
|
|||
|
}
|
|||
|
|
|||
|
export type PercentileMetricValue = MetricValue & {
|
|||
|
/* The 10th percentile value for the metric. */
|
|||
|
readonly P10: number;
|
|||
|
/* The 25th percentile value for the metric. */
|
|||
|
readonly P25: number;
|
|||
|
/* The 50th percentile value for the metric. */
|
|||
|
readonly P50: number;
|
|||
|
/* The 75th percentile value for the metric. */
|
|||
|
readonly P75: number;
|
|||
|
/* The 90th percentile value for the metric. */
|
|||
|
readonly P90: number;
|
|||
|
/* The 95th percentile value for the metric. */
|
|||
|
readonly P95: number;
|
|||
|
/* The 99th percentile value for the metric. */
|
|||
|
readonly P99: number;
|
|||
|
};
|
|||
|
|
|||
|
export interface PartitionMetricListResult {
|
|||
|
/* The list of partition-level metrics for the account. */
|
|||
|
readonly value: PartitionMetric[];
|
|||
|
}
|
|||
|
|
|||
|
export type PartitionMetric = Metric & {
|
|||
|
/* The partition id (GUID identifier) of the metric values. */
|
|||
|
readonly partitionId: string;
|
|||
|
/* The partition key range id (integer identifier) of the metric values. */
|
|||
|
readonly partitionKeyRangeId: string;
|
|||
|
};
|
|||
|
|
|||
|
/* The unit of the metric. */
|
|||
|
type UnitType = "Count" | "Bytes" | "Seconds" | "Percent" | "CountPerSecond" | "BytesPerSecond" | "Milliseconds";
|
|||
|
|
|||
|
/* The cassandra connector offer type for the Cosmos DB C* database account. */
|
|||
|
type ConnectorOffer = "Small";
|
|||
|
|
|||
|
/* Whether requests from Public Network are allowed */
|
|||
|
type PublicNetworkAccess = "Enabled" | "Disabled";
|
|||
|
export interface ApiProperties {
|
|||
|
/* Describes the ServerVersion of an a MongoDB account. */
|
|||
|
serverVersion: string;
|
|||
|
}
|
|||
|
|
|||
|
/* Enum to indicate the mode of account creation. */
|
|||
|
type CreateMode = "Default" | "Restore";
|
|||
|
export interface RestoreParameters {
|
|||
|
/* Describes the mode of the restore. */
|
|||
|
restoreMode: string;
|
|||
|
/* Path of the source account from which the restore has to be initiated */
|
|||
|
restoreSource: string;
|
|||
|
/* Time to which the account has to be restored (ISO-8601 format). */
|
|||
|
restoreTimestampInUtc: string;
|
|||
|
/* List of specific databases to restore. */
|
|||
|
databasesToRestore: DatabaseRestoreResource[];
|
|||
|
}
|
|||
|
|
|||
|
export interface DatabaseRestoreResource {
|
|||
|
/* The name of the database to restore. */
|
|||
|
databaseName: string;
|
|||
|
/* The names of the collections to restore. */
|
|||
|
collectionNames: CollectionName[];
|
|||
|
}
|
|||
|
|
|||
|
/* The name of the collection. */
|
|||
|
type CollectionName = string;
|
|||
|
export interface BackupPolicy {
|
|||
|
/* Describes the mode of backups. */
|
|||
|
type: string;
|
|||
|
}
|
|||
|
|
|||
|
export type PeriodicModeBackupPolicy = BackupPolicy & {
|
|||
|
/* Configuration values for periodic mode backup */
|
|||
|
periodicModeProperties: PeriodicModeProperties;
|
|||
|
};
|
|||
|
|
|||
|
/* The object representing continuous mode backup policy. */
|
|||
|
type ContinuousModeBackupPolicy = BackupPolicy;
|
|||
|
export interface PeriodicModeProperties {
|
|||
|
/* An integer representing the interval in minutes between two backups */
|
|||
|
backupIntervalInMinutes: number;
|
|||
|
/* An integer representing the time (in hours) that each backup is retained */
|
|||
|
backupRetentionIntervalInHours: number;
|
|||
|
}
|
|||
|
|
|||
|
export interface RestorableDatabaseAccountsListResult {
|
|||
|
/* List of restorable database accounts and their properties. */
|
|||
|
readonly value: RestorableDatabaseAccountGetResult[];
|
|||
|
}
|
|||
|
|
|||
|
export type RestorableDatabaseAccountGetResult = ARMResourceProperties & {
|
|||
|
/* The properties of a restorable database account. */
|
|||
|
properties: RestorableDatabaseAccountProperties;
|
|||
|
};
|
|||
|
|
|||
|
export interface RestorableDatabaseAccountProperties {
|
|||
|
/* The name of the global database account */
|
|||
|
accountName: string;
|
|||
|
/* The creation time of the restorable database account (ISO-8601 format). */
|
|||
|
creationTime: string;
|
|||
|
/* The time at which the restorable database account has been deleted (ISO-8601 format). */
|
|||
|
deletionTime: string;
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the properties of an existing Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_Get(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<DatabaseAccountGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Updates the properties of an existing Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_Update(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: DatabaseAccountUpdateParameters
|
|||
|
): Promise<DatabaseAccountGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`,
|
|||
|
{ method: "patch", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. */
|
|||
|
export async function DatabaseAccounts_CreateOrUpdate(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: DatabaseAccountCreateUpdateParameters
|
|||
|
): Promise<DatabaseAccountGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_Delete(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. */
|
|||
|
export async function DatabaseAccounts_FailoverPriorityChange(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: FailoverPolicies
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/failoverPriorityChange`,
|
|||
|
{ method: "post", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists all the Azure Cosmos DB database accounts available under the subscription. */
|
|||
|
export async function DatabaseAccounts_List(subscriptionId: string): Promise<DatabaseAccountsListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists all the Azure Cosmos DB database accounts available under the given resource group. */
|
|||
|
export async function DatabaseAccounts_ListByResourceGroup(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string
|
|||
|
): Promise<DatabaseAccountsListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the access keys for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_ListKeys(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<DatabaseAccountListKeysResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listKeys`,
|
|||
|
{ method: "post" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the connection strings for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_ListConnectionStrings(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<DatabaseAccountListConnectionStringsResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listConnectionStrings`,
|
|||
|
{ method: "post" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Offline the specified region for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_OfflineRegion(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: RegionForOnlineOffline
|
|||
|
): Promise<void | void | ErrorResponse> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/offlineRegion`,
|
|||
|
{ method: "post", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Online the specified region for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_OnlineRegion(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: RegionForOnlineOffline
|
|||
|
): Promise<void | void | ErrorResponse> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/onlineRegion`,
|
|||
|
{ method: "post", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the read-only access keys for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_GetReadOnlyKeys(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<DatabaseAccountListReadOnlyKeysResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the read-only access keys for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_ListReadOnlyKeys(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<DatabaseAccountListReadOnlyKeysResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`,
|
|||
|
{ method: "post" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Regenerates an access key for the specified Azure Cosmos DB database account. */
|
|||
|
export async function DatabaseAccounts_RegenerateKey(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
body: DatabaseAccountRegenerateKeyParameters
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/regenerateKey`,
|
|||
|
{ method: "post", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. */
|
|||
|
export async function DatabaseAccounts_CheckNameExists(accountName: string): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(`https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/${accountName}`, {
|
|||
|
method: "head"
|
|||
|
})
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists all of the available Cosmos DB Resource Provider operations. */
|
|||
|
export async function Operations_List(): Promise<OperationListResult> {
|
|||
|
return window
|
|||
|
.fetch(`https://management.azure.com/providers/Microsoft.DocumentDB/operations`, { method: "get" })
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account. */
|
|||
|
export async function DatabaseAccounts_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<MetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account and database. */
|
|||
|
export async function Database_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string
|
|||
|
): Promise<MetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account and collection. */
|
|||
|
export async function Collection_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<MetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account, collection and region. */
|
|||
|
export async function CollectionRegion_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
region: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<MetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account and region. */
|
|||
|
export async function DatabaseAccountRegion_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
region: string
|
|||
|
): Promise<MetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data */
|
|||
|
export async function PercentileSourceTarget_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
sourceRegion: string,
|
|||
|
targetRegion: string
|
|||
|
): Promise<PercentileMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sourceRegion/${sourceRegion}/targetRegion/${targetRegion}/percentile/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data */
|
|||
|
export async function PercentileTarget_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
targetRegion: string
|
|||
|
): Promise<PercentileMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/targetRegion/${targetRegion}/percentile/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data */
|
|||
|
export async function Percentile_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<PercentileMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/percentile/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given collection and region, split by partition. */
|
|||
|
export async function CollectionPartitionRegion_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
region: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<PartitionMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given collection, split by partition. */
|
|||
|
export async function CollectionPartition_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<PartitionMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given partition key range id. */
|
|||
|
export async function PartitionKeyRangeId_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string,
|
|||
|
partitionKeyRangeId: string
|
|||
|
): Promise<PartitionMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the metrics determined by the given filter for the given partition key range id and region. */
|
|||
|
export async function PartitionKeyRangeIdRegion_ListMetrics(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
region: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string,
|
|||
|
partitionKeyRangeId: string
|
|||
|
): Promise<PartitionMetricListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the usages (most recent data) for the given database account. */
|
|||
|
export async function DatabaseAccounts_ListUsages(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<UsagesResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/usages`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the usages (most recent data) for the given database. */
|
|||
|
export async function Database_ListUsages(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string
|
|||
|
): Promise<UsagesResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/usages`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the usages (most recent storage data) for the given collection. */
|
|||
|
export async function Collection_ListUsages(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<UsagesResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/usages`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the usages (most recent storage data) for the given collection, split by partition. */
|
|||
|
export async function CollectionPartition_ListUsages(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<PartitionUsagesResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/usages`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves metric definitions for the given database. */
|
|||
|
export async function Database_ListMetricDefinitions(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string
|
|||
|
): Promise<MetricDefinitionsListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metricDefinitions`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves metric definitions for the given collection. */
|
|||
|
export async function Collection_ListMetricDefinitions(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseRid: string,
|
|||
|
collectionRid: string
|
|||
|
): Promise<MetricDefinitionsListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metricDefinitions`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves metric definitions for the given database account. */
|
|||
|
export async function DatabaseAccounts_ListMetricDefinitions(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<MetricDefinitionsListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metricDefinitions`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the SQL databases under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_ListSqlDatabases(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<SqlDatabaseListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function SqlResources_GetSqlDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<SqlDatabaseGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB SQL database */
|
|||
|
export async function SqlResources_CreateUpdateSqlDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: SqlDatabaseCreateUpdateParameters
|
|||
|
): Promise<SqlDatabaseGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB SQL database. */
|
|||
|
export async function SqlResources_DeleteSqlDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function SqlResources_GetSqlDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB SQL database */
|
|||
|
export async function SqlResources_UpdateSqlDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the SQL container under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_ListSqlContainers(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<SqlContainerListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the SQL container under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_GetSqlContainer(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<SqlContainerGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB SQL container */
|
|||
|
export async function SqlResources_CreateUpdateSqlContainer(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
body: SqlContainerCreateUpdateParameters
|
|||
|
): Promise<SqlContainerGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB SQL container. */
|
|||
|
export async function SqlResources_DeleteSqlContainer(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_GetSqlContainerThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB SQL container */
|
|||
|
export async function SqlResources_UpdateSqlContainerThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_ListSqlStoredProcedures(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<SqlStoredProcedureListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_GetSqlStoredProcedure(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
storedProcedureName: string
|
|||
|
): Promise<SqlStoredProcedureGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB SQL storedProcedure */
|
|||
|
export async function SqlResources_CreateUpdateSqlStoredProcedure(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
storedProcedureName: string,
|
|||
|
body: SqlStoredProcedureCreateUpdateParameters
|
|||
|
): Promise<SqlStoredProcedureGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB SQL storedProcedure. */
|
|||
|
export async function SqlResources_DeleteSqlStoredProcedure(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
storedProcedureName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_ListSqlUserDefinedFunctions(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<SqlUserDefinedFunctionListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_GetSqlUserDefinedFunction(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
userDefinedFunctionName: string
|
|||
|
): Promise<SqlUserDefinedFunctionGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB SQL userDefinedFunction */
|
|||
|
export async function SqlResources_CreateUpdateSqlUserDefinedFunction(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
userDefinedFunctionName: string,
|
|||
|
body: SqlUserDefinedFunctionCreateUpdateParameters
|
|||
|
): Promise<SqlUserDefinedFunctionGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB SQL userDefinedFunction. */
|
|||
|
export async function SqlResources_DeleteSqlUserDefinedFunction(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
userDefinedFunctionName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the SQL trigger under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_ListSqlTriggers(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string
|
|||
|
): Promise<SqlTriggerListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the SQL trigger under an existing Azure Cosmos DB database account. */
|
|||
|
export async function SqlResources_GetSqlTrigger(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
triggerName: string
|
|||
|
): Promise<SqlTriggerGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB SQL trigger */
|
|||
|
export async function SqlResources_CreateUpdateSqlTrigger(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
triggerName: string,
|
|||
|
body: SqlTriggerCreateUpdateParameters
|
|||
|
): Promise<SqlTriggerGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB SQL trigger. */
|
|||
|
export async function SqlResources_DeleteSqlTrigger(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
containerName: string,
|
|||
|
triggerName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the MongoDB databases under an existing Azure Cosmos DB database account. */
|
|||
|
export async function MongoDBResources_ListMongoDBDatabases(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<MongoDBDatabaseListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function MongoDBResources_GetMongoDBDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<MongoDBDatabaseGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or updates Azure Cosmos DB MongoDB database */
|
|||
|
export async function MongoDBResources_CreateUpdateMongoDBDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: MongoDBDatabaseCreateUpdateParameters
|
|||
|
): Promise<MongoDBDatabaseGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB MongoDB database. */
|
|||
|
export async function MongoDBResources_DeleteMongoDBDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function MongoDBResources_GetMongoDBDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of the an Azure Cosmos DB MongoDB database */
|
|||
|
export async function MongoDBResources_UpdateMongoDBDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the MongoDB collection under an existing Azure Cosmos DB database account. */
|
|||
|
export async function MongoDBResources_ListMongoDBCollections(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<MongoDBCollectionListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the MongoDB collection under an existing Azure Cosmos DB database account. */
|
|||
|
export async function MongoDBResources_GetMongoDBCollection(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
collectionName: string
|
|||
|
): Promise<MongoDBCollectionGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB MongoDB Collection */
|
|||
|
export async function MongoDBResources_CreateUpdateMongoDBCollection(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
collectionName: string,
|
|||
|
body: MongoDBCollectionCreateUpdateParameters
|
|||
|
): Promise<MongoDBCollectionGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB MongoDB Collection. */
|
|||
|
export async function MongoDBResources_DeleteMongoDBCollection(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
collectionName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function MongoDBResources_GetMongoDBCollectionThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
collectionName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update the RUs per second of an Azure Cosmos DB MongoDB collection */
|
|||
|
export async function MongoDBResources_UpdateMongoDBCollectionThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
collectionName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the Tables under an existing Azure Cosmos DB database account. */
|
|||
|
export async function TableResources_ListTables(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<TableListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Tables under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function TableResources_GetTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<TableGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB Table */
|
|||
|
export async function TableResources_CreateUpdateTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
tableName: string,
|
|||
|
body: TableCreateUpdateParameters
|
|||
|
): Promise<TableGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB Table. */
|
|||
|
export async function TableResources_DeleteTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function TableResources_GetTableThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB Table */
|
|||
|
export async function TableResources_UpdateTableThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
tableName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. */
|
|||
|
export async function CassandraResources_ListCassandraKeyspaces(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<CassandraKeyspaceListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function CassandraResources_GetCassandraKeyspace(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string
|
|||
|
): Promise<CassandraKeyspaceGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB Cassandra keyspace */
|
|||
|
export async function CassandraResources_CreateUpdateCassandraKeyspace(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
body: CassandraKeyspaceCreateUpdateParameters
|
|||
|
): Promise<CassandraKeyspaceGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB Cassandra keyspace. */
|
|||
|
export async function CassandraResources_DeleteCassandraKeyspace(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function CassandraResources_GetCassandraKeyspaceThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace */
|
|||
|
export async function CassandraResources_UpdateCassandraKeyspaceThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the Cassandra table under an existing Azure Cosmos DB database account. */
|
|||
|
export async function CassandraResources_ListCassandraTables(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string
|
|||
|
): Promise<CassandraTableListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Cassandra table under an existing Azure Cosmos DB database account. */
|
|||
|
export async function CassandraResources_GetCassandraTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<CassandraTableGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB Cassandra Table */
|
|||
|
export async function CassandraResources_CreateUpdateCassandraTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
tableName: string,
|
|||
|
body: CassandraTableCreateUpdateParameters
|
|||
|
): Promise<CassandraTableGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB Cassandra table. */
|
|||
|
export async function CassandraResources_DeleteCassandraTable(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function CassandraResources_GetCassandraTableThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
tableName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB Cassandra table */
|
|||
|
export async function CassandraResources_UpdateCassandraTableThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
keyspaceName: string,
|
|||
|
tableName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the Gremlin databases under an existing Azure Cosmos DB database account. */
|
|||
|
export async function GremlinResources_ListGremlinDatabases(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string
|
|||
|
): Promise<GremlinDatabaseListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function GremlinResources_GetGremlinDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<GremlinDatabaseGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB Gremlin database */
|
|||
|
export async function GremlinResources_CreateUpdateGremlinDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: GremlinDatabaseCreateUpdateParameters
|
|||
|
): Promise<GremlinDatabaseGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB Gremlin database. */
|
|||
|
export async function GremlinResources_DeleteGremlinDatabase(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function GremlinResources_GetGremlinDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB Gremlin database */
|
|||
|
export async function GremlinResources_UpdateGremlinDatabaseThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists the Gremlin graph under an existing Azure Cosmos DB database account. */
|
|||
|
export async function GremlinResources_ListGremlinGraphs(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string
|
|||
|
): Promise<GremlinGraphListResult> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Gremlin graph under an existing Azure Cosmos DB database account. */
|
|||
|
export async function GremlinResources_GetGremlinGraph(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
graphName: string
|
|||
|
): Promise<GremlinGraphGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Create or update an Azure Cosmos DB Gremlin graph */
|
|||
|
export async function GremlinResources_CreateUpdateGremlinGraph(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
graphName: string,
|
|||
|
body: GremlinGraphCreateUpdateParameters
|
|||
|
): Promise<GremlinGraphGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Deletes an existing Azure Cosmos DB Gremlin graph. */
|
|||
|
export async function GremlinResources_DeleteGremlinGraph(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
graphName: string
|
|||
|
): Promise<void | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`,
|
|||
|
{ method: "delete" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. */
|
|||
|
export async function GremlinResources_GetGremlinGraphThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
graphName: string
|
|||
|
): Promise<ThroughputSettingsGetResults> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Update RUs per second of an Azure Cosmos DB Gremlin graph */
|
|||
|
export async function GremlinResources_UpdateGremlinGraphThroughput(
|
|||
|
subscriptionId: string,
|
|||
|
resourceGroupName: string,
|
|||
|
accountName: string,
|
|||
|
databaseName: string,
|
|||
|
graphName: string,
|
|||
|
body: ThroughputSettingsUpdateParameters
|
|||
|
): Promise<ThroughputSettingsGetResults | void> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`,
|
|||
|
{ method: "put", body: JSON.stringify(body) }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. */
|
|||
|
export async function RestorableDatabaseAccounts_ListByLocation(
|
|||
|
subscriptionId: string,
|
|||
|
location: string
|
|||
|
): Promise<RestorableDatabaseAccountsListResult | ErrorResponseUpdatedFormat> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Lists all the restorable Azure Cosmos DB database accounts available under the subscription. */
|
|||
|
export async function RestorableDatabaseAccounts_List(
|
|||
|
subscriptionId: string
|
|||
|
): Promise<RestorableDatabaseAccountsListResult | ErrorResponseUpdatedFormat> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|
|||
|
|
|||
|
/* Retrieves the properties of an existing Azure Cosmos DB restorable database account. */
|
|||
|
export async function RestorableDatabaseAccounts_GetByLocation(
|
|||
|
subscriptionId: string,
|
|||
|
location: string,
|
|||
|
instanceId: string
|
|||
|
): Promise<RestorableDatabaseAccountGetResult | ErrorResponseUpdatedFormat> {
|
|||
|
return window
|
|||
|
.fetch(
|
|||
|
`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts/${instanceId}`,
|
|||
|
{ method: "get" }
|
|||
|
)
|
|||
|
.then(response => response.json());
|
|||
|
}
|