@azure/arm-cosmosdb 16.3.0-alpha.20250718.1 → 16.3.0-alpha.20250721.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cosmosDBManagementClient.js +50 -5
- package/dist/browser/cosmosDBManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +661 -279
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/cassandraClusters.js +85 -89
- package/dist/browser/operations/cassandraClusters.js.map +1 -1
- package/dist/browser/operations/cassandraDataCenters.js +43 -45
- package/dist/browser/operations/cassandraDataCenters.js.map +1 -1
- package/dist/browser/operations/cassandraResources.js +129 -113
- package/dist/browser/operations/cassandraResources.js.map +1 -1
- package/dist/browser/operations/collection.js +28 -79
- package/dist/browser/operations/collection.js.map +1 -1
- package/dist/browser/operations/collectionPartition.js +19 -53
- package/dist/browser/operations/collectionPartition.js.map +1 -1
- package/dist/browser/operations/collectionPartitionRegion.js +10 -27
- package/dist/browser/operations/collectionPartitionRegion.js.map +1 -1
- package/dist/browser/operations/collectionRegion.js +10 -27
- package/dist/browser/operations/collectionRegion.js.map +1 -1
- package/dist/browser/operations/database.js +28 -79
- package/dist/browser/operations/database.js.map +1 -1
- package/dist/browser/operations/databaseAccountRegion.js +10 -27
- package/dist/browser/operations/databaseAccountRegion.js.map +1 -1
- package/dist/browser/operations/databaseAccounts.js +123 -173
- package/dist/browser/operations/databaseAccounts.js.map +1 -1
- package/dist/browser/operations/gremlinResources.js +140 -119
- package/dist/browser/operations/gremlinResources.js.map +1 -1
- package/dist/browser/operations/locations.js +10 -27
- package/dist/browser/operations/locations.js.map +1 -1
- package/dist/browser/operations/mongoDBResources.js +202 -195
- package/dist/browser/operations/mongoDBResources.js.map +1 -1
- package/dist/browser/operations/notebookWorkspaces.js +54 -51
- package/dist/browser/operations/notebookWorkspaces.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/partitionKeyRangeId.js +10 -27
- package/dist/browser/operations/partitionKeyRangeId.js.map +1 -1
- package/dist/browser/operations/partitionKeyRangeIdRegion.js +10 -27
- package/dist/browser/operations/partitionKeyRangeIdRegion.js.map +1 -1
- package/dist/browser/operations/percentile.js +10 -27
- package/dist/browser/operations/percentile.js.map +1 -1
- package/dist/browser/operations/percentileSourceTarget.js +10 -27
- package/dist/browser/operations/percentileSourceTarget.js.map +1 -1
- package/dist/browser/operations/percentileTarget.js +10 -27
- package/dist/browser/operations/percentileTarget.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +32 -39
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +10 -27
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/restorableDatabaseAccounts.js +19 -53
- package/dist/browser/operations/restorableDatabaseAccounts.js.map +1 -1
- package/dist/browser/operations/restorableGremlinDatabases.js +10 -27
- package/dist/browser/operations/restorableGremlinDatabases.js.map +1 -1
- package/dist/browser/operations/restorableGremlinGraphs.js +10 -27
- package/dist/browser/operations/restorableGremlinGraphs.js.map +1 -1
- package/dist/browser/operations/restorableGremlinResources.js +10 -27
- package/dist/browser/operations/restorableGremlinResources.js.map +1 -1
- package/dist/browser/operations/restorableMongodbCollections.js +10 -27
- package/dist/browser/operations/restorableMongodbCollections.js.map +1 -1
- package/dist/browser/operations/restorableMongodbDatabases.js +10 -27
- package/dist/browser/operations/restorableMongodbDatabases.js.map +1 -1
- package/dist/browser/operations/restorableMongodbResources.js +10 -27
- package/dist/browser/operations/restorableMongodbResources.js.map +1 -1
- package/dist/browser/operations/restorableSqlContainers.js +10 -27
- package/dist/browser/operations/restorableSqlContainers.js.map +1 -1
- package/dist/browser/operations/restorableSqlDatabases.js +10 -27
- package/dist/browser/operations/restorableSqlDatabases.js.map +1 -1
- package/dist/browser/operations/restorableSqlResources.js +10 -27
- package/dist/browser/operations/restorableSqlResources.js.map +1 -1
- package/dist/browser/operations/restorableTableResources.js +10 -27
- package/dist/browser/operations/restorableTableResources.js.map +1 -1
- package/dist/browser/operations/restorableTables.js +10 -27
- package/dist/browser/operations/restorableTables.js.map +1 -1
- package/dist/browser/operations/service.js +32 -39
- package/dist/browser/operations/service.js.map +1 -1
- package/dist/browser/operations/sqlResources.js +315 -341
- package/dist/browser/operations/sqlResources.js.map +1 -1
- package/dist/browser/operations/tableResources.js +76 -63
- package/dist/browser/operations/tableResources.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/cosmosDBManagementClient.js +50 -5
- package/dist/commonjs/cosmosDBManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +661 -279
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/cassandraClusters.js +85 -88
- package/dist/commonjs/operations/cassandraClusters.js.map +1 -1
- package/dist/commonjs/operations/cassandraDataCenters.js +43 -44
- package/dist/commonjs/operations/cassandraDataCenters.js.map +1 -1
- package/dist/commonjs/operations/cassandraResources.js +129 -112
- package/dist/commonjs/operations/cassandraResources.js.map +1 -1
- package/dist/commonjs/operations/collection.js +28 -78
- package/dist/commonjs/operations/collection.js.map +1 -1
- package/dist/commonjs/operations/collectionPartition.js +19 -52
- package/dist/commonjs/operations/collectionPartition.js.map +1 -1
- package/dist/commonjs/operations/collectionPartitionRegion.js +10 -26
- package/dist/commonjs/operations/collectionPartitionRegion.js.map +1 -1
- package/dist/commonjs/operations/collectionRegion.js +10 -26
- package/dist/commonjs/operations/collectionRegion.js.map +1 -1
- package/dist/commonjs/operations/database.js +28 -78
- package/dist/commonjs/operations/database.js.map +1 -1
- package/dist/commonjs/operations/databaseAccountRegion.js +10 -26
- package/dist/commonjs/operations/databaseAccountRegion.js.map +1 -1
- package/dist/commonjs/operations/databaseAccounts.js +123 -172
- package/dist/commonjs/operations/databaseAccounts.js.map +1 -1
- package/dist/commonjs/operations/gremlinResources.js +140 -118
- package/dist/commonjs/operations/gremlinResources.js.map +1 -1
- package/dist/commonjs/operations/locations.js +10 -26
- package/dist/commonjs/operations/locations.js.map +1 -1
- package/dist/commonjs/operations/mongoDBResources.js +202 -194
- package/dist/commonjs/operations/mongoDBResources.js.map +1 -1
- package/dist/commonjs/operations/notebookWorkspaces.js +54 -50
- package/dist/commonjs/operations/notebookWorkspaces.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/partitionKeyRangeId.js +10 -26
- package/dist/commonjs/operations/partitionKeyRangeId.js.map +1 -1
- package/dist/commonjs/operations/partitionKeyRangeIdRegion.js +10 -26
- package/dist/commonjs/operations/partitionKeyRangeIdRegion.js.map +1 -1
- package/dist/commonjs/operations/percentile.js +10 -26
- package/dist/commonjs/operations/percentile.js.map +1 -1
- package/dist/commonjs/operations/percentileSourceTarget.js +10 -26
- package/dist/commonjs/operations/percentileSourceTarget.js.map +1 -1
- package/dist/commonjs/operations/percentileTarget.js +10 -26
- package/dist/commonjs/operations/percentileTarget.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +10 -26
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/restorableDatabaseAccounts.js +19 -52
- package/dist/commonjs/operations/restorableDatabaseAccounts.js.map +1 -1
- package/dist/commonjs/operations/restorableGremlinDatabases.js +10 -26
- package/dist/commonjs/operations/restorableGremlinDatabases.js.map +1 -1
- package/dist/commonjs/operations/restorableGremlinGraphs.js +10 -26
- package/dist/commonjs/operations/restorableGremlinGraphs.js.map +1 -1
- package/dist/commonjs/operations/restorableGremlinResources.js +10 -26
- package/dist/commonjs/operations/restorableGremlinResources.js.map +1 -1
- package/dist/commonjs/operations/restorableMongodbCollections.js +10 -26
- package/dist/commonjs/operations/restorableMongodbCollections.js.map +1 -1
- package/dist/commonjs/operations/restorableMongodbDatabases.js +10 -26
- package/dist/commonjs/operations/restorableMongodbDatabases.js.map +1 -1
- package/dist/commonjs/operations/restorableMongodbResources.js +10 -26
- package/dist/commonjs/operations/restorableMongodbResources.js.map +1 -1
- package/dist/commonjs/operations/restorableSqlContainers.js +10 -26
- package/dist/commonjs/operations/restorableSqlContainers.js.map +1 -1
- package/dist/commonjs/operations/restorableSqlDatabases.js +10 -26
- package/dist/commonjs/operations/restorableSqlDatabases.js.map +1 -1
- package/dist/commonjs/operations/restorableSqlResources.js +10 -26
- package/dist/commonjs/operations/restorableSqlResources.js.map +1 -1
- package/dist/commonjs/operations/restorableTableResources.js +10 -26
- package/dist/commonjs/operations/restorableTableResources.js.map +1 -1
- package/dist/commonjs/operations/restorableTables.js +10 -26
- package/dist/commonjs/operations/restorableTables.js.map +1 -1
- package/dist/commonjs/operations/service.js +32 -38
- package/dist/commonjs/operations/service.js.map +1 -1
- package/dist/commonjs/operations/sqlResources.js +315 -340
- package/dist/commonjs/operations/sqlResources.js.map +1 -1
- package/dist/commonjs/operations/tableResources.js +76 -62
- package/dist/commonjs/operations/tableResources.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/esm/cosmosDBManagementClient.js +50 -5
- package/dist/esm/cosmosDBManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +661 -279
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/cassandraClusters.js +85 -89
- package/dist/esm/operations/cassandraClusters.js.map +1 -1
- package/dist/esm/operations/cassandraDataCenters.js +43 -45
- package/dist/esm/operations/cassandraDataCenters.js.map +1 -1
- package/dist/esm/operations/cassandraResources.js +129 -113
- package/dist/esm/operations/cassandraResources.js.map +1 -1
- package/dist/esm/operations/collection.js +28 -79
- package/dist/esm/operations/collection.js.map +1 -1
- package/dist/esm/operations/collectionPartition.js +19 -53
- package/dist/esm/operations/collectionPartition.js.map +1 -1
- package/dist/esm/operations/collectionPartitionRegion.js +10 -27
- package/dist/esm/operations/collectionPartitionRegion.js.map +1 -1
- package/dist/esm/operations/collectionRegion.js +10 -27
- package/dist/esm/operations/collectionRegion.js.map +1 -1
- package/dist/esm/operations/database.js +28 -79
- package/dist/esm/operations/database.js.map +1 -1
- package/dist/esm/operations/databaseAccountRegion.js +10 -27
- package/dist/esm/operations/databaseAccountRegion.js.map +1 -1
- package/dist/esm/operations/databaseAccounts.js +123 -173
- package/dist/esm/operations/databaseAccounts.js.map +1 -1
- package/dist/esm/operations/gremlinResources.js +140 -119
- package/dist/esm/operations/gremlinResources.js.map +1 -1
- package/dist/esm/operations/locations.js +10 -27
- package/dist/esm/operations/locations.js.map +1 -1
- package/dist/esm/operations/mongoDBResources.js +202 -195
- package/dist/esm/operations/mongoDBResources.js.map +1 -1
- package/dist/esm/operations/notebookWorkspaces.js +54 -51
- package/dist/esm/operations/notebookWorkspaces.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/partitionKeyRangeId.js +10 -27
- package/dist/esm/operations/partitionKeyRangeId.js.map +1 -1
- package/dist/esm/operations/partitionKeyRangeIdRegion.js +10 -27
- package/dist/esm/operations/partitionKeyRangeIdRegion.js.map +1 -1
- package/dist/esm/operations/percentile.js +10 -27
- package/dist/esm/operations/percentile.js.map +1 -1
- package/dist/esm/operations/percentileSourceTarget.js +10 -27
- package/dist/esm/operations/percentileSourceTarget.js.map +1 -1
- package/dist/esm/operations/percentileTarget.js +10 -27
- package/dist/esm/operations/percentileTarget.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +32 -39
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +10 -27
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/restorableDatabaseAccounts.js +19 -53
- package/dist/esm/operations/restorableDatabaseAccounts.js.map +1 -1
- package/dist/esm/operations/restorableGremlinDatabases.js +10 -27
- package/dist/esm/operations/restorableGremlinDatabases.js.map +1 -1
- package/dist/esm/operations/restorableGremlinGraphs.js +10 -27
- package/dist/esm/operations/restorableGremlinGraphs.js.map +1 -1
- package/dist/esm/operations/restorableGremlinResources.js +10 -27
- package/dist/esm/operations/restorableGremlinResources.js.map +1 -1
- package/dist/esm/operations/restorableMongodbCollections.js +10 -27
- package/dist/esm/operations/restorableMongodbCollections.js.map +1 -1
- package/dist/esm/operations/restorableMongodbDatabases.js +10 -27
- package/dist/esm/operations/restorableMongodbDatabases.js.map +1 -1
- package/dist/esm/operations/restorableMongodbResources.js +10 -27
- package/dist/esm/operations/restorableMongodbResources.js.map +1 -1
- package/dist/esm/operations/restorableSqlContainers.js +10 -27
- package/dist/esm/operations/restorableSqlContainers.js.map +1 -1
- package/dist/esm/operations/restorableSqlDatabases.js +10 -27
- package/dist/esm/operations/restorableSqlDatabases.js.map +1 -1
- package/dist/esm/operations/restorableSqlResources.js +10 -27
- package/dist/esm/operations/restorableSqlResources.js.map +1 -1
- package/dist/esm/operations/restorableTableResources.js +10 -27
- package/dist/esm/operations/restorableTableResources.js.map +1 -1
- package/dist/esm/operations/restorableTables.js +10 -27
- package/dist/esm/operations/restorableTables.js.map +1 -1
- package/dist/esm/operations/service.js +32 -39
- package/dist/esm/operations/service.js.map +1 -1
- package/dist/esm/operations/sqlResources.js +315 -341
- package/dist/esm/operations/sqlResources.js.map +1 -1
- package/dist/esm/operations/tableResources.js +76 -63
- package/dist/esm/operations/tableResources.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/cosmosDBManagementClient.js +50 -5
- package/dist/react-native/cosmosDBManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +661 -279
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/cassandraClusters.js +85 -89
- package/dist/react-native/operations/cassandraClusters.js.map +1 -1
- package/dist/react-native/operations/cassandraDataCenters.js +43 -45
- package/dist/react-native/operations/cassandraDataCenters.js.map +1 -1
- package/dist/react-native/operations/cassandraResources.js +129 -113
- package/dist/react-native/operations/cassandraResources.js.map +1 -1
- package/dist/react-native/operations/collection.js +28 -79
- package/dist/react-native/operations/collection.js.map +1 -1
- package/dist/react-native/operations/collectionPartition.js +19 -53
- package/dist/react-native/operations/collectionPartition.js.map +1 -1
- package/dist/react-native/operations/collectionPartitionRegion.js +10 -27
- package/dist/react-native/operations/collectionPartitionRegion.js.map +1 -1
- package/dist/react-native/operations/collectionRegion.js +10 -27
- package/dist/react-native/operations/collectionRegion.js.map +1 -1
- package/dist/react-native/operations/database.js +28 -79
- package/dist/react-native/operations/database.js.map +1 -1
- package/dist/react-native/operations/databaseAccountRegion.js +10 -27
- package/dist/react-native/operations/databaseAccountRegion.js.map +1 -1
- package/dist/react-native/operations/databaseAccounts.js +123 -173
- package/dist/react-native/operations/databaseAccounts.js.map +1 -1
- package/dist/react-native/operations/gremlinResources.js +140 -119
- package/dist/react-native/operations/gremlinResources.js.map +1 -1
- package/dist/react-native/operations/locations.js +10 -27
- package/dist/react-native/operations/locations.js.map +1 -1
- package/dist/react-native/operations/mongoDBResources.js +202 -195
- package/dist/react-native/operations/mongoDBResources.js.map +1 -1
- package/dist/react-native/operations/notebookWorkspaces.js +54 -51
- package/dist/react-native/operations/notebookWorkspaces.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/partitionKeyRangeId.js +10 -27
- package/dist/react-native/operations/partitionKeyRangeId.js.map +1 -1
- package/dist/react-native/operations/partitionKeyRangeIdRegion.js +10 -27
- package/dist/react-native/operations/partitionKeyRangeIdRegion.js.map +1 -1
- package/dist/react-native/operations/percentile.js +10 -27
- package/dist/react-native/operations/percentile.js.map +1 -1
- package/dist/react-native/operations/percentileSourceTarget.js +10 -27
- package/dist/react-native/operations/percentileSourceTarget.js.map +1 -1
- package/dist/react-native/operations/percentileTarget.js +10 -27
- package/dist/react-native/operations/percentileTarget.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +32 -39
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +10 -27
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/restorableDatabaseAccounts.js +19 -53
- package/dist/react-native/operations/restorableDatabaseAccounts.js.map +1 -1
- package/dist/react-native/operations/restorableGremlinDatabases.js +10 -27
- package/dist/react-native/operations/restorableGremlinDatabases.js.map +1 -1
- package/dist/react-native/operations/restorableGremlinGraphs.js +10 -27
- package/dist/react-native/operations/restorableGremlinGraphs.js.map +1 -1
- package/dist/react-native/operations/restorableGremlinResources.js +10 -27
- package/dist/react-native/operations/restorableGremlinResources.js.map +1 -1
- package/dist/react-native/operations/restorableMongodbCollections.js +10 -27
- package/dist/react-native/operations/restorableMongodbCollections.js.map +1 -1
- package/dist/react-native/operations/restorableMongodbDatabases.js +10 -27
- package/dist/react-native/operations/restorableMongodbDatabases.js.map +1 -1
- package/dist/react-native/operations/restorableMongodbResources.js +10 -27
- package/dist/react-native/operations/restorableMongodbResources.js.map +1 -1
- package/dist/react-native/operations/restorableSqlContainers.js +10 -27
- package/dist/react-native/operations/restorableSqlContainers.js.map +1 -1
- package/dist/react-native/operations/restorableSqlDatabases.js +10 -27
- package/dist/react-native/operations/restorableSqlDatabases.js.map +1 -1
- package/dist/react-native/operations/restorableSqlResources.js +10 -27
- package/dist/react-native/operations/restorableSqlResources.js.map +1 -1
- package/dist/react-native/operations/restorableTableResources.js +10 -27
- package/dist/react-native/operations/restorableTableResources.js.map +1 -1
- package/dist/react-native/operations/restorableTables.js +10 -27
- package/dist/react-native/operations/restorableTables.js.map +1 -1
- package/dist/react-native/operations/service.js +32 -39
- package/dist/react-native/operations/service.js.map +1 -1
- package/dist/react-native/operations/sqlResources.js +315 -341
- package/dist/react-native/operations/sqlResources.js.map +1 -1
- package/dist/react-native/operations/tableResources.js +76 -63
- package/dist/react-native/operations/tableResources.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
15
15
|
/// <reference lib="esnext.asynciterable" />
|
|
16
16
|
/** Class containing PartitionKeyRangeIdRegion operations. */
|
|
17
17
|
class PartitionKeyRangeIdRegionImpl {
|
|
18
|
+
client;
|
|
18
19
|
/**
|
|
19
20
|
* Initialize a new instance of the class PartitionKeyRangeIdRegion class.
|
|
20
21
|
* @param client Reference to the service client
|
|
@@ -46,39 +47,22 @@ class PartitionKeyRangeIdRegionImpl {
|
|
|
46
47
|
return this;
|
|
47
48
|
},
|
|
48
49
|
byPage: (settings) => {
|
|
49
|
-
if (settings
|
|
50
|
+
if (settings?.maxPageSize) {
|
|
50
51
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
51
52
|
}
|
|
52
53
|
return this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, settings);
|
|
53
54
|
},
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
|
-
listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, _settings) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
yield yield tslib_1.__await(result.value || []);
|
|
61
|
-
});
|
|
57
|
+
async *listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, _settings) {
|
|
58
|
+
let result;
|
|
59
|
+
result = await this._listMetrics(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options);
|
|
60
|
+
yield result.value || [];
|
|
62
61
|
}
|
|
63
|
-
listMetricsPagingAll(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
68
|
-
_c = _f.value;
|
|
69
|
-
_d = false;
|
|
70
|
-
const page = _c;
|
|
71
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
75
|
-
finally {
|
|
76
|
-
try {
|
|
77
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
78
|
-
}
|
|
79
|
-
finally { if (e_1) throw e_1.error; }
|
|
80
|
-
}
|
|
81
|
-
});
|
|
62
|
+
async *listMetricsPagingAll(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options) {
|
|
63
|
+
for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
82
66
|
}
|
|
83
67
|
/**
|
|
84
68
|
* Retrieves the metrics determined by the given filter for the given partition key range id and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partitionKeyRangeIdRegion.js","sourceRoot":"","sources":["../../../src/operations/partitionKeyRangeIdRegion.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;
|
|
1
|
+
{"version":3,"file":"partitionKeyRangeIdRegion.js","sourceRoot":"","sources":["../../../src/operations/partitionKeyRangeIdRegion.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;IAGvB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,mBAA2B,EAC3B,MAAc,EACd,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,qBAAqB,CAC/B,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAA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AAE,wPAAwP;IAC9P,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,mBAAmB;KAC/B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { PartitionKeyRangeIdRegion } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n PartitionMetric,\n PartitionKeyRangeIdRegionListMetricsOptionalParams,\n PartitionKeyRangeIdRegionListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PartitionKeyRangeIdRegion operations. */\nexport class PartitionKeyRangeIdRegionImpl\n implements PartitionKeyRangeIdRegion\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PartitionKeyRangeIdRegion class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PartitionMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PartitionMetric[]> {\n let result: PartitionKeyRangeIdRegionListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): AsyncIterableIterator<PartitionMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): Promise<PartitionKeyRangeIdRegionListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartitionMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.databaseRid,\n Parameters.collectionRid,\n Parameters.region,\n Parameters.partitionKeyRangeId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
15
15
|
/// <reference lib="esnext.asynciterable" />
|
|
16
16
|
/** Class containing Percentile operations. */
|
|
17
17
|
class PercentileImpl {
|
|
18
|
+
client;
|
|
18
19
|
/**
|
|
19
20
|
* Initialize a new instance of the class Percentile class.
|
|
20
21
|
* @param client Reference to the service client
|
|
@@ -42,39 +43,22 @@ class PercentileImpl {
|
|
|
42
43
|
return this;
|
|
43
44
|
},
|
|
44
45
|
byPage: (settings) => {
|
|
45
|
-
if (settings
|
|
46
|
+
if (settings?.maxPageSize) {
|
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
47
48
|
}
|
|
48
49
|
return this.listMetricsPagingPage(resourceGroupName, accountName, filter, options, settings);
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
listMetricsPagingPage(resourceGroupName, accountName, filter, options, _settings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
yield yield tslib_1.__await(result.value || []);
|
|
57
|
-
});
|
|
53
|
+
async *listMetricsPagingPage(resourceGroupName, accountName, filter, options, _settings) {
|
|
54
|
+
let result;
|
|
55
|
+
result = await this._listMetrics(resourceGroupName, accountName, filter, options);
|
|
56
|
+
yield result.value || [];
|
|
58
57
|
}
|
|
59
|
-
listMetricsPagingAll(resourceGroupName, accountName, filter, options) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
64
|
-
_c = _f.value;
|
|
65
|
-
_d = false;
|
|
66
|
-
const page = _c;
|
|
67
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
71
|
-
finally {
|
|
72
|
-
try {
|
|
73
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
74
|
-
}
|
|
75
|
-
finally { if (e_1) throw e_1.error; }
|
|
76
|
-
}
|
|
77
|
-
});
|
|
58
|
+
async *listMetricsPagingAll(resourceGroupName, accountName, filter, options) {
|
|
59
|
+
for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, filter, options)) {
|
|
60
|
+
yield* page;
|
|
61
|
+
}
|
|
78
62
|
}
|
|
79
63
|
/**
|
|
80
64
|
* Retrieves the metrics determined by the given filter for the given database account. This url is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentile.js","sourceRoot":"","sources":["../../../src/operations/percentile.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"percentile.js","sourceRoot":"","sources":["../../../src/operations/percentile.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,OAA6C;QAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,OAAO,CAC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;CACF;AA7GD,wCA6GC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,qJAAqJ;IAC3J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Percentile } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n PercentileMetric,\n PercentileListMetricsOptionalParams,\n PercentileListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Percentile operations. */\nexport class PercentileImpl implements Percentile {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class Percentile class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): Promise<PercentileListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
15
15
|
/// <reference lib="esnext.asynciterable" />
|
|
16
16
|
/** Class containing PercentileSourceTarget operations. */
|
|
17
17
|
class PercentileSourceTargetImpl {
|
|
18
|
+
client;
|
|
18
19
|
/**
|
|
19
20
|
* Initialize a new instance of the class PercentileSourceTarget class.
|
|
20
21
|
* @param client Reference to the service client
|
|
@@ -46,39 +47,22 @@ class PercentileSourceTargetImpl {
|
|
|
46
47
|
return this;
|
|
47
48
|
},
|
|
48
49
|
byPage: (settings) => {
|
|
49
|
-
if (settings
|
|
50
|
+
if (settings?.maxPageSize) {
|
|
50
51
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
51
52
|
}
|
|
52
53
|
return this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, settings);
|
|
53
54
|
},
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
|
-
listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, _settings) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
yield yield tslib_1.__await(result.value || []);
|
|
61
|
-
});
|
|
57
|
+
async *listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, _settings) {
|
|
58
|
+
let result;
|
|
59
|
+
result = await this._listMetrics(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options);
|
|
60
|
+
yield result.value || [];
|
|
62
61
|
}
|
|
63
|
-
listMetricsPagingAll(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
68
|
-
_c = _f.value;
|
|
69
|
-
_d = false;
|
|
70
|
-
const page = _c;
|
|
71
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
75
|
-
finally {
|
|
76
|
-
try {
|
|
77
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
78
|
-
}
|
|
79
|
-
finally { if (e_1) throw e_1.error; }
|
|
80
|
-
}
|
|
81
|
-
});
|
|
62
|
+
async *listMetricsPagingAll(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options) {
|
|
63
|
+
for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
82
66
|
}
|
|
83
67
|
/**
|
|
84
68
|
* Retrieves the metrics determined by the given filter for the given account, source and target
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentileSourceTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileSourceTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;
|
|
1
|
+
{"version":3,"file":"percentileSourceTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileSourceTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IACpB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,MAAc,EACd,OAAyD;QAEzD,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,qBAAqB,CAC/B,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,qBAAqB,CAClC,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,MAAc,EACd,OAAyD,EACzD,SAAwB;QAExB,IAAI,MA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AAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { PercentileSourceTarget } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n PercentileMetric,\n PercentileSourceTargetListMetricsOptionalParams,\n PercentileSourceTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileSourceTarget operations. */\nexport class PercentileSourceTargetImpl implements PercentileSourceTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileSourceTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileSourceTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): Promise<PercentileSourceTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.sourceRegion,\n Parameters.targetRegion,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
15
15
|
/// <reference lib="esnext.asynciterable" />
|
|
16
16
|
/** Class containing PercentileTarget operations. */
|
|
17
17
|
class PercentileTargetImpl {
|
|
18
|
+
client;
|
|
18
19
|
/**
|
|
19
20
|
* Initialize a new instance of the class PercentileTarget class.
|
|
20
21
|
* @param client Reference to the service client
|
|
@@ -44,39 +45,22 @@ class PercentileTargetImpl {
|
|
|
44
45
|
return this;
|
|
45
46
|
},
|
|
46
47
|
byPage: (settings) => {
|
|
47
|
-
if (settings
|
|
48
|
+
if (settings?.maxPageSize) {
|
|
48
49
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
49
50
|
}
|
|
50
51
|
return this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, settings);
|
|
51
52
|
},
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, _settings) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
yield yield tslib_1.__await(result.value || []);
|
|
59
|
-
});
|
|
55
|
+
async *listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, _settings) {
|
|
56
|
+
let result;
|
|
57
|
+
result = await this._listMetrics(resourceGroupName, accountName, targetRegion, filter, options);
|
|
58
|
+
yield result.value || [];
|
|
60
59
|
}
|
|
61
|
-
listMetricsPagingAll(resourceGroupName, accountName, targetRegion, filter, options) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
66
|
-
_c = _f.value;
|
|
67
|
-
_d = false;
|
|
68
|
-
const page = _c;
|
|
69
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
73
|
-
finally {
|
|
74
|
-
try {
|
|
75
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
76
|
-
}
|
|
77
|
-
finally { if (e_1) throw e_1.error; }
|
|
78
|
-
}
|
|
79
|
-
});
|
|
60
|
+
async *listMetricsPagingAll(resourceGroupName, accountName, targetRegion, filter, options) {
|
|
61
|
+
for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options)) {
|
|
62
|
+
yield* page;
|
|
63
|
+
}
|
|
80
64
|
}
|
|
81
65
|
/**
|
|
82
66
|
* Retrieves the metrics determined by the given filter for the given account target region. This url
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentileTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"percentileTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,MAAc,EACd,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,qBAAqB,CAC/B,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,qBAAqB,CAClC,iBAAyB,EACzB,WAAmB,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ACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { PercentileTarget } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n PercentileMetric,\n PercentileTargetListMetricsOptionalParams,\n PercentileTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileTarget operations. */\nexport class PercentileTargetImpl implements PercentileTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): Promise<PercentileTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, targetRegion, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.targetRegion,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
17
17
|
/// <reference lib="esnext.asynciterable" />
|
|
18
18
|
/** Class containing PrivateEndpointConnections operations. */
|
|
19
19
|
class PrivateEndpointConnectionsImpl {
|
|
20
|
+
client;
|
|
20
21
|
/**
|
|
21
22
|
* Initialize a new instance of the class PrivateEndpointConnections class.
|
|
22
23
|
* @param client Reference to the service client
|
|
@@ -40,39 +41,22 @@ class PrivateEndpointConnectionsImpl {
|
|
|
40
41
|
return this;
|
|
41
42
|
},
|
|
42
43
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
44
|
+
if (settings?.maxPageSize) {
|
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
46
|
}
|
|
46
47
|
return this.listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, settings);
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, _settings) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
yield yield tslib_1.__await(result.value || []);
|
|
55
|
-
});
|
|
51
|
+
async *listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, _settings) {
|
|
52
|
+
let result;
|
|
53
|
+
result = await this._listByDatabaseAccount(resourceGroupName, accountName, options);
|
|
54
|
+
yield result.value || [];
|
|
56
55
|
}
|
|
57
|
-
listByDatabaseAccountPagingAll(resourceGroupName, accountName, options) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByDatabaseAccountPagingPage(resourceGroupName, accountName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
62
|
-
_c = _f.value;
|
|
63
|
-
_d = false;
|
|
64
|
-
const page = _c;
|
|
65
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
69
|
-
finally {
|
|
70
|
-
try {
|
|
71
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
72
|
-
}
|
|
73
|
-
finally { if (e_1) throw e_1.error; }
|
|
74
|
-
}
|
|
75
|
-
});
|
|
56
|
+
async *listByDatabaseAccountPagingAll(resourceGroupName, accountName, options) {
|
|
57
|
+
for await (const page of this.listByDatabaseAccountPagingPage(resourceGroupName, accountName, options)) {
|
|
58
|
+
yield* page;
|
|
59
|
+
}
|
|
76
60
|
}
|
|
77
61
|
/**
|
|
78
62
|
* List all private endpoint connections on a Cosmos DB account.
|
|
@@ -111,14 +95,19 @@ class PrivateEndpointConnectionsImpl {
|
|
|
111
95
|
return this.client.sendOperationRequest(args, spec);
|
|
112
96
|
};
|
|
113
97
|
const sendOperationFn = async (args, spec) => {
|
|
114
|
-
var _a;
|
|
115
98
|
let currentRawResponse = undefined;
|
|
116
|
-
const providedCallback =
|
|
99
|
+
const providedCallback = args.options?.onResponse;
|
|
117
100
|
const callback = (rawResponse, flatResponse) => {
|
|
118
101
|
currentRawResponse = rawResponse;
|
|
119
|
-
providedCallback
|
|
102
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
103
|
+
};
|
|
104
|
+
const updatedArgs = {
|
|
105
|
+
...args,
|
|
106
|
+
options: {
|
|
107
|
+
...args.options,
|
|
108
|
+
onResponse: callback,
|
|
109
|
+
},
|
|
120
110
|
};
|
|
121
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
122
111
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
123
112
|
return {
|
|
124
113
|
flatResponse,
|
|
@@ -141,8 +130,8 @@ class PrivateEndpointConnectionsImpl {
|
|
|
141
130
|
spec: createOrUpdateOperationSpec,
|
|
142
131
|
});
|
|
143
132
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
144
|
-
restoreFrom: options
|
|
145
|
-
intervalInMs: options
|
|
133
|
+
restoreFrom: options?.resumeFrom,
|
|
134
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
146
135
|
});
|
|
147
136
|
await poller.poll();
|
|
148
137
|
return poller;
|
|
@@ -171,14 +160,19 @@ class PrivateEndpointConnectionsImpl {
|
|
|
171
160
|
return this.client.sendOperationRequest(args, spec);
|
|
172
161
|
};
|
|
173
162
|
const sendOperationFn = async (args, spec) => {
|
|
174
|
-
var _a;
|
|
175
163
|
let currentRawResponse = undefined;
|
|
176
|
-
const providedCallback =
|
|
164
|
+
const providedCallback = args.options?.onResponse;
|
|
177
165
|
const callback = (rawResponse, flatResponse) => {
|
|
178
166
|
currentRawResponse = rawResponse;
|
|
179
|
-
providedCallback
|
|
167
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
168
|
+
};
|
|
169
|
+
const updatedArgs = {
|
|
170
|
+
...args,
|
|
171
|
+
options: {
|
|
172
|
+
...args.options,
|
|
173
|
+
onResponse: callback,
|
|
174
|
+
},
|
|
180
175
|
};
|
|
181
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
182
176
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
183
177
|
return {
|
|
184
178
|
flatResponse,
|
|
@@ -200,8 +194,8 @@ class PrivateEndpointConnectionsImpl {
|
|
|
200
194
|
spec: deleteOperationSpec,
|
|
201
195
|
});
|
|
202
196
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
203
|
-
restoreFrom: options
|
|
204
|
-
intervalInMs: options
|
|
197
|
+
restoreFrom: options?.resumeFrom,
|
|
198
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
205
199
|
});
|
|
206
200
|
await poller.poll();
|
|
207
201
|
return poller;
|