Documentation ¶
Index ¶
- type APIProperties
- type APIType
- type ARMProxyResource
- type ARMResourceProperties
- type AccountKeyMetadata
- type AnalyticalStorageConfiguration
- type AnalyticalStorageSchemaType
- type AuthenticationMethod
- type AuthenticationMethodLdapProperties
- type AutoUpgradePolicyResource
- type AutoscaleSettings
- type AutoscaleSettingsResource
- type BackupInformation
- type BackupPolicy
- type BackupPolicyClassification
- type BackupPolicyMigrationState
- type BackupPolicyMigrationStatus
- type BackupPolicyType
- type BackupStorageRedundancy
- type Capability
- type Capacity
- type CassandraClusterPublicStatus
- type CassandraClusterPublicStatusDataCentersItem
- type CassandraClustersClient
- func (client *CassandraClustersClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientCreateUpdateResponse], error)
- func (client *CassandraClustersClient) BeginDeallocate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientDeallocateResponse], error)
- func (client *CassandraClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientDeleteResponse], error)
- func (client *CassandraClustersClient) BeginInvokeCommand(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientInvokeCommandResponse], error)
- func (client *CassandraClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientStartResponse], error)
- func (client *CassandraClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraClustersClientUpdateResponse], error)
- func (client *CassandraClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (CassandraClustersClientGetResponse, error)
- func (client *CassandraClustersClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[CassandraClustersClientListByResourceGroupResponse]
- func (client *CassandraClustersClient) NewListBySubscriptionPager(options *CassandraClustersClientListBySubscriptionOptions) *runtime.Pager[CassandraClustersClientListBySubscriptionResponse]
- func (client *CassandraClustersClient) Status(ctx context.Context, resourceGroupName string, clusterName string, ...) (CassandraClustersClientStatusResponse, error)
- type CassandraClustersClientBeginCreateUpdateOptions
- type CassandraClustersClientBeginDeallocateOptions
- type CassandraClustersClientBeginDeleteOptions
- type CassandraClustersClientBeginInvokeCommandOptions
- type CassandraClustersClientBeginStartOptions
- type CassandraClustersClientBeginUpdateOptions
- type CassandraClustersClientCreateUpdateResponse
- type CassandraClustersClientDeallocateResponse
- type CassandraClustersClientDeleteResponse
- type CassandraClustersClientGetOptions
- type CassandraClustersClientGetResponse
- type CassandraClustersClientInvokeCommandResponse
- type CassandraClustersClientListByResourceGroupOptions
- type CassandraClustersClientListByResourceGroupResponse
- type CassandraClustersClientListBySubscriptionOptions
- type CassandraClustersClientListBySubscriptionResponse
- type CassandraClustersClientStartResponse
- type CassandraClustersClientStatusOptions
- type CassandraClustersClientStatusResponse
- type CassandraClustersClientUpdateResponse
- type CassandraDataCentersClient
- func (client *CassandraDataCentersClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraDataCentersClientCreateUpdateResponse], error)
- func (client *CassandraDataCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraDataCentersClientDeleteResponse], error)
- func (client *CassandraDataCentersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[CassandraDataCentersClientUpdateResponse], error)
- func (client *CassandraDataCentersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (CassandraDataCentersClientGetResponse, error)
- func (client *CassandraDataCentersClient) NewListPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[CassandraDataCentersClientListResponse]
- type CassandraDataCentersClientBeginCreateUpdateOptions
- type CassandraDataCentersClientBeginDeleteOptions
- type CassandraDataCentersClientBeginUpdateOptions
- type CassandraDataCentersClientCreateUpdateResponse
- type CassandraDataCentersClientDeleteResponse
- type CassandraDataCentersClientGetOptions
- type CassandraDataCentersClientGetResponse
- type CassandraDataCentersClientListOptions
- type CassandraDataCentersClientListResponse
- type CassandraDataCentersClientUpdateResponse
- type CassandraError
- type CassandraKeyspaceCreateUpdateParameters
- type CassandraKeyspaceCreateUpdateProperties
- type CassandraKeyspaceGetProperties
- type CassandraKeyspaceGetPropertiesOptions
- type CassandraKeyspaceGetPropertiesResource
- type CassandraKeyspaceGetResults
- type CassandraKeyspaceListResult
- type CassandraKeyspaceResource
- type CassandraPartitionKey
- type CassandraResourcesClient
- func (client *CassandraResourcesClient) BeginCreateUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse], ...)
- func (client *CassandraResourcesClient) BeginCreateUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraTableResponse], ...)
- func (client *CassandraResourcesClient) BeginDeleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[CassandraResourcesClientDeleteCassandraKeyspaceResponse], ...)
- func (client *CassandraResourcesClient) BeginDeleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[CassandraResourcesClientDeleteCassandraTableResponse], error)
- func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) BeginMigrateCassandraTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) BeginMigrateCassandraTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) BeginUpdateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) BeginUpdateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *CassandraResourcesClient) GetCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, ...) (CassandraResourcesClientGetCassandraKeyspaceResponse, error)
- func (client *CassandraResourcesClient) GetCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (CassandraResourcesClientGetCassandraKeyspaceThroughputResponse, error)
- func (client *CassandraResourcesClient) GetCassandraTable(ctx context.Context, resourceGroupName string, accountName string, ...) (CassandraResourcesClientGetCassandraTableResponse, error)
- func (client *CassandraResourcesClient) GetCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (CassandraResourcesClientGetCassandraTableThroughputResponse, error)
- func (client *CassandraResourcesClient) NewListCassandraKeyspacesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[CassandraResourcesClientListCassandraKeyspacesResponse]
- func (client *CassandraResourcesClient) NewListCassandraTablesPager(resourceGroupName string, accountName string, keyspaceName string, ...) *runtime.Pager[CassandraResourcesClientListCassandraTablesResponse]
- type CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions
- type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions
- type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions
- type CassandraResourcesClientBeginDeleteCassandraTableOptions
- type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions
- type CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions
- type CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions
- type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions
- type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions
- type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions
- type CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse
- type CassandraResourcesClientCreateUpdateCassandraTableResponse
- type CassandraResourcesClientDeleteCassandraKeyspaceResponse
- type CassandraResourcesClientDeleteCassandraTableResponse
- type CassandraResourcesClientGetCassandraKeyspaceOptions
- type CassandraResourcesClientGetCassandraKeyspaceResponse
- type CassandraResourcesClientGetCassandraKeyspaceThroughputOptions
- type CassandraResourcesClientGetCassandraKeyspaceThroughputResponse
- type CassandraResourcesClientGetCassandraTableOptions
- type CassandraResourcesClientGetCassandraTableResponse
- type CassandraResourcesClientGetCassandraTableThroughputOptions
- type CassandraResourcesClientGetCassandraTableThroughputResponse
- type CassandraResourcesClientListCassandraKeyspacesOptions
- type CassandraResourcesClientListCassandraKeyspacesResponse
- type CassandraResourcesClientListCassandraTablesOptions
- type CassandraResourcesClientListCassandraTablesResponse
- type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse
- type CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse
- type CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse
- type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse
- type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse
- type CassandraResourcesClientUpdateCassandraTableThroughputResponse
- type CassandraSchema
- type CassandraTableCreateUpdateParameters
- type CassandraTableCreateUpdateProperties
- type CassandraTableGetProperties
- type CassandraTableGetPropertiesOptions
- type CassandraTableGetPropertiesResource
- type CassandraTableGetResults
- type CassandraTableListResult
- type CassandraTableResource
- type Certificate
- type ClientEncryptionIncludedPath
- type ClientEncryptionKeyCreateUpdateParameters
- type ClientEncryptionKeyCreateUpdateProperties
- type ClientEncryptionKeyGetProperties
- type ClientEncryptionKeyGetPropertiesResource
- type ClientEncryptionKeyGetResults
- type ClientEncryptionKeyResource
- type ClientEncryptionKeysListResult
- type ClientEncryptionPolicy
- type ClientFactory
- func (c *ClientFactory) NewCassandraClustersClient() *CassandraClustersClient
- func (c *ClientFactory) NewCassandraDataCentersClient() *CassandraDataCentersClient
- func (c *ClientFactory) NewCassandraResourcesClient() *CassandraResourcesClient
- func (c *ClientFactory) NewCollectionClient() *CollectionClient
- func (c *ClientFactory) NewCollectionPartitionClient() *CollectionPartitionClient
- func (c *ClientFactory) NewCollectionPartitionRegionClient() *CollectionPartitionRegionClient
- func (c *ClientFactory) NewCollectionRegionClient() *CollectionRegionClient
- func (c *ClientFactory) NewDatabaseAccountRegionClient() *DatabaseAccountRegionClient
- func (c *ClientFactory) NewDatabaseAccountsClient() *DatabaseAccountsClient
- func (c *ClientFactory) NewDatabaseClient() *DatabaseClient
- func (c *ClientFactory) NewGremlinResourcesClient() *GremlinResourcesClient
- func (c *ClientFactory) NewLocationsClient() *LocationsClient
- func (c *ClientFactory) NewMongoDBResourcesClient() *MongoDBResourcesClient
- func (c *ClientFactory) NewNotebookWorkspacesClient() *NotebookWorkspacesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPartitionKeyRangeIDClient() *PartitionKeyRangeIDClient
- func (c *ClientFactory) NewPartitionKeyRangeIDRegionClient() *PartitionKeyRangeIDRegionClient
- func (c *ClientFactory) NewPercentileClient() *PercentileClient
- func (c *ClientFactory) NewPercentileSourceTargetClient() *PercentileSourceTargetClient
- func (c *ClientFactory) NewPercentileTargetClient() *PercentileTargetClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewRestorableDatabaseAccountsClient() *RestorableDatabaseAccountsClient
- func (c *ClientFactory) NewRestorableGremlinDatabasesClient() *RestorableGremlinDatabasesClient
- func (c *ClientFactory) NewRestorableGremlinGraphsClient() *RestorableGremlinGraphsClient
- func (c *ClientFactory) NewRestorableGremlinResourcesClient() *RestorableGremlinResourcesClient
- func (c *ClientFactory) NewRestorableMongodbCollectionsClient() *RestorableMongodbCollectionsClient
- func (c *ClientFactory) NewRestorableMongodbDatabasesClient() *RestorableMongodbDatabasesClient
- func (c *ClientFactory) NewRestorableMongodbResourcesClient() *RestorableMongodbResourcesClient
- func (c *ClientFactory) NewRestorableSQLContainersClient() *RestorableSQLContainersClient
- func (c *ClientFactory) NewRestorableSQLDatabasesClient() *RestorableSQLDatabasesClient
- func (c *ClientFactory) NewRestorableSQLResourcesClient() *RestorableSQLResourcesClient
- func (c *ClientFactory) NewRestorableTableResourcesClient() *RestorableTableResourcesClient
- func (c *ClientFactory) NewRestorableTablesClient() *RestorableTablesClient
- func (c *ClientFactory) NewSQLResourcesClient() *SQLResourcesClient
- func (c *ClientFactory) NewServiceClient() *ServiceClient
- func (c *ClientFactory) NewTableResourcesClient() *TableResourcesClient
- type ClusterKey
- type ClusterResource
- type ClusterResourceProperties
- type CollectionClient
- func (client *CollectionClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[CollectionClientListMetricDefinitionsResponse]
- func (client *CollectionClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[CollectionClientListMetricsResponse]
- func (client *CollectionClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[CollectionClientListUsagesResponse]
- type CollectionClientListMetricDefinitionsOptions
- type CollectionClientListMetricDefinitionsResponse
- type CollectionClientListMetricsOptions
- type CollectionClientListMetricsResponse
- type CollectionClientListUsagesOptions
- type CollectionClientListUsagesResponse
- type CollectionPartitionClient
- func (client *CollectionPartitionClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[CollectionPartitionClientListMetricsResponse]
- func (client *CollectionPartitionClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[CollectionPartitionClientListUsagesResponse]
- type CollectionPartitionClientListMetricsOptions
- type CollectionPartitionClientListMetricsResponse
- type CollectionPartitionClientListUsagesOptions
- type CollectionPartitionClientListUsagesResponse
- type CollectionPartitionRegionClient
- type CollectionPartitionRegionClientListMetricsOptions
- type CollectionPartitionRegionClientListMetricsResponse
- type CollectionRegionClient
- type CollectionRegionClientListMetricsOptions
- type CollectionRegionClientListMetricsResponse
- type Column
- type CommandOutput
- type CommandPostBody
- type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties
- type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems
- type CompositePath
- type CompositePathSortOrder
- type ComputedProperty
- type ConflictResolutionMode
- type ConflictResolutionPolicy
- type ConnectionError
- type ConnectionState
- type ConnectorOffer
- type ConsistencyPolicy
- type ContainerPartitionKey
- type ContinuousBackupInformation
- type ContinuousBackupRestoreLocation
- type ContinuousModeBackupPolicy
- type ContinuousModeProperties
- type ContinuousTier
- type CorsPolicy
- type CreateMode
- type CreateUpdateOptions
- type CreatedByType
- type DataCenterResource
- type DataCenterResourceProperties
- type DataTransferRegionalServiceResource
- type DataTransferServiceResource
- type DataTransferServiceResourceProperties
- type DataType
- type DatabaseAccountConnectionString
- type DatabaseAccountCreateUpdateParameters
- type DatabaseAccountCreateUpdateProperties
- type DatabaseAccountGetProperties
- type DatabaseAccountGetResults
- type DatabaseAccountKeysMetadata
- type DatabaseAccountKind
- type DatabaseAccountListConnectionStringsResult
- type DatabaseAccountListKeysResult
- type DatabaseAccountListReadOnlyKeysResult
- type DatabaseAccountRegenerateKeyParameters
- type DatabaseAccountRegionClient
- type DatabaseAccountRegionClientListMetricsOptions
- type DatabaseAccountRegionClientListMetricsResponse
- type DatabaseAccountUpdateParameters
- type DatabaseAccountUpdateProperties
- type DatabaseAccountsClient
- func (client *DatabaseAccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientCreateOrUpdateResponse], error)
- func (client *DatabaseAccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientDeleteResponse], error)
- func (client *DatabaseAccountsClient) BeginFailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientFailoverPriorityChangeResponse], error)
- func (client *DatabaseAccountsClient) BeginOfflineRegion(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientOfflineRegionResponse], error)
- func (client *DatabaseAccountsClient) BeginOnlineRegion(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientOnlineRegionResponse], error)
- func (client *DatabaseAccountsClient) BeginRegenerateKey(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientRegenerateKeyResponse], error)
- func (client *DatabaseAccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[DatabaseAccountsClientUpdateResponse], error)
- func (client *DatabaseAccountsClient) CheckNameExists(ctx context.Context, accountName string, ...) (DatabaseAccountsClientCheckNameExistsResponse, error)
- func (client *DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (DatabaseAccountsClientGetResponse, error)
- func (client *DatabaseAccountsClient) GetReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (DatabaseAccountsClientGetReadOnlyKeysResponse, error)
- func (client *DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string, ...) (DatabaseAccountsClientListConnectionStringsResponse, error)
- func (client *DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (DatabaseAccountsClientListKeysResponse, error)
- func (client *DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string, ...) (DatabaseAccountsClientListReadOnlyKeysResponse, error)
- func (client *DatabaseAccountsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DatabaseAccountsClientListByResourceGroupResponse]
- func (client *DatabaseAccountsClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, ...) *runtime.Pager[DatabaseAccountsClientListMetricDefinitionsResponse]
- func (client *DatabaseAccountsClient) NewListMetricsPager(resourceGroupName string, accountName string, filter string, ...) *runtime.Pager[DatabaseAccountsClientListMetricsResponse]
- func (client *DatabaseAccountsClient) NewListPager(options *DatabaseAccountsClientListOptions) *runtime.Pager[DatabaseAccountsClientListResponse]
- func (client *DatabaseAccountsClient) NewListUsagesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[DatabaseAccountsClientListUsagesResponse]
- type DatabaseAccountsClientBeginCreateOrUpdateOptions
- type DatabaseAccountsClientBeginDeleteOptions
- type DatabaseAccountsClientBeginFailoverPriorityChangeOptions
- type DatabaseAccountsClientBeginOfflineRegionOptions
- type DatabaseAccountsClientBeginOnlineRegionOptions
- type DatabaseAccountsClientBeginRegenerateKeyOptions
- type DatabaseAccountsClientBeginUpdateOptions
- type DatabaseAccountsClientCheckNameExistsOptions
- type DatabaseAccountsClientCheckNameExistsResponse
- type DatabaseAccountsClientCreateOrUpdateResponse
- type DatabaseAccountsClientDeleteResponse
- type DatabaseAccountsClientFailoverPriorityChangeResponse
- type DatabaseAccountsClientGetOptions
- type DatabaseAccountsClientGetReadOnlyKeysOptions
- type DatabaseAccountsClientGetReadOnlyKeysResponse
- type DatabaseAccountsClientGetResponse
- type DatabaseAccountsClientListByResourceGroupOptions
- type DatabaseAccountsClientListByResourceGroupResponse
- type DatabaseAccountsClientListConnectionStringsOptions
- type DatabaseAccountsClientListConnectionStringsResponse
- type DatabaseAccountsClientListKeysOptions
- type DatabaseAccountsClientListKeysResponse
- type DatabaseAccountsClientListMetricDefinitionsOptions
- type DatabaseAccountsClientListMetricDefinitionsResponse
- type DatabaseAccountsClientListMetricsOptions
- type DatabaseAccountsClientListMetricsResponse
- type DatabaseAccountsClientListOptions
- type DatabaseAccountsClientListReadOnlyKeysOptions
- type DatabaseAccountsClientListReadOnlyKeysResponse
- type DatabaseAccountsClientListResponse
- type DatabaseAccountsClientListUsagesOptions
- type DatabaseAccountsClientListUsagesResponse
- type DatabaseAccountsClientOfflineRegionResponse
- type DatabaseAccountsClientOnlineRegionResponse
- type DatabaseAccountsClientRegenerateKeyResponse
- type DatabaseAccountsClientUpdateResponse
- type DatabaseAccountsListResult
- type DatabaseClient
- func (client *DatabaseClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[DatabaseClientListMetricDefinitionsResponse]
- func (client *DatabaseClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[DatabaseClientListMetricsResponse]
- func (client *DatabaseClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, ...) *runtime.Pager[DatabaseClientListUsagesResponse]
- type DatabaseClientListMetricDefinitionsOptions
- type DatabaseClientListMetricDefinitionsResponse
- type DatabaseClientListMetricsOptions
- type DatabaseClientListMetricsResponse
- type DatabaseClientListUsagesOptions
- type DatabaseClientListUsagesResponse
- type DatabaseRestoreResource
- type DefaultConsistencyLevel
- type ErrorResponse
- type ExcludedPath
- type ExtendedResourceProperties
- type FailoverPolicies
- type FailoverPolicy
- type GraphAPIComputeRegionalServiceResource
- type GraphAPIComputeServiceResource
- type GraphAPIComputeServiceResourceProperties
- type GremlinDatabaseCreateUpdateParameters
- type GremlinDatabaseCreateUpdateProperties
- type GremlinDatabaseGetProperties
- type GremlinDatabaseGetPropertiesOptions
- type GremlinDatabaseGetPropertiesResource
- type GremlinDatabaseGetResults
- type GremlinDatabaseListResult
- type GremlinDatabaseResource
- type GremlinDatabaseRestoreResource
- type GremlinGraphCreateUpdateParameters
- type GremlinGraphCreateUpdateProperties
- type GremlinGraphGetProperties
- type GremlinGraphGetPropertiesOptions
- type GremlinGraphGetPropertiesResource
- type GremlinGraphGetResults
- type GremlinGraphListResult
- type GremlinGraphResource
- type GremlinResourcesClient
- func (client *GremlinResourcesClient) BeginCreateUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientCreateUpdateGremlinDatabaseResponse], ...)
- func (client *GremlinResourcesClient) BeginCreateUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientCreateUpdateGremlinGraphResponse], error)
- func (client *GremlinResourcesClient) BeginDeleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientDeleteGremlinDatabaseResponse], error)
- func (client *GremlinResourcesClient) BeginDeleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientDeleteGremlinGraphResponse], error)
- func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse], ...)
- func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *GremlinResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *GremlinResourcesClient) BeginUpdateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse], ...)
- func (client *GremlinResourcesClient) BeginUpdateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[GremlinResourcesClientUpdateGremlinGraphThroughputResponse], ...)
- func (client *GremlinResourcesClient) GetGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (GremlinResourcesClientGetGremlinDatabaseResponse, error)
- func (client *GremlinResourcesClient) GetGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (GremlinResourcesClientGetGremlinDatabaseThroughputResponse, error)
- func (client *GremlinResourcesClient) GetGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, ...) (GremlinResourcesClientGetGremlinGraphResponse, error)
- func (client *GremlinResourcesClient) GetGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (GremlinResourcesClientGetGremlinGraphThroughputResponse, error)
- func (client *GremlinResourcesClient) NewListGremlinDatabasesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[GremlinResourcesClientListGremlinDatabasesResponse]
- func (client *GremlinResourcesClient) NewListGremlinGraphsPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[GremlinResourcesClientListGremlinGraphsResponse]
- type GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions
- type GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions
- type GremlinResourcesClientBeginDeleteGremlinDatabaseOptions
- type GremlinResourcesClientBeginDeleteGremlinGraphOptions
- type GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions
- type GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions
- type GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions
- type GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions
- type GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions
- type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions
- type GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions
- type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse
- type GremlinResourcesClientCreateUpdateGremlinGraphResponse
- type GremlinResourcesClientDeleteGremlinDatabaseResponse
- type GremlinResourcesClientDeleteGremlinGraphResponse
- type GremlinResourcesClientGetGremlinDatabaseOptions
- type GremlinResourcesClientGetGremlinDatabaseResponse
- type GremlinResourcesClientGetGremlinDatabaseThroughputOptions
- type GremlinResourcesClientGetGremlinDatabaseThroughputResponse
- type GremlinResourcesClientGetGremlinGraphOptions
- type GremlinResourcesClientGetGremlinGraphResponse
- type GremlinResourcesClientGetGremlinGraphThroughputOptions
- type GremlinResourcesClientGetGremlinGraphThroughputResponse
- type GremlinResourcesClientListGremlinDatabasesOptions
- type GremlinResourcesClientListGremlinDatabasesResponse
- type GremlinResourcesClientListGremlinGraphsOptions
- type GremlinResourcesClientListGremlinGraphsResponse
- type GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse
- type GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse
- type GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse
- type GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse
- type GremlinResourcesClientRetrieveContinuousBackupInformationResponse
- type GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse
- type GremlinResourcesClientUpdateGremlinGraphThroughputResponse
- type IPAddressOrRange
- type IncludedPath
- type IndexKind
- type Indexes
- type IndexingMode
- type IndexingPolicy
- type KeyKind
- type KeyWrapMetadata
- type Kind
- type ListClusters
- type ListDataCenters
- type Location
- type LocationGetResult
- type LocationListResult
- type LocationProperties
- type LocationsClient
- type LocationsClientGetOptions
- type LocationsClientGetResponse
- type LocationsClientListOptions
- type LocationsClientListResponse
- type ManagedCassandraARMResourceProperties
- type ManagedCassandraManagedServiceIdentity
- type ManagedCassandraProvisioningState
- type ManagedCassandraReaperStatus
- type ManagedCassandraResourceIdentityType
- type ManagedServiceIdentity
- type MaterializedViewsBuilderRegionalServiceResource
- type MaterializedViewsBuilderServiceResource
- type MaterializedViewsBuilderServiceResourceProperties
- type Metric
- type MetricAvailability
- type MetricDefinition
- type MetricDefinitionsListResult
- type MetricListResult
- type MetricName
- type MetricValue
- type MinimalTLSVersion
- type MongoDBCollectionCreateUpdateParameters
- type MongoDBCollectionCreateUpdateProperties
- type MongoDBCollectionGetProperties
- type MongoDBCollectionGetPropertiesOptions
- type MongoDBCollectionGetPropertiesResource
- type MongoDBCollectionGetResults
- type MongoDBCollectionListResult
- type MongoDBCollectionResource
- type MongoDBDatabaseCreateUpdateParameters
- type MongoDBDatabaseCreateUpdateProperties
- type MongoDBDatabaseGetProperties
- type MongoDBDatabaseGetPropertiesOptions
- type MongoDBDatabaseGetPropertiesResource
- type MongoDBDatabaseGetResults
- type MongoDBDatabaseListResult
- type MongoDBDatabaseResource
- type MongoDBResourcesClient
- func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse], ...)
- func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse], ...)
- func (client *MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse], ...)
- func (client *MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse], ...)
- func (client *MongoDBResourcesClient) BeginDeleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[MongoDBResourcesClientDeleteMongoDBCollectionResponse], error)
- func (client *MongoDBResourcesClient) BeginDeleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[MongoDBResourcesClientDeleteMongoDBDatabaseResponse], error)
- func (client *MongoDBResourcesClient) BeginDeleteMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[MongoDBResourcesClientDeleteMongoRoleDefinitionResponse], ...)
- func (client *MongoDBResourcesClient) BeginDeleteMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[MongoDBResourcesClientDeleteMongoUserDefinitionResponse], ...)
- func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginUpdateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *MongoDBResourcesClient) BeginUpdateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse], ...)
- func (client *MongoDBResourcesClient) GetMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, ...) (MongoDBResourcesClientGetMongoDBCollectionResponse, error)
- func (client *MongoDBResourcesClient) GetMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (MongoDBResourcesClientGetMongoDBCollectionThroughputResponse, error)
- func (client *MongoDBResourcesClient) GetMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (MongoDBResourcesClientGetMongoDBDatabaseResponse, error)
- func (client *MongoDBResourcesClient) GetMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse, error)
- func (client *MongoDBResourcesClient) GetMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, ...) (MongoDBResourcesClientGetMongoRoleDefinitionResponse, error)
- func (client *MongoDBResourcesClient) GetMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, ...) (MongoDBResourcesClientGetMongoUserDefinitionResponse, error)
- func (client *MongoDBResourcesClient) NewListMongoDBCollectionsPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoDBCollectionsResponse]
- func (client *MongoDBResourcesClient) NewListMongoDBDatabasesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoDBDatabasesResponse]
- func (client *MongoDBResourcesClient) NewListMongoRoleDefinitionsPager(resourceGroupName string, accountName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoRoleDefinitionsResponse]
- func (client *MongoDBResourcesClient) NewListMongoUserDefinitionsPager(resourceGroupName string, accountName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoUserDefinitionsResponse]
- type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions
- type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions
- type MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions
- type MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions
- type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions
- type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions
- type MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions
- type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions
- type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions
- type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions
- type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions
- type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions
- type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions
- type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions
- type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions
- type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse
- type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse
- type MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse
- type MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse
- type MongoDBResourcesClientDeleteMongoDBCollectionResponse
- type MongoDBResourcesClientDeleteMongoDBDatabaseResponse
- type MongoDBResourcesClientDeleteMongoRoleDefinitionResponse
- type MongoDBResourcesClientDeleteMongoUserDefinitionResponse
- type MongoDBResourcesClientGetMongoDBCollectionOptions
- type MongoDBResourcesClientGetMongoDBCollectionResponse
- type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions
- type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse
- type MongoDBResourcesClientGetMongoDBDatabaseOptions
- type MongoDBResourcesClientGetMongoDBDatabaseResponse
- type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions
- type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse
- type MongoDBResourcesClientGetMongoRoleDefinitionOptions
- type MongoDBResourcesClientGetMongoRoleDefinitionResponse
- type MongoDBResourcesClientGetMongoUserDefinitionOptions
- type MongoDBResourcesClientGetMongoUserDefinitionResponse
- type MongoDBResourcesClientListMongoDBCollectionsOptions
- type MongoDBResourcesClientListMongoDBCollectionsResponse
- type MongoDBResourcesClientListMongoDBDatabasesOptions
- type MongoDBResourcesClientListMongoDBDatabasesResponse
- type MongoDBResourcesClientListMongoRoleDefinitionsOptions
- type MongoDBResourcesClientListMongoRoleDefinitionsResponse
- type MongoDBResourcesClientListMongoUserDefinitionsOptions
- type MongoDBResourcesClientListMongoUserDefinitionsResponse
- type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse
- type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse
- type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse
- type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse
- type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse
- type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse
- type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse
- type MongoIndex
- type MongoIndexKeys
- type MongoIndexOptions
- type MongoRoleDefinitionCreateUpdateParameters
- type MongoRoleDefinitionGetResults
- type MongoRoleDefinitionListResult
- type MongoRoleDefinitionResource
- type MongoRoleDefinitionType
- type MongoUserDefinitionCreateUpdateParameters
- type MongoUserDefinitionGetResults
- type MongoUserDefinitionListResult
- type MongoUserDefinitionResource
- type NetworkACLBypass
- type NodeState
- type NodeStatus
- type NotebookWorkspace
- type NotebookWorkspaceConnectionInfoResult
- type NotebookWorkspaceCreateUpdateParameters
- type NotebookWorkspaceListResult
- type NotebookWorkspaceName
- type NotebookWorkspaceProperties
- type NotebookWorkspacesClient
- func (client *NotebookWorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[NotebookWorkspacesClientCreateOrUpdateResponse], error)
- func (client *NotebookWorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[NotebookWorkspacesClientDeleteResponse], error)
- func (client *NotebookWorkspacesClient) BeginRegenerateAuthToken(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[NotebookWorkspacesClientRegenerateAuthTokenResponse], error)
- func (client *NotebookWorkspacesClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[NotebookWorkspacesClientStartResponse], error)
- func (client *NotebookWorkspacesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (NotebookWorkspacesClientGetResponse, error)
- func (client *NotebookWorkspacesClient) ListConnectionInfo(ctx context.Context, resourceGroupName string, accountName string, ...) (NotebookWorkspacesClientListConnectionInfoResponse, error)
- func (client *NotebookWorkspacesClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, ...) *runtime.Pager[NotebookWorkspacesClientListByDatabaseAccountResponse]
- type NotebookWorkspacesClientBeginCreateOrUpdateOptions
- type NotebookWorkspacesClientBeginDeleteOptions
- type NotebookWorkspacesClientBeginRegenerateAuthTokenOptions
- type NotebookWorkspacesClientBeginStartOptions
- type NotebookWorkspacesClientCreateOrUpdateResponse
- type NotebookWorkspacesClientDeleteResponse
- type NotebookWorkspacesClientGetOptions
- type NotebookWorkspacesClientGetResponse
- type NotebookWorkspacesClientListByDatabaseAccountOptions
- type NotebookWorkspacesClientListByDatabaseAccountResponse
- type NotebookWorkspacesClientListConnectionInfoOptions
- type NotebookWorkspacesClientListConnectionInfoResponse
- type NotebookWorkspacesClientRegenerateAuthTokenResponse
- type NotebookWorkspacesClientStartResponse
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationType
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OptionsResource
- type PartitionKeyRangeIDClient
- type PartitionKeyRangeIDClientListMetricsOptions
- type PartitionKeyRangeIDClientListMetricsResponse
- type PartitionKeyRangeIDRegionClient
- type PartitionKeyRangeIDRegionClientListMetricsOptions
- type PartitionKeyRangeIDRegionClientListMetricsResponse
- type PartitionKind
- type PartitionMetric
- type PartitionMetricListResult
- type PartitionUsage
- type PartitionUsagesResult
- type PercentileClient
- type PercentileClientListMetricsOptions
- type PercentileClientListMetricsResponse
- type PercentileMetric
- type PercentileMetricListResult
- type PercentileMetricValue
- type PercentileSourceTargetClient
- type PercentileSourceTargetClientListMetricsOptions
- type PercentileSourceTargetClientListMetricsResponse
- type PercentileTargetClient
- type PercentileTargetClientListMetricsOptions
- type PercentileTargetClientListMetricsResponse
- type PeriodicModeBackupPolicy
- type PeriodicModeProperties
- type Permission
- type PrimaryAggregationType
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByDatabaseAccountResponse]
- type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByDatabaseAccountOptions
- type PrivateEndpointConnectionsClientListByDatabaseAccountResponse
- type PrivateEndpointProperty
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByDatabaseAccountResponse]
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByDatabaseAccountOptions
- type PrivateLinkResourcesClientListByDatabaseAccountResponse
- type PrivateLinkServiceConnectionStateProperty
- type Privilege
- type PrivilegeResource
- type ProxyResource
- type PublicNetworkAccess
- type RegionForOnlineOffline
- type RegionalServiceResource
- type Resource
- type ResourceIdentityType
- type ResourceRestoreParameters
- type RestorableDatabaseAccountGetResult
- type RestorableDatabaseAccountProperties
- type RestorableDatabaseAccountsClient
- func (client *RestorableDatabaseAccountsClient) GetByLocation(ctx context.Context, location string, instanceID string, ...) (RestorableDatabaseAccountsClientGetByLocationResponse, error)
- func (client *RestorableDatabaseAccountsClient) NewListByLocationPager(location string, ...) *runtime.Pager[RestorableDatabaseAccountsClientListByLocationResponse]
- func (client *RestorableDatabaseAccountsClient) NewListPager(options *RestorableDatabaseAccountsClientListOptions) *runtime.Pager[RestorableDatabaseAccountsClientListResponse]
- type RestorableDatabaseAccountsClientGetByLocationOptions
- type RestorableDatabaseAccountsClientGetByLocationResponse
- type RestorableDatabaseAccountsClientListByLocationOptions
- type RestorableDatabaseAccountsClientListByLocationResponse
- type RestorableDatabaseAccountsClientListOptions
- type RestorableDatabaseAccountsClientListResponse
- type RestorableDatabaseAccountsListResult
- type RestorableGremlinDatabaseGetResult
- type RestorableGremlinDatabaseProperties
- type RestorableGremlinDatabasePropertiesResource
- type RestorableGremlinDatabasesClient
- type RestorableGremlinDatabasesClientListOptions
- type RestorableGremlinDatabasesClientListResponse
- type RestorableGremlinDatabasesListResult
- type RestorableGremlinGraphGetResult
- type RestorableGremlinGraphProperties
- type RestorableGremlinGraphPropertiesResource
- type RestorableGremlinGraphsClient
- type RestorableGremlinGraphsClientListOptions
- type RestorableGremlinGraphsClientListResponse
- type RestorableGremlinGraphsListResult
- type RestorableGremlinResourcesClient
- type RestorableGremlinResourcesClientListOptions
- type RestorableGremlinResourcesClientListResponse
- type RestorableGremlinResourcesGetResult
- type RestorableGremlinResourcesListResult
- type RestorableLocationResource
- type RestorableMongodbCollectionGetResult
- type RestorableMongodbCollectionProperties
- type RestorableMongodbCollectionPropertiesResource
- type RestorableMongodbCollectionsClient
- type RestorableMongodbCollectionsClientListOptions
- type RestorableMongodbCollectionsClientListResponse
- type RestorableMongodbCollectionsListResult
- type RestorableMongodbDatabaseGetResult
- type RestorableMongodbDatabaseProperties
- type RestorableMongodbDatabasePropertiesResource
- type RestorableMongodbDatabasesClient
- type RestorableMongodbDatabasesClientListOptions
- type RestorableMongodbDatabasesClientListResponse
- type RestorableMongodbDatabasesListResult
- type RestorableMongodbResourcesClient
- type RestorableMongodbResourcesClientListOptions
- type RestorableMongodbResourcesClientListResponse
- type RestorableMongodbResourcesGetResult
- type RestorableMongodbResourcesListResult
- type RestorableSQLContainerGetResult
- type RestorableSQLContainerProperties
- type RestorableSQLContainerPropertiesResource
- type RestorableSQLContainerPropertiesResourceContainer
- type RestorableSQLContainersClient
- type RestorableSQLContainersClientListOptions
- type RestorableSQLContainersClientListResponse
- type RestorableSQLContainersListResult
- type RestorableSQLDatabaseGetResult
- type RestorableSQLDatabaseProperties
- type RestorableSQLDatabasePropertiesResource
- type RestorableSQLDatabasePropertiesResourceDatabase
- type RestorableSQLDatabasesClient
- type RestorableSQLDatabasesClientListOptions
- type RestorableSQLDatabasesClientListResponse
- type RestorableSQLDatabasesListResult
- type RestorableSQLResourcesClient
- type RestorableSQLResourcesClientListOptions
- type RestorableSQLResourcesClientListResponse
- type RestorableSQLResourcesGetResult
- type RestorableSQLResourcesListResult
- type RestorableTableGetResult
- type RestorableTableProperties
- type RestorableTablePropertiesResource
- type RestorableTableResourcesClient
- type RestorableTableResourcesClientListOptions
- type RestorableTableResourcesClientListResponse
- type RestorableTableResourcesGetResult
- type RestorableTableResourcesListResult
- type RestorableTablesClient
- type RestorableTablesClientListOptions
- type RestorableTablesClientListResponse
- type RestorableTablesListResult
- type RestoreMode
- type RestoreParameters
- type RestoreParametersBase
- type Role
- type RoleDefinitionType
- type SQLContainerCreateUpdateParameters
- type SQLContainerCreateUpdateProperties
- type SQLContainerGetProperties
- type SQLContainerGetPropertiesOptions
- type SQLContainerGetPropertiesResource
- type SQLContainerGetResults
- type SQLContainerListResult
- type SQLContainerResource
- type SQLDatabaseCreateUpdateParameters
- type SQLDatabaseCreateUpdateProperties
- type SQLDatabaseGetProperties
- type SQLDatabaseGetPropertiesOptions
- type SQLDatabaseGetPropertiesResource
- type SQLDatabaseGetResults
- type SQLDatabaseListResult
- type SQLDatabaseResource
- type SQLDedicatedGatewayRegionalServiceResource
- type SQLDedicatedGatewayServiceResource
- type SQLDedicatedGatewayServiceResourceProperties
- type SQLResourcesClient
- func (client *SQLResourcesClient) BeginCreateUpdateClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateClientEncryptionKeyResponse], ...)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLContainerResponse], error)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLDatabaseResponse], error)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse], ...)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse], ...)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLStoredProcedureResponse], ...)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLTriggerResponse], error)
- func (client *SQLResourcesClient) BeginCreateUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse], ...)
- func (client *SQLResourcesClient) BeginDeleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLContainerResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLDatabaseResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLRoleAssignmentResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLRoleDefinitionResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLStoredProcedureResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLTriggerResponse], error)
- func (client *SQLResourcesClient) BeginDeleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientDeleteSQLUserDefinedFunctionResponse], error)
- func (client *SQLResourcesClient) BeginMigrateSQLContainerToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientMigrateSQLContainerToAutoscaleResponse], ...)
- func (client *SQLResourcesClient) BeginMigrateSQLContainerToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse], ...)
- func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *SQLResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientRetrieveContinuousBackupInformationResponse], ...)
- func (client *SQLResourcesClient) BeginUpdateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientUpdateSQLContainerThroughputResponse], error)
- func (client *SQLResourcesClient) BeginUpdateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[SQLResourcesClientUpdateSQLDatabaseThroughputResponse], error)
- func (client *SQLResourcesClient) GetClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetClientEncryptionKeyResponse, error)
- func (client *SQLResourcesClient) GetSQLContainer(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLContainerResponse, error)
- func (client *SQLResourcesClient) GetSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLContainerThroughputResponse, error)
- func (client *SQLResourcesClient) GetSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLDatabaseResponse, error)
- func (client *SQLResourcesClient) GetSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLDatabaseThroughputResponse, error)
- func (client *SQLResourcesClient) GetSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, ...) (SQLResourcesClientGetSQLRoleAssignmentResponse, error)
- func (client *SQLResourcesClient) GetSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, ...) (SQLResourcesClientGetSQLRoleDefinitionResponse, error)
- func (client *SQLResourcesClient) GetSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLStoredProcedureResponse, error)
- func (client *SQLResourcesClient) GetSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLTriggerResponse, error)
- func (client *SQLResourcesClient) GetSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, ...) (SQLResourcesClientGetSQLUserDefinedFunctionResponse, error)
- func (client *SQLResourcesClient) NewListClientEncryptionKeysPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[SQLResourcesClientListClientEncryptionKeysResponse]
- func (client *SQLResourcesClient) NewListSQLContainersPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[SQLResourcesClientListSQLContainersResponse]
- func (client *SQLResourcesClient) NewListSQLDatabasesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[SQLResourcesClientListSQLDatabasesResponse]
- func (client *SQLResourcesClient) NewListSQLRoleAssignmentsPager(resourceGroupName string, accountName string, ...) *runtime.Pager[SQLResourcesClientListSQLRoleAssignmentsResponse]
- func (client *SQLResourcesClient) NewListSQLRoleDefinitionsPager(resourceGroupName string, accountName string, ...) *runtime.Pager[SQLResourcesClientListSQLRoleDefinitionsResponse]
- func (client *SQLResourcesClient) NewListSQLStoredProceduresPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[SQLResourcesClientListSQLStoredProceduresResponse]
- func (client *SQLResourcesClient) NewListSQLTriggersPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[SQLResourcesClientListSQLTriggersResponse]
- func (client *SQLResourcesClient) NewListSQLUserDefinedFunctionsPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[SQLResourcesClientListSQLUserDefinedFunctionsResponse]
- type SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions
- type SQLResourcesClientBeginCreateUpdateSQLContainerOptions
- type SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions
- type SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions
- type SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions
- type SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions
- type SQLResourcesClientBeginCreateUpdateSQLTriggerOptions
- type SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions
- type SQLResourcesClientBeginDeleteSQLContainerOptions
- type SQLResourcesClientBeginDeleteSQLDatabaseOptions
- type SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions
- type SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions
- type SQLResourcesClientBeginDeleteSQLStoredProcedureOptions
- type SQLResourcesClientBeginDeleteSQLTriggerOptions
- type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions
- type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions
- type SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions
- type SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions
- type SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions
- type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions
- type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions
- type SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions
- type SQLResourcesClientCreateUpdateClientEncryptionKeyResponse
- type SQLResourcesClientCreateUpdateSQLContainerResponse
- type SQLResourcesClientCreateUpdateSQLDatabaseResponse
- type SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse
- type SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse
- type SQLResourcesClientCreateUpdateSQLStoredProcedureResponse
- type SQLResourcesClientCreateUpdateSQLTriggerResponse
- type SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse
- type SQLResourcesClientDeleteSQLContainerResponse
- type SQLResourcesClientDeleteSQLDatabaseResponse
- type SQLResourcesClientDeleteSQLRoleAssignmentResponse
- type SQLResourcesClientDeleteSQLRoleDefinitionResponse
- type SQLResourcesClientDeleteSQLStoredProcedureResponse
- type SQLResourcesClientDeleteSQLTriggerResponse
- type SQLResourcesClientDeleteSQLUserDefinedFunctionResponse
- type SQLResourcesClientGetClientEncryptionKeyOptions
- type SQLResourcesClientGetClientEncryptionKeyResponse
- type SQLResourcesClientGetSQLContainerOptions
- type SQLResourcesClientGetSQLContainerResponse
- type SQLResourcesClientGetSQLContainerThroughputOptions
- type SQLResourcesClientGetSQLContainerThroughputResponse
- type SQLResourcesClientGetSQLDatabaseOptions
- type SQLResourcesClientGetSQLDatabaseResponse
- type SQLResourcesClientGetSQLDatabaseThroughputOptions
- type SQLResourcesClientGetSQLDatabaseThroughputResponse
- type SQLResourcesClientGetSQLRoleAssignmentOptions
- type SQLResourcesClientGetSQLRoleAssignmentResponse
- type SQLResourcesClientGetSQLRoleDefinitionOptions
- type SQLResourcesClientGetSQLRoleDefinitionResponse
- type SQLResourcesClientGetSQLStoredProcedureOptions
- type SQLResourcesClientGetSQLStoredProcedureResponse
- type SQLResourcesClientGetSQLTriggerOptions
- type SQLResourcesClientGetSQLTriggerResponse
- type SQLResourcesClientGetSQLUserDefinedFunctionOptions
- type SQLResourcesClientGetSQLUserDefinedFunctionResponse
- type SQLResourcesClientListClientEncryptionKeysOptions
- type SQLResourcesClientListClientEncryptionKeysResponse
- type SQLResourcesClientListSQLContainersOptions
- type SQLResourcesClientListSQLContainersResponse
- type SQLResourcesClientListSQLDatabasesOptions
- type SQLResourcesClientListSQLDatabasesResponse
- type SQLResourcesClientListSQLRoleAssignmentsOptions
- type SQLResourcesClientListSQLRoleAssignmentsResponse
- type SQLResourcesClientListSQLRoleDefinitionsOptions
- type SQLResourcesClientListSQLRoleDefinitionsResponse
- type SQLResourcesClientListSQLStoredProceduresOptions
- type SQLResourcesClientListSQLStoredProceduresResponse
- type SQLResourcesClientListSQLTriggersOptions
- type SQLResourcesClientListSQLTriggersResponse
- type SQLResourcesClientListSQLUserDefinedFunctionsOptions
- type SQLResourcesClientListSQLUserDefinedFunctionsResponse
- type SQLResourcesClientMigrateSQLContainerToAutoscaleResponse
- type SQLResourcesClientMigrateSQLContainerToManualThroughputResponse
- type SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse
- type SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse
- type SQLResourcesClientRetrieveContinuousBackupInformationResponse
- type SQLResourcesClientUpdateSQLContainerThroughputResponse
- type SQLResourcesClientUpdateSQLDatabaseThroughputResponse
- type SQLRoleAssignmentCreateUpdateParameters
- type SQLRoleAssignmentGetResults
- type SQLRoleAssignmentListResult
- type SQLRoleAssignmentResource
- type SQLRoleDefinitionCreateUpdateParameters
- type SQLRoleDefinitionGetResults
- type SQLRoleDefinitionListResult
- type SQLRoleDefinitionResource
- type SQLStoredProcedureCreateUpdateParameters
- type SQLStoredProcedureCreateUpdateProperties
- type SQLStoredProcedureGetProperties
- type SQLStoredProcedureGetPropertiesResource
- type SQLStoredProcedureGetResults
- type SQLStoredProcedureListResult
- type SQLStoredProcedureResource
- type SQLTriggerCreateUpdateParameters
- type SQLTriggerCreateUpdateProperties
- type SQLTriggerGetProperties
- type SQLTriggerGetPropertiesResource
- type SQLTriggerGetResults
- type SQLTriggerListResult
- type SQLTriggerResource
- type SQLUserDefinedFunctionCreateUpdateParameters
- type SQLUserDefinedFunctionCreateUpdateProperties
- type SQLUserDefinedFunctionGetProperties
- type SQLUserDefinedFunctionGetPropertiesResource
- type SQLUserDefinedFunctionGetResults
- type SQLUserDefinedFunctionListResult
- type SQLUserDefinedFunctionResource
- type SeedNode
- type ServerVersion
- type ServiceClient
- func (client *ServiceClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[ServiceClientCreateResponse], error)
- func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[ServiceClientDeleteResponse], error)
- func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, accountName string, ...) (ServiceClientGetResponse, error)
- func (client *ServiceClient) NewListPager(resourceGroupName string, accountName string, ...) *runtime.Pager[ServiceClientListResponse]
- type ServiceClientBeginCreateOptions
- type ServiceClientBeginDeleteOptions
- type ServiceClientCreateResponse
- type ServiceClientDeleteResponse
- type ServiceClientGetOptions
- type ServiceClientGetResponse
- type ServiceClientListOptions
- type ServiceClientListResponse
- type ServiceResource
- type ServiceResourceCreateUpdateParameters
- type ServiceResourceCreateUpdateProperties
- type ServiceResourceListResult
- type ServiceResourceProperties
- type ServiceResourcePropertiesClassification
- type ServiceSize
- type ServiceStatus
- type ServiceType
- type SpatialSpec
- type SpatialType
- type Status
- type SystemData
- type TableCreateUpdateParameters
- type TableCreateUpdateProperties
- type TableGetProperties
- type TableGetPropertiesOptions
- type TableGetPropertiesResource
- type TableGetResults
- type TableListResult
- type TableResource
- type TableResourcesClient
- func (client *TableResourcesClient) BeginCreateUpdateTable(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TableResourcesClientCreateUpdateTableResponse], error)
- func (client *TableResourcesClient) BeginDeleteTable(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TableResourcesClientDeleteTableResponse], error)
- func (client *TableResourcesClient) BeginMigrateTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TableResourcesClientMigrateTableToAutoscaleResponse], error)
- func (client *TableResourcesClient) BeginMigrateTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TableResourcesClientMigrateTableToManualThroughputResponse], ...)
- func (client *TableResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, ...) (...)
- func (client *TableResourcesClient) BeginUpdateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (*runtime.Poller[TableResourcesClientUpdateTableThroughputResponse], error)
- func (client *TableResourcesClient) GetTable(ctx context.Context, resourceGroupName string, accountName string, ...) (TableResourcesClientGetTableResponse, error)
- func (client *TableResourcesClient) GetTableThroughput(ctx context.Context, resourceGroupName string, accountName string, ...) (TableResourcesClientGetTableThroughputResponse, error)
- func (client *TableResourcesClient) NewListTablesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[TableResourcesClientListTablesResponse]
- type TableResourcesClientBeginCreateUpdateTableOptions
- type TableResourcesClientBeginDeleteTableOptions
- type TableResourcesClientBeginMigrateTableToAutoscaleOptions
- type TableResourcesClientBeginMigrateTableToManualThroughputOptions
- type TableResourcesClientBeginRetrieveContinuousBackupInformationOptions
- type TableResourcesClientBeginUpdateTableThroughputOptions
- type TableResourcesClientCreateUpdateTableResponse
- type TableResourcesClientDeleteTableResponse
- type TableResourcesClientGetTableOptions
- type TableResourcesClientGetTableResponse
- type TableResourcesClientGetTableThroughputOptions
- type TableResourcesClientGetTableThroughputResponse
- type TableResourcesClientListTablesOptions
- type TableResourcesClientListTablesResponse
- type TableResourcesClientMigrateTableToAutoscaleResponse
- type TableResourcesClientMigrateTableToManualThroughputResponse
- type TableResourcesClientRetrieveContinuousBackupInformationResponse
- type TableResourcesClientUpdateTableThroughputResponse
- type ThroughputPolicyResource
- type ThroughputSettingsGetProperties
- type ThroughputSettingsGetPropertiesResource
- type ThroughputSettingsGetResults
- type ThroughputSettingsResource
- type ThroughputSettingsUpdateParameters
- type ThroughputSettingsUpdateProperties
- type TriggerOperation
- type TriggerType
- type Type
- type UniqueKey
- type UniqueKeyPolicy
- type UnitType
- type Usage
- type UsagesResult
- type VirtualNetworkRule
Examples ¶
- CassandraClustersClient.BeginCreateUpdate
- CassandraClustersClient.BeginDeallocate
- CassandraClustersClient.BeginDelete
- CassandraClustersClient.BeginInvokeCommand
- CassandraClustersClient.BeginStart
- CassandraClustersClient.BeginUpdate
- CassandraClustersClient.Get
- CassandraClustersClient.NewListByResourceGroupPager
- CassandraClustersClient.NewListBySubscriptionPager
- CassandraClustersClient.Status
- CassandraDataCentersClient.BeginCreateUpdate
- CassandraDataCentersClient.BeginDelete
- CassandraDataCentersClient.BeginUpdate
- CassandraDataCentersClient.Get
- CassandraDataCentersClient.NewListPager
- CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace
- CassandraResourcesClient.BeginCreateUpdateCassandraTable
- CassandraResourcesClient.BeginDeleteCassandraKeyspace
- CassandraResourcesClient.BeginDeleteCassandraTable
- CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale
- CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput
- CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale
- CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput
- CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput
- CassandraResourcesClient.BeginUpdateCassandraTableThroughput
- CassandraResourcesClient.GetCassandraKeyspace
- CassandraResourcesClient.GetCassandraKeyspaceThroughput
- CassandraResourcesClient.GetCassandraTable
- CassandraResourcesClient.GetCassandraTableThroughput
- CassandraResourcesClient.NewListCassandraKeyspacesPager
- CassandraResourcesClient.NewListCassandraTablesPager
- CollectionClient.NewListMetricDefinitionsPager
- CollectionClient.NewListMetricsPager
- CollectionClient.NewListUsagesPager
- CollectionPartitionClient.NewListMetricsPager
- CollectionPartitionClient.NewListUsagesPager
- CollectionPartitionRegionClient.NewListMetricsPager
- CollectionRegionClient.NewListMetricsPager
- DatabaseAccountRegionClient.NewListMetricsPager
- DatabaseAccountsClient.BeginCreateOrUpdate (CosmosDbDatabaseAccountCreateMax)
- DatabaseAccountsClient.BeginCreateOrUpdate (CosmosDbDatabaseAccountCreateMin)
- DatabaseAccountsClient.BeginCreateOrUpdate (CosmosDbRestoreDatabaseAccountCreateUpdateJson)
- DatabaseAccountsClient.BeginDelete
- DatabaseAccountsClient.BeginFailoverPriorityChange
- DatabaseAccountsClient.BeginOfflineRegion
- DatabaseAccountsClient.BeginOnlineRegion
- DatabaseAccountsClient.BeginRegenerateKey
- DatabaseAccountsClient.BeginUpdate
- DatabaseAccountsClient.CheckNameExists
- DatabaseAccountsClient.Get
- DatabaseAccountsClient.GetReadOnlyKeys
- DatabaseAccountsClient.ListConnectionStrings (CosmosDbDatabaseAccountListConnectionStrings)
- DatabaseAccountsClient.ListConnectionStrings (CosmosDbDatabaseAccountListConnectionStringsMongo)
- DatabaseAccountsClient.ListKeys
- DatabaseAccountsClient.NewListByResourceGroupPager
- DatabaseAccountsClient.NewListMetricDefinitionsPager
- DatabaseAccountsClient.NewListMetricsPager
- DatabaseAccountsClient.NewListPager
- DatabaseAccountsClient.NewListUsagesPager
- DatabaseClient.NewListMetricDefinitionsPager
- DatabaseClient.NewListMetricsPager
- DatabaseClient.NewListUsagesPager
- GremlinResourcesClient.BeginCreateUpdateGremlinDatabase
- GremlinResourcesClient.BeginCreateUpdateGremlinGraph
- GremlinResourcesClient.BeginDeleteGremlinDatabase
- GremlinResourcesClient.BeginDeleteGremlinGraph
- GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale
- GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput
- GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale
- GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput
- GremlinResourcesClient.BeginRetrieveContinuousBackupInformation
- GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput
- GremlinResourcesClient.BeginUpdateGremlinGraphThroughput
- GremlinResourcesClient.GetGremlinDatabase
- GremlinResourcesClient.GetGremlinDatabaseThroughput
- GremlinResourcesClient.GetGremlinGraph
- GremlinResourcesClient.GetGremlinGraphThroughput
- GremlinResourcesClient.NewListGremlinDatabasesPager
- GremlinResourcesClient.NewListGremlinGraphsPager
- LocationsClient.Get
- LocationsClient.NewListPager
- MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection
- MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase
- MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition
- MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition
- MongoDBResourcesClient.BeginDeleteMongoDBCollection
- MongoDBResourcesClient.BeginDeleteMongoDBDatabase
- MongoDBResourcesClient.BeginDeleteMongoRoleDefinition
- MongoDBResourcesClient.BeginDeleteMongoUserDefinition
- MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale
- MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput
- MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale
- MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput
- MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation
- MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput
- MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput
- MongoDBResourcesClient.GetMongoDBCollection
- MongoDBResourcesClient.GetMongoDBCollectionThroughput
- MongoDBResourcesClient.GetMongoDBDatabase
- MongoDBResourcesClient.GetMongoDBDatabaseThroughput
- MongoDBResourcesClient.GetMongoRoleDefinition
- MongoDBResourcesClient.GetMongoUserDefinition
- MongoDBResourcesClient.NewListMongoDBCollectionsPager
- MongoDBResourcesClient.NewListMongoDBDatabasesPager
- MongoDBResourcesClient.NewListMongoRoleDefinitionsPager
- MongoDBResourcesClient.NewListMongoUserDefinitionsPager
- NotebookWorkspacesClient.BeginCreateOrUpdate
- NotebookWorkspacesClient.BeginDelete
- NotebookWorkspacesClient.BeginRegenerateAuthToken
- NotebookWorkspacesClient.BeginStart
- NotebookWorkspacesClient.Get
- NotebookWorkspacesClient.ListConnectionInfo
- NotebookWorkspacesClient.NewListByDatabaseAccountPager
- OperationsClient.NewListPager
- PartitionKeyRangeIDClient.NewListMetricsPager
- PartitionKeyRangeIDRegionClient.NewListMetricsPager
- PercentileClient.NewListMetricsPager
- PercentileSourceTargetClient.NewListMetricsPager
- PercentileTargetClient.NewListMetricsPager
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.NewListByDatabaseAccountPager
- RestorableDatabaseAccountsClient.GetByLocation
- RestorableDatabaseAccountsClient.NewListByLocationPager
- RestorableDatabaseAccountsClient.NewListPager
- RestorableGremlinDatabasesClient.NewListPager
- RestorableGremlinGraphsClient.NewListPager
- RestorableGremlinResourcesClient.NewListPager
- RestorableMongodbCollectionsClient.NewListPager
- RestorableMongodbDatabasesClient.NewListPager
- RestorableMongodbResourcesClient.NewListPager
- RestorableSQLContainersClient.NewListPager
- RestorableSQLDatabasesClient.NewListPager
- RestorableSQLResourcesClient.NewListPager
- RestorableTableResourcesClient.NewListPager
- RestorableTablesClient.NewListPager
- SQLResourcesClient.BeginCreateUpdateClientEncryptionKey
- SQLResourcesClient.BeginCreateUpdateSQLContainer
- SQLResourcesClient.BeginCreateUpdateSQLDatabase
- SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment
- SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition
- SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure
- SQLResourcesClient.BeginCreateUpdateSQLTrigger
- SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction
- SQLResourcesClient.BeginDeleteSQLContainer
- SQLResourcesClient.BeginDeleteSQLDatabase
- SQLResourcesClient.BeginDeleteSQLRoleAssignment
- SQLResourcesClient.BeginDeleteSQLRoleDefinition
- SQLResourcesClient.BeginDeleteSQLStoredProcedure
- SQLResourcesClient.BeginDeleteSQLTrigger
- SQLResourcesClient.BeginDeleteSQLUserDefinedFunction
- SQLResourcesClient.BeginMigrateSQLContainerToAutoscale
- SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput
- SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale
- SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput
- SQLResourcesClient.BeginRetrieveContinuousBackupInformation
- SQLResourcesClient.BeginUpdateSQLContainerThroughput
- SQLResourcesClient.BeginUpdateSQLDatabaseThroughput
- SQLResourcesClient.GetClientEncryptionKey
- SQLResourcesClient.GetSQLContainer
- SQLResourcesClient.GetSQLContainerThroughput
- SQLResourcesClient.GetSQLDatabase
- SQLResourcesClient.GetSQLDatabaseThroughput
- SQLResourcesClient.GetSQLRoleAssignment
- SQLResourcesClient.GetSQLRoleDefinition
- SQLResourcesClient.GetSQLStoredProcedure
- SQLResourcesClient.GetSQLTrigger
- SQLResourcesClient.GetSQLUserDefinedFunction
- SQLResourcesClient.NewListClientEncryptionKeysPager
- SQLResourcesClient.NewListSQLContainersPager
- SQLResourcesClient.NewListSQLDatabasesPager
- SQLResourcesClient.NewListSQLRoleAssignmentsPager
- SQLResourcesClient.NewListSQLRoleDefinitionsPager
- SQLResourcesClient.NewListSQLStoredProceduresPager
- SQLResourcesClient.NewListSQLTriggersPager
- SQLResourcesClient.NewListSQLUserDefinedFunctionsPager
- ServiceClient.BeginCreate (DataTransferServiceCreate)
- ServiceClient.BeginCreate (GraphApiComputeServiceCreate)
- ServiceClient.BeginCreate (MaterializedViewsBuilderServiceCreate)
- ServiceClient.BeginCreate (SqlDedicatedGatewayServiceCreate)
- ServiceClient.BeginDelete (DataTransferServiceDelete)
- ServiceClient.BeginDelete (GraphApiComputeServiceDelete)
- ServiceClient.BeginDelete (MaterializedViewsBuilderServiceDelete)
- ServiceClient.BeginDelete (SqlDedicatedGatewayServiceDelete)
- ServiceClient.Get (DataTransferServiceGet)
- ServiceClient.Get (GraphApiComputeServiceGet)
- ServiceClient.Get (MaterializedViewsBuilderServiceGet)
- ServiceClient.Get (SqlDedicatedGatewayServiceGet)
- ServiceClient.NewListPager
- TableResourcesClient.BeginCreateUpdateTable
- TableResourcesClient.BeginDeleteTable
- TableResourcesClient.BeginMigrateTableToAutoscale
- TableResourcesClient.BeginMigrateTableToManualThroughput
- TableResourcesClient.BeginRetrieveContinuousBackupInformation
- TableResourcesClient.BeginUpdateTableThroughput
- TableResourcesClient.GetTable
- TableResourcesClient.GetTableThroughput
- TableResourcesClient.NewListTablesPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIProperties ¶
type APIProperties struct { // Describes the ServerVersion of an a MongoDB account. ServerVersion *ServerVersion }
func (APIProperties) MarshalJSON ¶
func (a APIProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIProperties.
func (*APIProperties) UnmarshalJSON ¶
func (a *APIProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIProperties.
type APIType ¶
type APIType string
APIType - Enum to indicate the API type of the restorable database account.
func PossibleAPITypeValues ¶
func PossibleAPITypeValues() []APIType
PossibleAPITypeValues returns the possible values for the APIType const type.
type ARMProxyResource ¶
type ARMProxyResource struct { // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ARMProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags
func (ARMProxyResource) MarshalJSON ¶
func (a ARMProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ARMProxyResource.
func (*ARMProxyResource) UnmarshalJSON ¶
func (a *ARMProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ARMProxyResource.
type ARMResourceProperties ¶
type ARMResourceProperties struct { // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ARMResourceProperties - The core properties of ARM resources.
func (ARMResourceProperties) MarshalJSON ¶
func (a ARMResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ARMResourceProperties.
func (*ARMResourceProperties) UnmarshalJSON ¶
func (a *ARMResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ARMResourceProperties.
type AccountKeyMetadata ¶ added in v2.1.0
type AccountKeyMetadata struct { // READ-ONLY; Generation time in UTC of the key in ISO-8601 format. If the value is missing from the object, it means that // the last key regeneration was triggered before 2022-06-18. GenerationTime *time.Time }
AccountKeyMetadata - The metadata related to an access key for a given database account.
func (AccountKeyMetadata) MarshalJSON ¶ added in v2.1.0
func (a AccountKeyMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountKeyMetadata.
func (*AccountKeyMetadata) UnmarshalJSON ¶ added in v2.1.0
func (a *AccountKeyMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyMetadata.
type AnalyticalStorageConfiguration ¶
type AnalyticalStorageConfiguration struct { // Describes the types of schema for analytical storage. SchemaType *AnalyticalStorageSchemaType }
AnalyticalStorageConfiguration - Analytical storage specific properties.
func (AnalyticalStorageConfiguration) MarshalJSON ¶
func (a AnalyticalStorageConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AnalyticalStorageConfiguration.
func (*AnalyticalStorageConfiguration) UnmarshalJSON ¶
func (a *AnalyticalStorageConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AnalyticalStorageConfiguration.
type AnalyticalStorageSchemaType ¶
type AnalyticalStorageSchemaType string
AnalyticalStorageSchemaType - Describes the types of schema for analytical storage.
const ( AnalyticalStorageSchemaTypeFullFidelity AnalyticalStorageSchemaType = "FullFidelity" AnalyticalStorageSchemaTypeWellDefined AnalyticalStorageSchemaType = "WellDefined" )
func PossibleAnalyticalStorageSchemaTypeValues ¶
func PossibleAnalyticalStorageSchemaTypeValues() []AnalyticalStorageSchemaType
PossibleAnalyticalStorageSchemaTypeValues returns the possible values for the AnalyticalStorageSchemaType const type.
type AuthenticationMethod ¶
type AuthenticationMethod string
AuthenticationMethod - Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'.
const ( AuthenticationMethodCassandra AuthenticationMethod = "Cassandra" AuthenticationMethodLdap AuthenticationMethod = "Ldap" AuthenticationMethodNone AuthenticationMethod = "None" )
func PossibleAuthenticationMethodValues ¶
func PossibleAuthenticationMethodValues() []AuthenticationMethod
PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type.
type AuthenticationMethodLdapProperties ¶ added in v2.4.0
type AuthenticationMethodLdapProperties struct { // Timeout for connecting to the LDAP server in miliseconds. The default is 5000 ms. ConnectionTimeoutInMs *int32 // Distinguished name of the object to start the recursive search of users from. SearchBaseDistinguishedName *string // Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login. SearchFilterTemplate *string ServerCertificates []*Certificate // Hostname of the LDAP server. ServerHostname *string // Port of the LDAP server. ServerPort *int32 // Distinguished name of the look up user account, who can look up user details on authentication. ServiceUserDistinguishedName *string // Password of the look up user. ServiceUserPassword *string }
AuthenticationMethodLdapProperties - Ldap authentication method properties. This feature is in preview.
func (AuthenticationMethodLdapProperties) MarshalJSON ¶ added in v2.4.0
func (a AuthenticationMethodLdapProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AuthenticationMethodLdapProperties.
func (*AuthenticationMethodLdapProperties) UnmarshalJSON ¶ added in v2.4.0
func (a *AuthenticationMethodLdapProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationMethodLdapProperties.
type AutoUpgradePolicyResource ¶
type AutoUpgradePolicyResource struct { // Represents throughput policy which service must adhere to for auto-upgrade ThroughputPolicy *ThroughputPolicyResource }
AutoUpgradePolicyResource - Cosmos DB resource auto-upgrade policy
func (AutoUpgradePolicyResource) MarshalJSON ¶
func (a AutoUpgradePolicyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoUpgradePolicyResource.
func (*AutoUpgradePolicyResource) UnmarshalJSON ¶
func (a *AutoUpgradePolicyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoUpgradePolicyResource.
type AutoscaleSettings ¶
type AutoscaleSettings struct { // Represents maximum throughput, the resource can scale up to. MaxThroughput *int32 }
func (AutoscaleSettings) MarshalJSON ¶
func (a AutoscaleSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleSettings.
func (*AutoscaleSettings) UnmarshalJSON ¶
func (a *AutoscaleSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleSettings.
type AutoscaleSettingsResource ¶
type AutoscaleSettingsResource struct { // REQUIRED; Represents maximum throughput container can scale up to. MaxThroughput *int32 // Cosmos DB resource auto-upgrade policy AutoUpgradePolicy *AutoUpgradePolicyResource // READ-ONLY; Represents target maximum throughput container can scale up to once offer is no longer in pending state. TargetMaxThroughput *int32 }
AutoscaleSettingsResource - Cosmos DB provisioned throughput settings object
func (AutoscaleSettingsResource) MarshalJSON ¶
func (a AutoscaleSettingsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleSettingsResource.
func (*AutoscaleSettingsResource) UnmarshalJSON ¶
func (a *AutoscaleSettingsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleSettingsResource.
type BackupInformation ¶
type BackupInformation struct { // READ-ONLY; Information about the status of continuous backups. ContinuousBackupInformation *ContinuousBackupInformation }
BackupInformation - Backup information of a resource.
func (BackupInformation) MarshalJSON ¶
func (b BackupInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupInformation.
func (*BackupInformation) UnmarshalJSON ¶
func (b *BackupInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupInformation.
type BackupPolicy ¶
type BackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState }
BackupPolicy - The object representing the policy for taking backups on an account.
func (*BackupPolicy) GetBackupPolicy ¶
func (b *BackupPolicy) GetBackupPolicy() *BackupPolicy
GetBackupPolicy implements the BackupPolicyClassification interface for type BackupPolicy.
func (BackupPolicy) MarshalJSON ¶
func (b BackupPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupPolicy.
func (*BackupPolicy) UnmarshalJSON ¶
func (b *BackupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicy.
type BackupPolicyClassification ¶
type BackupPolicyClassification interface { // GetBackupPolicy returns the BackupPolicy content of the underlying type. GetBackupPolicy() *BackupPolicy }
BackupPolicyClassification provides polymorphic access to related types. Call the interface's GetBackupPolicy() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BackupPolicy, *ContinuousModeBackupPolicy, *PeriodicModeBackupPolicy
type BackupPolicyMigrationState ¶
type BackupPolicyMigrationState struct { // Time at which the backup policy migration started (ISO-8601 format). StartTime *time.Time // Describes the status of migration between backup policy types. Status *BackupPolicyMigrationStatus // Describes the target backup policy type of the backup policy migration. TargetType *BackupPolicyType }
BackupPolicyMigrationState - The object representing the state of the migration between the backup policies.
func (BackupPolicyMigrationState) MarshalJSON ¶
func (b BackupPolicyMigrationState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupPolicyMigrationState.
func (*BackupPolicyMigrationState) UnmarshalJSON ¶
func (b *BackupPolicyMigrationState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicyMigrationState.
type BackupPolicyMigrationStatus ¶
type BackupPolicyMigrationStatus string
BackupPolicyMigrationStatus - Describes the status of migration between backup policy types.
const ( BackupPolicyMigrationStatusCompleted BackupPolicyMigrationStatus = "Completed" BackupPolicyMigrationStatusFailed BackupPolicyMigrationStatus = "Failed" BackupPolicyMigrationStatusInProgress BackupPolicyMigrationStatus = "InProgress" BackupPolicyMigrationStatusInvalid BackupPolicyMigrationStatus = "Invalid" )
func PossibleBackupPolicyMigrationStatusValues ¶
func PossibleBackupPolicyMigrationStatusValues() []BackupPolicyMigrationStatus
PossibleBackupPolicyMigrationStatusValues returns the possible values for the BackupPolicyMigrationStatus const type.
type BackupPolicyType ¶
type BackupPolicyType string
BackupPolicyType - Describes the mode of backups.
const ( BackupPolicyTypeContinuous BackupPolicyType = "Continuous" BackupPolicyTypePeriodic BackupPolicyType = "Periodic" )
func PossibleBackupPolicyTypeValues ¶
func PossibleBackupPolicyTypeValues() []BackupPolicyType
PossibleBackupPolicyTypeValues returns the possible values for the BackupPolicyType const type.
type BackupStorageRedundancy ¶
type BackupStorageRedundancy string
BackupStorageRedundancy - Enum to indicate type of backup storage redundancy.
const ( BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" )
func PossibleBackupStorageRedundancyValues ¶
func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy
PossibleBackupStorageRedundancyValues returns the possible values for the BackupStorageRedundancy const type.
type Capability ¶
type Capability struct { // Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and // "EnableGremlin". Name *string }
Capability - Cosmos DB capability object
func (Capability) MarshalJSON ¶
func (c Capability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Capability.
func (*Capability) UnmarshalJSON ¶
func (c *Capability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Capability.
type Capacity ¶
type Capacity struct { // The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput // that can be provisioned on that account to be 2000. A totalThroughputLimit of // -1 indicates no limits on provisioning of throughput. TotalThroughputLimit *int32 }
Capacity - The object that represents all properties related to capacity enforcement on an account.
func (Capacity) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Capacity.
func (*Capacity) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Capacity.
type CassandraClusterPublicStatus ¶
type CassandraClusterPublicStatus struct { // List relevant information about any connection errors to the Datacenters. ConnectionErrors []*ConnectionError // List of the status of each datacenter in this cluster. DataCenters []*CassandraClusterPublicStatusDataCentersItem ETag *string // List relevant information about any errors about cluster, data center and connection error. Errors []*CassandraError ReaperStatus *ManagedCassandraReaperStatus }
CassandraClusterPublicStatus - Properties of a managed Cassandra cluster public status.
func (CassandraClusterPublicStatus) MarshalJSON ¶
func (c CassandraClusterPublicStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraClusterPublicStatus.
func (*CassandraClusterPublicStatus) UnmarshalJSON ¶
func (c *CassandraClusterPublicStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraClusterPublicStatus.
type CassandraClusterPublicStatusDataCentersItem ¶
type CassandraClusterPublicStatusDataCentersItem struct { // The name of this Datacenter. Name *string Nodes []*ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems // A list of all seed nodes in the cluster, managed and unmanaged. SeedNodes []*string }
func (CassandraClusterPublicStatusDataCentersItem) MarshalJSON ¶
func (c CassandraClusterPublicStatusDataCentersItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraClusterPublicStatusDataCentersItem.
func (*CassandraClusterPublicStatusDataCentersItem) UnmarshalJSON ¶
func (c *CassandraClusterPublicStatusDataCentersItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraClusterPublicStatusDataCentersItem.
type CassandraClustersClient ¶
type CassandraClustersClient struct {
// contains filtered or unexported fields
}
CassandraClustersClient contains the methods for the CassandraClusters group. Don't use this type directly, use NewCassandraClustersClient() instead.
func NewCassandraClustersClient ¶
func NewCassandraClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraClustersClient, error)
NewCassandraClustersClient creates a new instance of CassandraClustersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CassandraClustersClient) BeginCreateUpdate ¶
func (client *CassandraClustersClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginCreateUpdateOptions) (*runtime.Poller[CassandraClustersClientCreateUpdateResponse], error)
BeginCreateUpdate - Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- body - The properties specifying the desired state of the managed Cassandra cluster.
- options - CassandraClustersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginCreateUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginCreateUpdate(ctx, "cassandra-prod-rg", "cassandra-prod", armcosmos.ClusterResource{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ClusterResourceProperties{ AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), CassandraVersion: to.Ptr("3.11"), ClientCertificates: []*armcosmos.Certificate{ { Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), }}, ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), ExternalGossipCertificates: []*armcosmos.Certificate{ { Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), }}, ExternalSeedNodes: []*armcosmos.SeedNode{ { IPAddress: to.Ptr("10.52.221.2"), }, { IPAddress: to.Ptr("10.52.221.3"), }, { IPAddress: to.Ptr("10.52.221.4"), }}, HoursBetweenBackups: to.Ptr[int32](24), InitialCassandraAdminPassword: to.Ptr("mypassword"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterResource = armcosmos.ClusterResource{ // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ClusterResourceProperties{ // AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), // CassandraVersion: to.Ptr("3.11"), // ClientCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ExternalSeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }}, // GossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // HoursBetweenBackups: to.Ptr[int32](24), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }, // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraClustersClient) BeginDeallocate ¶
func (client *CassandraClustersClient) BeginDeallocate(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeallocateOptions) (*runtime.Poller[CassandraClustersClientDeallocateResponse], error)
BeginDeallocate - Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an already deallocated cluster. Use Start to restart the cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraClustersClientBeginDeallocateOptions contains the optional parameters for the CassandraClustersClient.BeginDeallocate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterDeallocate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginDeallocate(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraClustersClient) BeginDelete ¶
func (client *CassandraClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginDeleteOptions) (*runtime.Poller[CassandraClustersClientDeleteResponse], error)
BeginDelete - Deletes a managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraClustersClientBeginDeleteOptions contains the optional parameters for the CassandraClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginDelete(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraClustersClient) BeginInvokeCommand ¶
func (client *CassandraClustersClient) BeginInvokeCommand(ctx context.Context, resourceGroupName string, clusterName string, body CommandPostBody, options *CassandraClustersClientBeginInvokeCommandOptions) (*runtime.Poller[CassandraClustersClientInvokeCommandResponse], error)
BeginInvokeCommand - Invoke a command like nodetool for cassandra maintenance If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- body - Specification which command to run where
- options - CassandraClustersClientBeginInvokeCommandOptions contains the optional parameters for the CassandraClustersClient.BeginInvokeCommand method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraCommand.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginInvokeCommand(ctx, "cassandra-prod-rg", "cassandra-prod", armcosmos.CommandPostBody{ Command: to.Ptr("nodetool status"), Host: to.Ptr("10.0.1.12"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraClustersClient) BeginStart ¶
func (client *CassandraClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientBeginStartOptions) (*runtime.Poller[CassandraClustersClientStartResponse], error)
BeginStart - Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host virtual machine of this cluster with reserved data disk. This won't do anything on an already running cluster. Use Deallocate to deallocate the cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraClustersClientBeginStartOptions contains the optional parameters for the CassandraClustersClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterStart.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginStart(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraClustersClient) BeginUpdate ¶
func (client *CassandraClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, body ClusterResource, options *CassandraClustersClientBeginUpdateOptions) (*runtime.Poller[CassandraClustersClientUpdateResponse], error)
BeginUpdate - Updates some of the properties of a managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- body - Parameters to provide for specifying the managed Cassandra cluster.
- options - CassandraClustersClientBeginUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterPatch.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraClustersClient().BeginUpdate(ctx, "cassandra-prod-rg", "cassandra-prod", armcosmos.ClusterResource{ Tags: map[string]*string{ "owner": to.Ptr("mike"), }, Properties: &armcosmos.ClusterResourceProperties{ AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodNone), ExternalGossipCertificates: []*armcosmos.Certificate{ { Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), }}, ExternalSeedNodes: []*armcosmos.SeedNode{ { IPAddress: to.Ptr("10.52.221.2"), }, { IPAddress: to.Ptr("10.52.221.3"), }, { IPAddress: to.Ptr("10.52.221.4"), }}, HoursBetweenBackups: to.Ptr[int32](12), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterResource = armcosmos.ClusterResource{ // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ClusterResourceProperties{ // AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), // CassandraVersion: to.Ptr("3.11"), // ClientCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ExternalSeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }}, // GossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // HoursBetweenBackups: to.Ptr[int32](24), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }, // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraClustersClient) Get ¶
func (client *CassandraClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientGetOptions) (CassandraClustersClientGetResponse, error)
Get - Get the properties of a managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraClustersClient().Get(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterResource = armcosmos.ClusterResource{ // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ClusterResourceProperties{ // AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), // CassandraVersion: to.Ptr("3.11"), // ClientCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ExternalSeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }}, // GossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // HoursBetweenBackups: to.Ptr[int32](24), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }, // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraClustersClient) NewListByResourceGroupPager ¶
func (client *CassandraClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *CassandraClustersClientListByResourceGroupOptions) *runtime.Pager[CassandraClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all managed Cassandra clusters in this resource group.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCassandraClustersClient().NewListByResourceGroupPager("cassandra-prod-rg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListClusters = armcosmos.ListClusters{ // Value: []*armcosmos.ClusterResource{ // { // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ClusterResourceProperties{ // AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), // CassandraVersion: to.Ptr("3.11"), // ClientCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ExternalSeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }}, // GossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // HoursBetweenBackups: to.Ptr[int32](24), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }, // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }}, // } }
Output:
func (*CassandraClustersClient) NewListBySubscriptionPager ¶
func (client *CassandraClustersClient) NewListBySubscriptionPager(options *CassandraClustersClientListBySubscriptionOptions) *runtime.Pager[CassandraClustersClientListBySubscriptionResponse]
NewListBySubscriptionPager - List all managed Cassandra clusters in this subscription.
Generated from API version 2023-11-15
- options - CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCassandraClustersClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListClusters = armcosmos.ListClusters{ // Value: []*armcosmos.ClusterResource{ // { // Name: to.Ptr("cassandra-prod"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/cassandraClusters"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ClusterResourceProperties{ // AuthenticationMethod: to.Ptr(armcosmos.AuthenticationMethodCassandra), // CassandraVersion: to.Ptr("3.11"), // ClientCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ClusterNameOverride: to.Ptr("ClusterNameIllegalForAzureResource"), // DelegatedManagementSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"), // ExternalGossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // ExternalSeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }}, // GossipCertificates: []*armcosmos.Certificate{ // { // Pem: to.Ptr("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"), // }}, // HoursBetweenBackups: to.Ptr[int32](24), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("10.52.221.2"), // }, // { // IPAddress: to.Ptr("10.52.221.3"), // }, // { // IPAddress: to.Ptr("10.52.221.4"), // }, // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }}, // } }
Output:
func (*CassandraClustersClient) Status ¶
func (client *CassandraClustersClient) Status(ctx context.Context, resourceGroupName string, clusterName string, options *CassandraClustersClientStatusOptions) (CassandraClustersClientStatusResponse, error)
Status - Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraClustersClientStatusOptions contains the optional parameters for the CassandraClustersClient.Status method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraStatus.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraClustersClient().Status(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CassandraClusterPublicStatus = armcosmos.CassandraClusterPublicStatus{ // ConnectionErrors: []*armcosmos.ConnectionError{ // }, // DataCenters: []*armcosmos.CassandraClusterPublicStatusDataCentersItem{ // { // Name: to.Ptr("cassandra-westus2-vmss"), // Nodes: []*armcosmos.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems{ // { // Address: to.Ptr("10.0.8.10"), // CassandraProcessStatus: to.Ptr("Running"), // CPUUsage: to.Ptr[float64](0.9), // DiskFreeKB: to.Ptr[int64](1001260056), // DiskUsedKB: to.Ptr[int64](749836), // HostID: to.Ptr("8ccc00a7-9e22-4ac2-aa63-e5327aa0dc51"), // Load: to.Ptr("84.61 MiB"), // MemoryBuffersAndCachedKB: to.Ptr[int64](10817580), // MemoryFreeKB: to.Ptr[int64](35731832), // MemoryTotalKB: to.Ptr[int64](57610444), // MemoryUsedKB: to.Ptr[int64](11061032), // Rack: to.Ptr("rack1"), // Size: to.Ptr[int32](16), // State: to.Ptr(armcosmos.NodeStateNormal), // Status: to.Ptr("Up"), // Timestamp: to.Ptr("10/05/2021, 14:35:20.028"), // Tokens: []*string{ // to.Ptr("-7785254003841681178"), // to.Ptr("-6756518164561476165"), // to.Ptr("-4269720020504480060"), // to.Ptr("-2697657908817852783"), // to.Ptr("-2622387897201218249"), // to.Ptr("-2177258200443022948"), // to.Ptr("-129203941752875603"), // to.Ptr("1738406920822650025"), // to.Ptr("2598053056312400240"), // to.Ptr("3227346424117996872"), // to.Ptr("3644347038875498376"), // to.Ptr("4823546474906050895"), // to.Ptr("5293156680707616627"), // to.Ptr("5485806686603256557"), // to.Ptr("6250058817756969464"), // to.Ptr("7991328665766267709")}, // }, // { // Address: to.Ptr("10.0.8.11"), // CassandraProcessStatus: to.Ptr("Running"), // CPUUsage: to.Ptr[float64](1.2), // DiskFreeKB: to.Ptr[int64](1001283028), // DiskUsedKB: to.Ptr[int64](726864), // HostID: to.Ptr("14092117-4f77-4ec0-8984-c5b860b88a47"), // Load: to.Ptr("59.67 MiB"), // MemoryBuffersAndCachedKB: to.Ptr[int64](10691520), // MemoryFreeKB: to.Ptr[int64](35863248), // MemoryTotalKB: to.Ptr[int64](57610444), // MemoryUsedKB: to.Ptr[int64](11055676), // Rack: to.Ptr("rack2"), // Size: to.Ptr[int32](16), // State: to.Ptr(armcosmos.NodeStateNormal), // Status: to.Ptr("Up"), // Timestamp: to.Ptr("10/05/2021, 14:35:20.028"), // Tokens: []*string{ // to.Ptr("-8726238055665903210"), // to.Ptr("-6687985003871487470"), // to.Ptr("-5269140854976433359"), // to.Ptr("-3989177686905645288"), // to.Ptr("-3957362495277148220"), // to.Ptr("-2539287458896988944"), // to.Ptr("-2460716365393303466"), // to.Ptr("-1848370030729221440"), // to.Ptr("137707733677015122"), // to.Ptr("579467328507000597"), // to.Ptr("1698264534774619627"), // to.Ptr("1904235159942090722"), // to.Ptr("3312208865519999146"), // to.Ptr("4035940456270983993"), // to.Ptr("4412314431151736777"), // to.Ptr("8232565668795426078")}, // }, // { // Address: to.Ptr("10.0.8.12"), // CassandraProcessStatus: to.Ptr("Running"), // CPUUsage: to.Ptr[float64](0.4), // DiskFreeKB: to.Ptr[int64](1001252352), // DiskUsedKB: to.Ptr[int64](757540), // HostID: to.Ptr("e16ada14-39db-462b-9f9e-5b5f6beb8bbd"), // Load: to.Ptr("93.2 MiB"), // MemoryBuffersAndCachedKB: to.Ptr[int64](10453856), // MemoryFreeKB: to.Ptr[int64](36104980), // MemoryTotalKB: to.Ptr[int64](57610444), // MemoryUsedKB: to.Ptr[int64](11051608), // Rack: to.Ptr("rack3"), // Size: to.Ptr[int32](16), // State: to.Ptr(armcosmos.NodeStateNormal), // Status: to.Ptr("Up"), // Timestamp: to.Ptr("10/05/2021, 14:35:20.028"), // Tokens: []*string{ // to.Ptr("-5679481051867296621"), // to.Ptr("-4574115287969297989"), // to.Ptr("-3444578133211470522"), // to.Ptr("-2755931580714972271"), // to.Ptr("-2304431590844389550"), // to.Ptr("-1961946736975068713"), // to.Ptr("-940120277889446704"), // to.Ptr("554469308917912318"), // to.Ptr("1030447162050118004"), // to.Ptr("2745632329542596589"), // to.Ptr("4564547712926446283"), // to.Ptr("5185613478135944116"), // to.Ptr("7280237939830623824"), // to.Ptr("7504213835759531710"), // to.Ptr("7631994478195429959"), // to.Ptr("8139769477321226157")}, // }}, // SeedNodes: []*string{ // to.Ptr("10.0.8.10"), // to.Ptr("10.0.8.11"), // to.Ptr("10.0.8.12")}, // }}, // ETag: to.Ptr("A350A2CE7E91B6D5A102A5E5EC222B882D981092"), // ReaperStatus: &armcosmos.ManagedCassandraReaperStatus{ // Healthy: to.Ptr(true), // RepairRunIDs: map[string]*string{ // }, // RepairSchedules: map[string]*string{ // "00000000-0000-0001-0000-000000000000": to.Ptr("ACTIVE"), // }, // }, // }
Output:
type CassandraClustersClientBeginCreateUpdateOptions ¶
type CassandraClustersClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginCreateUpdate method.
type CassandraClustersClientBeginDeallocateOptions ¶
type CassandraClustersClientBeginDeallocateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginDeallocateOptions contains the optional parameters for the CassandraClustersClient.BeginDeallocate method.
type CassandraClustersClientBeginDeleteOptions ¶
type CassandraClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginDeleteOptions contains the optional parameters for the CassandraClustersClient.BeginDelete method.
type CassandraClustersClientBeginInvokeCommandOptions ¶
type CassandraClustersClientBeginInvokeCommandOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginInvokeCommandOptions contains the optional parameters for the CassandraClustersClient.BeginInvokeCommand method.
type CassandraClustersClientBeginStartOptions ¶
type CassandraClustersClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginStartOptions contains the optional parameters for the CassandraClustersClient.BeginStart method.
type CassandraClustersClientBeginUpdateOptions ¶
type CassandraClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginUpdate method.
type CassandraClustersClientCreateUpdateResponse ¶
type CassandraClustersClientCreateUpdateResponse struct { // Representation of a managed Cassandra cluster. ClusterResource }
CassandraClustersClientCreateUpdateResponse contains the response from method CassandraClustersClient.BeginCreateUpdate.
type CassandraClustersClientDeallocateResponse ¶
type CassandraClustersClientDeallocateResponse struct { }
CassandraClustersClientDeallocateResponse contains the response from method CassandraClustersClient.BeginDeallocate.
type CassandraClustersClientDeleteResponse ¶
type CassandraClustersClientDeleteResponse struct { }
CassandraClustersClientDeleteResponse contains the response from method CassandraClustersClient.BeginDelete.
type CassandraClustersClientGetOptions ¶
type CassandraClustersClientGetOptions struct { }
CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method.
type CassandraClustersClientGetResponse ¶
type CassandraClustersClientGetResponse struct { // Representation of a managed Cassandra cluster. ClusterResource }
CassandraClustersClientGetResponse contains the response from method CassandraClustersClient.Get.
type CassandraClustersClientInvokeCommandResponse ¶
type CassandraClustersClientInvokeCommandResponse struct { // Response of /command api CommandOutput }
CassandraClustersClientInvokeCommandResponse contains the response from method CassandraClustersClient.BeginInvokeCommand.
type CassandraClustersClientListByResourceGroupOptions ¶
type CassandraClustersClientListByResourceGroupOptions struct { }
CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.NewListByResourceGroupPager method.
type CassandraClustersClientListByResourceGroupResponse ¶
type CassandraClustersClientListByResourceGroupResponse struct { // List of managed Cassandra clusters. ListClusters }
CassandraClustersClientListByResourceGroupResponse contains the response from method CassandraClustersClient.NewListByResourceGroupPager.
type CassandraClustersClientListBySubscriptionOptions ¶
type CassandraClustersClientListBySubscriptionOptions struct { }
CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.NewListBySubscriptionPager method.
type CassandraClustersClientListBySubscriptionResponse ¶
type CassandraClustersClientListBySubscriptionResponse struct { // List of managed Cassandra clusters. ListClusters }
CassandraClustersClientListBySubscriptionResponse contains the response from method CassandraClustersClient.NewListBySubscriptionPager.
type CassandraClustersClientStartResponse ¶
type CassandraClustersClientStartResponse struct { }
CassandraClustersClientStartResponse contains the response from method CassandraClustersClient.BeginStart.
type CassandraClustersClientStatusOptions ¶
type CassandraClustersClientStatusOptions struct { }
CassandraClustersClientStatusOptions contains the optional parameters for the CassandraClustersClient.Status method.
type CassandraClustersClientStatusResponse ¶
type CassandraClustersClientStatusResponse struct { // Properties of a managed Cassandra cluster public status. CassandraClusterPublicStatus }
CassandraClustersClientStatusResponse contains the response from method CassandraClustersClient.Status.
type CassandraClustersClientUpdateResponse ¶
type CassandraClustersClientUpdateResponse struct { // Representation of a managed Cassandra cluster. ClusterResource }
CassandraClustersClientUpdateResponse contains the response from method CassandraClustersClient.BeginUpdate.
type CassandraDataCentersClient ¶
type CassandraDataCentersClient struct {
// contains filtered or unexported fields
}
CassandraDataCentersClient contains the methods for the CassandraDataCenters group. Don't use this type directly, use NewCassandraDataCentersClient() instead.
func NewCassandraDataCentersClient ¶
func NewCassandraDataCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraDataCentersClient, error)
NewCassandraDataCentersClient creates a new instance of CassandraDataCentersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CassandraDataCentersClient) BeginCreateUpdate ¶
func (client *CassandraDataCentersClient) BeginCreateUpdate(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginCreateUpdateOptions) (*runtime.Poller[CassandraDataCentersClientCreateUpdateResponse], error)
BeginCreateUpdate - Create or update a managed Cassandra data center. When updating, overwrite all properties. To update only some properties, use PATCH. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- dataCenterName - Data center name in a managed Cassandra cluster.
- body - Parameters specifying the managed Cassandra data center.
- options - CassandraDataCentersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginCreateUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraDataCenterCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraDataCentersClient().BeginCreateUpdate(ctx, "cassandra-prod-rg", "cassandra-prod", "dc1", armcosmos.DataCenterResource{ Properties: &armcosmos.DataCenterResourceProperties{ Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), DataCenterLocation: to.Ptr("West US 2"), DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1-subnet"), NodeCount: to.Ptr[int32](9), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataCenterResource = armcosmos.DataCenterResource{ // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), // Properties: &armcosmos.DataCenterResourceProperties{ // DataCenterLocation: to.Ptr("West US 2"), // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), // NodeCount: to.Ptr[int32](9), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraDataCentersClient) BeginDelete ¶
func (client *CassandraDataCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, options *CassandraDataCentersClientBeginDeleteOptions) (*runtime.Poller[CassandraDataCentersClientDeleteResponse], error)
BeginDelete - Delete a managed Cassandra data center. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- dataCenterName - Data center name in a managed Cassandra cluster.
- options - CassandraDataCentersClientBeginDeleteOptions contains the optional parameters for the CassandraDataCentersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraDataCenterDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraDataCentersClient().BeginDelete(ctx, "cassandra-prod-rg", "cassandra-prod", "dc1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraDataCentersClient) BeginUpdate ¶
func (client *CassandraDataCentersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, body DataCenterResource, options *CassandraDataCentersClientBeginUpdateOptions) (*runtime.Poller[CassandraDataCentersClientUpdateResponse], error)
BeginUpdate - Update some of the properties of a managed Cassandra data center. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- dataCenterName - Data center name in a managed Cassandra cluster.
- body - Parameters to provide for specifying the managed Cassandra data center.
- options - CassandraDataCentersClientBeginUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraDataCenterPatch.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraDataCentersClient().BeginUpdate(ctx, "cassandra-prod-rg", "cassandra-prod", "dc1", armcosmos.DataCenterResource{ Properties: &armcosmos.DataCenterResourceProperties{ Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), DataCenterLocation: to.Ptr("West US 2"), DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1-subnet"), NodeCount: to.Ptr[int32](9), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataCenterResource = armcosmos.DataCenterResource{ // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), // NodeCount: to.Ptr[int32](9), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraDataCentersClient) Get ¶
func (client *CassandraDataCentersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, dataCenterName string, options *CassandraDataCentersClientGetOptions) (CassandraDataCentersClientGetResponse, error)
Get - Get the properties of a managed Cassandra data center. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- dataCenterName - Data center name in a managed Cassandra cluster.
- options - CassandraDataCentersClientGetOptions contains the optional parameters for the CassandraDataCentersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraDataCenterGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraDataCentersClient().Get(ctx, "cassandra-prod-rg", "cassandra-prod", "dc1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataCenterResource = armcosmos.DataCenterResource{ // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters/dc1"), // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), // NodeCount: to.Ptr[int32](9), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }
Output:
func (*CassandraDataCentersClient) NewListPager ¶
func (client *CassandraDataCentersClient) NewListPager(resourceGroupName string, clusterName string, options *CassandraDataCentersClientListOptions) *runtime.Pager[CassandraDataCentersClientListResponse]
NewListPager - List all data centers in a particular managed Cassandra cluster.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - Managed Cassandra cluster name.
- options - CassandraDataCentersClientListOptions contains the optional parameters for the CassandraDataCentersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBManagedCassandraDataCenterList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCassandraDataCentersClient().NewListPager("cassandra-prod-rg", "cassandra-prod", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListDataCenters = armcosmos.ListDataCenters{ // Value: []*armcosmos.DataCenterResource{ // { // Name: to.Ptr("dc1"), // Type: to.Ptr("Microsoft.DocumentDB/cassandraClusters/dataCenters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cassandra-prod-rg/providers/Microsoft.DocumentDB/cassandraClusters/cassandra-prod/dataCenters"), // Properties: &armcosmos.DataCenterResourceProperties{ // Base64EncodedCassandraYamlFragment: to.Ptr("Y29tcGFjdGlvbl90aHJvdWdocHV0X21iX3Blcl9zZWM6IDMyCmNvbXBhY3Rpb25fbGFyZ2VfcGFydGl0aW9uX3dhcm5pbmdfdGhyZXNob2xkX21iOiAxMDA="), // DataCenterLocation: to.Ptr("West US 2"), // DelegatedSubnetID: to.Ptr("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/dc1"), // NodeCount: to.Ptr[int32](9), // ProvisioningState: to.Ptr(armcosmos.ManagedCassandraProvisioningStateSucceeded), // SeedNodes: []*armcosmos.SeedNode{ // { // IPAddress: to.Ptr("192.168.12.2"), // }, // { // IPAddress: to.Ptr("192.168.12.3"), // }, // { // IPAddress: to.Ptr("192.168.12.4"), // }}, // }, // }}, // } }
Output:
type CassandraDataCentersClientBeginCreateUpdateOptions ¶
type CassandraDataCentersClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginCreateUpdate method.
type CassandraDataCentersClientBeginDeleteOptions ¶
type CassandraDataCentersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginDeleteOptions contains the optional parameters for the CassandraDataCentersClient.BeginDelete method.
type CassandraDataCentersClientBeginUpdateOptions ¶
type CassandraDataCentersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginUpdate method.
type CassandraDataCentersClientCreateUpdateResponse ¶
type CassandraDataCentersClientCreateUpdateResponse struct { // A managed Cassandra data center. DataCenterResource }
CassandraDataCentersClientCreateUpdateResponse contains the response from method CassandraDataCentersClient.BeginCreateUpdate.
type CassandraDataCentersClientDeleteResponse ¶
type CassandraDataCentersClientDeleteResponse struct { }
CassandraDataCentersClientDeleteResponse contains the response from method CassandraDataCentersClient.BeginDelete.
type CassandraDataCentersClientGetOptions ¶
type CassandraDataCentersClientGetOptions struct { }
CassandraDataCentersClientGetOptions contains the optional parameters for the CassandraDataCentersClient.Get method.
type CassandraDataCentersClientGetResponse ¶
type CassandraDataCentersClientGetResponse struct { // A managed Cassandra data center. DataCenterResource }
CassandraDataCentersClientGetResponse contains the response from method CassandraDataCentersClient.Get.
type CassandraDataCentersClientListOptions ¶
type CassandraDataCentersClientListOptions struct { }
CassandraDataCentersClientListOptions contains the optional parameters for the CassandraDataCentersClient.NewListPager method.
type CassandraDataCentersClientListResponse ¶
type CassandraDataCentersClientListResponse struct { // List of managed Cassandra data centers and their properties. ListDataCenters }
CassandraDataCentersClientListResponse contains the response from method CassandraDataCentersClient.NewListPager.
type CassandraDataCentersClientUpdateResponse ¶
type CassandraDataCentersClientUpdateResponse struct { // A managed Cassandra data center. DataCenterResource }
CassandraDataCentersClientUpdateResponse contains the response from method CassandraDataCentersClient.BeginUpdate.
type CassandraError ¶ added in v2.4.0
type CassandraError struct { // Additional information about the error. AdditionalErrorInfo *string // The code of error that occurred. Code *string // The message of the error. Message *string // The target resource of the error. Target *string }
func (CassandraError) MarshalJSON ¶ added in v2.4.0
func (c CassandraError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraError.
func (*CassandraError) UnmarshalJSON ¶ added in v2.4.0
func (c *CassandraError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraError.
type CassandraKeyspaceCreateUpdateParameters ¶
type CassandraKeyspaceCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra keyspace. Properties *CassandraKeyspaceCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
CassandraKeyspaceCreateUpdateParameters - Parameters to create and update Cosmos DB Cassandra keyspace.
func (CassandraKeyspaceCreateUpdateParameters) MarshalJSON ¶
func (c CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceCreateUpdateParameters.
func (*CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON ¶
func (c *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceCreateUpdateParameters.
type CassandraKeyspaceCreateUpdateProperties ¶
type CassandraKeyspaceCreateUpdateProperties struct { // REQUIRED; 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 }
CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
func (CassandraKeyspaceCreateUpdateProperties) MarshalJSON ¶
func (c CassandraKeyspaceCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceCreateUpdateProperties.
func (*CassandraKeyspaceCreateUpdateProperties) UnmarshalJSON ¶
func (c *CassandraKeyspaceCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceCreateUpdateProperties.
type CassandraKeyspaceGetProperties ¶
type CassandraKeyspaceGetProperties struct { Options *CassandraKeyspaceGetPropertiesOptions Resource *CassandraKeyspaceGetPropertiesResource }
CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace
func (CassandraKeyspaceGetProperties) MarshalJSON ¶
func (c CassandraKeyspaceGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceGetProperties.
func (*CassandraKeyspaceGetProperties) UnmarshalJSON ¶
func (c *CassandraKeyspaceGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceGetProperties.
type CassandraKeyspaceGetPropertiesOptions ¶
type CassandraKeyspaceGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (CassandraKeyspaceGetPropertiesOptions) MarshalJSON ¶
func (c CassandraKeyspaceGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceGetPropertiesOptions.
func (*CassandraKeyspaceGetPropertiesOptions) UnmarshalJSON ¶
func (c *CassandraKeyspaceGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceGetPropertiesOptions.
type CassandraKeyspaceGetPropertiesResource ¶
type CassandraKeyspaceGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Cassandra keyspace ID *string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (CassandraKeyspaceGetPropertiesResource) MarshalJSON ¶
func (c CassandraKeyspaceGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceGetPropertiesResource.
func (*CassandraKeyspaceGetPropertiesResource) UnmarshalJSON ¶
func (c *CassandraKeyspaceGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceGetPropertiesResource.
type CassandraKeyspaceGetResults ¶
type CassandraKeyspaceGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB Cassandra keyspace Properties *CassandraKeyspaceGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
CassandraKeyspaceGetResults - An Azure Cosmos DB Cassandra keyspace.
func (CassandraKeyspaceGetResults) MarshalJSON ¶
func (c CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceGetResults.
func (*CassandraKeyspaceGetResults) UnmarshalJSON ¶
func (c *CassandraKeyspaceGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceGetResults.
type CassandraKeyspaceListResult ¶
type CassandraKeyspaceListResult struct { // READ-ONLY; List of Cassandra keyspaces and their properties. Value []*CassandraKeyspaceGetResults }
CassandraKeyspaceListResult - The List operation response, that contains the Cassandra keyspaces and their properties.
func (CassandraKeyspaceListResult) MarshalJSON ¶
func (c CassandraKeyspaceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceListResult.
func (*CassandraKeyspaceListResult) UnmarshalJSON ¶
func (c *CassandraKeyspaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceListResult.
type CassandraKeyspaceResource ¶
type CassandraKeyspaceResource struct { // REQUIRED; Name of the Cosmos DB Cassandra keyspace ID *string }
CassandraKeyspaceResource - Cosmos DB Cassandra keyspace resource object
func (CassandraKeyspaceResource) MarshalJSON ¶
func (c CassandraKeyspaceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraKeyspaceResource.
func (*CassandraKeyspaceResource) UnmarshalJSON ¶
func (c *CassandraKeyspaceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraKeyspaceResource.
type CassandraPartitionKey ¶
type CassandraPartitionKey struct { // Name of the Cosmos DB Cassandra table partition key Name *string }
CassandraPartitionKey - Cosmos DB Cassandra table partition key
func (CassandraPartitionKey) MarshalJSON ¶
func (c CassandraPartitionKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraPartitionKey.
func (*CassandraPartitionKey) UnmarshalJSON ¶
func (c *CassandraPartitionKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraPartitionKey.
type CassandraResourcesClient ¶
type CassandraResourcesClient struct {
// contains filtered or unexported fields
}
CassandraResourcesClient contains the methods for the CassandraResources group. Don't use this type directly, use NewCassandraResourcesClient() instead.
func NewCassandraResourcesClient ¶
func NewCassandraResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CassandraResourcesClient, error)
NewCassandraResourcesClient creates a new instance of CassandraResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CassandraResourcesClient) BeginCreateUpdateCassandraKeyspace ¶
func (client *CassandraResourcesClient) BeginCreateUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters CassandraKeyspaceCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse], error)
BeginCreateUpdateCassandraKeyspace - Create or update an Azure Cosmos DB Cassandra keyspace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- createUpdateCassandraKeyspaceParameters - The parameters to provide for the current Cassandra keyspace.
- options - CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginCreateUpdateCassandraKeyspace(ctx, "rg1", "ddb1", "keyspaceName", armcosmos.CassandraKeyspaceCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.CassandraKeyspaceCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.CassandraKeyspaceResource{ ID: to.Ptr("keyspaceName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CassandraKeyspaceGetResults = armcosmos.CassandraKeyspaceGetResults{ // Name: to.Ptr("keyspaceName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraKeyspaceGetProperties{ // Resource: &armcosmos.CassandraKeyspaceGetPropertiesResource{ // ID: to.Ptr("keyspaceName"), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginCreateUpdateCassandraTable ¶
func (client *CassandraResourcesClient) BeginCreateUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters CassandraTableCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraTableOptions) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraTableResponse], error)
BeginCreateUpdateCassandraTable - Create or update an Azure Cosmos DB Cassandra Table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- createUpdateCassandraTableParameters - The parameters to provide for the current Cassandra Table.
- options - CassandraResourcesClientBeginCreateUpdateCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginCreateUpdateCassandraTable(ctx, "rg1", "ddb1", "keyspaceName", "tableName", armcosmos.CassandraTableCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.CassandraTableCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.CassandraTableResource{ Schema: &armcosmos.CassandraSchema{ ClusterKeys: []*armcosmos.ClusterKey{ { Name: to.Ptr("columnA"), OrderBy: to.Ptr("Asc"), }}, Columns: []*armcosmos.Column{ { Name: to.Ptr("columnA"), Type: to.Ptr("Ascii"), }}, PartitionKeys: []*armcosmos.CassandraPartitionKey{ { Name: to.Ptr("columnA"), }}, }, DefaultTTL: to.Ptr[int32](100), ID: to.Ptr("tableName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CassandraTableGetResults = armcosmos.CassandraTableGetResults{ // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/cassandraTables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/cassandraTables/tableName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraTableGetProperties{ // Resource: &armcosmos.CassandraTableGetPropertiesResource{ // Schema: &armcosmos.CassandraSchema{ // ClusterKeys: []*armcosmos.ClusterKey{ // { // Name: to.Ptr("columnA"), // OrderBy: to.Ptr("Asc"), // }}, // Columns: []*armcosmos.Column{ // { // Name: to.Ptr("columnA"), // Type: to.Ptr("Ascii"), // }}, // PartitionKeys: []*armcosmos.CassandraPartitionKey{ // { // Name: to.Ptr("columnA"), // }}, // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginDeleteCassandraKeyspace ¶
func (client *CassandraResourcesClient) BeginDeleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions) (*runtime.Poller[CassandraResourcesClientDeleteCassandraKeyspaceResponse], error)
BeginDeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraKeyspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginDeleteCassandraKeyspace(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraResourcesClient) BeginDeleteCassandraTable ¶
func (client *CassandraResourcesClient) BeginDeleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginDeleteCassandraTableOptions) (*runtime.Poller[CassandraResourcesClientDeleteCassandraTableResponse], error)
BeginDeleteCassandraTable - Deletes an existing Azure Cosmos DB Cassandra table. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- options - CassandraResourcesClientBeginDeleteCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginDeleteCassandraTable(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CassandraResourcesClient) BeginMigrateCassandraKeyspaceToAutoscale ¶
func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse], error)
BeginMigrateCassandraKeyspaceToAutoscale - Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraKeyspaceToAutoscale(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginMigrateCassandraKeyspaceToManualThroughput ¶
func (client *CassandraResourcesClient) BeginMigrateCassandraKeyspaceToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse], error)
BeginMigrateCassandraKeyspaceToManualThroughput - Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraKeyspaceToManualThroughput(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginMigrateCassandraTableToAutoscale ¶
func (client *CassandraResourcesClient) BeginMigrateCassandraTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse], error)
BeginMigrateCassandraTableToAutoscale - Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- options - CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraTableToAutoscale(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginMigrateCassandraTableToManualThroughput ¶
func (client *CassandraResourcesClient) BeginMigrateCassandraTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse], error)
BeginMigrateCassandraTableToManualThroughput - Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- options - CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginMigrateCassandraTableToManualThroughput(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginUpdateCassandraKeyspaceThroughput ¶
func (client *CassandraResourcesClient) BeginUpdateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions) (*runtime.Poller[CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse], error)
BeginUpdateCassandraKeyspaceThroughput - Update RUs per second of an Azure Cosmos DB Cassandra Keyspace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current Cassandra Keyspace.
- options - CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginUpdateCassandraKeyspaceThroughput(ctx, "rg1", "ddb1", "keyspaceName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) BeginUpdateCassandraTableThroughput ¶
func (client *CassandraResourcesClient) BeginUpdateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions) (*runtime.Poller[CassandraResourcesClientUpdateCassandraTableThroughputResponse], error)
BeginUpdateCassandraTableThroughput - Update RUs per second of an Azure Cosmos DB Cassandra table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current Cassandra table.
- options - CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraTableThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCassandraResourcesClient().BeginUpdateCassandraTableThroughput(ctx, "rg1", "ddb1", "keyspaceName", "tableName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/cassandraTables/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/cassandraTables/tableName/throughputSettings/default"), // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) GetCassandraKeyspace ¶
func (client *CassandraResourcesClient) GetCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientGetCassandraKeyspaceOptions) (CassandraResourcesClientGetCassandraKeyspaceResponse, error)
GetCassandraKeyspace - Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientGetCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraResourcesClient().GetCassandraKeyspace(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CassandraKeyspaceGetResults = armcosmos.CassandraKeyspaceGetResults{ // Name: to.Ptr("keyspaceName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraKeyspaceGetProperties{ // Resource: &armcosmos.CassandraKeyspaceGetPropertiesResource{ // ID: to.Ptr("keyspaceName"), // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // }, // }, // }
Output:
func (*CassandraResourcesClient) GetCassandraKeyspaceThroughput ¶
func (client *CassandraResourcesClient) GetCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientGetCassandraKeyspaceThroughputOptions) (CassandraResourcesClientGetCassandraKeyspaceThroughputResponse, error)
GetCassandraKeyspaceThroughput - Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientGetCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspaceThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraResourcesClient().GetCassandraKeyspaceThroughput(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) GetCassandraTable ¶
func (client *CassandraResourcesClient) GetCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientGetCassandraTableOptions) (CassandraResourcesClientGetCassandraTableResponse, error)
GetCassandraTable - Gets the Cassandra table under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- options - CassandraResourcesClientGetCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraResourcesClient().GetCassandraTable(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CassandraTableGetResults = armcosmos.CassandraTableGetResults{ // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/cassandraTables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/cassandraTables/tableName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraTableGetProperties{ // Resource: &armcosmos.CassandraTableGetPropertiesResource{ // Schema: &armcosmos.CassandraSchema{ // ClusterKeys: []*armcosmos.ClusterKey{ // { // Name: to.Ptr("columnA"), // OrderBy: to.Ptr("Asc"), // }}, // Columns: []*armcosmos.Column{ // { // Name: to.Ptr("columnA"), // Type: to.Ptr("Ascii"), // }}, // PartitionKeys: []*armcosmos.CassandraPartitionKey{ // { // Name: to.Ptr("columnA"), // }}, // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // }, // }, // }
Output:
func (*CassandraResourcesClient) GetCassandraTableThroughput ¶
func (client *CassandraResourcesClient) GetCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, options *CassandraResourcesClientGetCassandraTableThroughputOptions) (CassandraResourcesClientGetCassandraTableThroughputResponse, error)
GetCassandraTableThroughput - Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- tableName - Cosmos DB table name.
- options - CassandraResourcesClientGetCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTableThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCassandraResourcesClient().GetCassandraTableThroughput(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/cassandraTables/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/cassandraTables/tableName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*CassandraResourcesClient) NewListCassandraKeyspacesPager ¶
func (client *CassandraResourcesClient) NewListCassandraKeyspacesPager(resourceGroupName string, accountName string, options *CassandraResourcesClientListCassandraKeyspacesOptions) *runtime.Pager[CassandraResourcesClientListCassandraKeyspacesResponse]
NewListCassandraKeyspacesPager - Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraKeyspacesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraKeyspaceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCassandraResourcesClient().NewListCassandraKeyspacesPager("rgName", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CassandraKeyspaceListResult = armcosmos.CassandraKeyspaceListResult{ // Value: []*armcosmos.CassandraKeyspaceGetResults{ // { // Name: to.Ptr("keyspaceName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraKeyspaceGetProperties{ // Resource: &armcosmos.CassandraKeyspaceGetPropertiesResource{ // ID: to.Ptr("keyspaceName"), // }, // }, // }}, // } }
Output:
func (*CassandraResourcesClient) NewListCassandraTablesPager ¶
func (client *CassandraResourcesClient) NewListCassandraTablesPager(resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientListCassandraTablesOptions) *runtime.Pager[CassandraResourcesClientListCassandraTablesResponse]
NewListCassandraTablesPager - Lists the Cassandra table under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyspaceName - Cosmos DB keyspace name.
- options - CassandraResourcesClientListCassandraTablesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraTablesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCassandraTableList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCassandraResourcesClient().NewListCassandraTablesPager("rgName", "ddb1", "keyspaceName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CassandraTableListResult = armcosmos.CassandraTableListResult{ // Value: []*armcosmos.CassandraTableGetResults{ // { // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces/cassandraTables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName/cassandraTables/tableName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.CassandraTableGetProperties{ // Resource: &armcosmos.CassandraTableGetPropertiesResource{ // Schema: &armcosmos.CassandraSchema{ // ClusterKeys: []*armcosmos.ClusterKey{ // { // Name: to.Ptr("columnA"), // OrderBy: to.Ptr("Asc"), // }}, // Columns: []*armcosmos.Column{ // { // Name: to.Ptr("columnA"), // Type: to.Ptr("Ascii"), // }}, // PartitionKeys: []*armcosmos.CassandraPartitionKey{ // { // Name: to.Ptr("columnA"), // }}, // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("tableName"), // }, // }, // }}, // } }
Output:
type CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions ¶
type CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace method.
type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions ¶
type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginCreateUpdateCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraTable method.
type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions ¶
type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraKeyspace method.
type CassandraResourcesClientBeginDeleteCassandraTableOptions ¶
type CassandraResourcesClientBeginDeleteCassandraTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginDeleteCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraTable method.
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions ¶
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale method.
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions ¶
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput method.
type CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions ¶
type CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale method.
type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions ¶
type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput method.
type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions ¶
type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput method.
type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions ¶
type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraTableThroughput method.
type CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse ¶
type CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse struct { // An Azure Cosmos DB Cassandra keyspace. CassandraKeyspaceGetResults }
CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace.
type CassandraResourcesClientCreateUpdateCassandraTableResponse ¶
type CassandraResourcesClientCreateUpdateCassandraTableResponse struct { // An Azure Cosmos DB Cassandra table. CassandraTableGetResults }
CassandraResourcesClientCreateUpdateCassandraTableResponse contains the response from method CassandraResourcesClient.BeginCreateUpdateCassandraTable.
type CassandraResourcesClientDeleteCassandraKeyspaceResponse ¶
type CassandraResourcesClientDeleteCassandraKeyspaceResponse struct { }
CassandraResourcesClientDeleteCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.BeginDeleteCassandraKeyspace.
type CassandraResourcesClientDeleteCassandraTableResponse ¶
type CassandraResourcesClientDeleteCassandraTableResponse struct { }
CassandraResourcesClientDeleteCassandraTableResponse contains the response from method CassandraResourcesClient.BeginDeleteCassandraTable.
type CassandraResourcesClientGetCassandraKeyspaceOptions ¶
type CassandraResourcesClientGetCassandraKeyspaceOptions struct { }
CassandraResourcesClientGetCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspace method.
type CassandraResourcesClientGetCassandraKeyspaceResponse ¶
type CassandraResourcesClientGetCassandraKeyspaceResponse struct { // An Azure Cosmos DB Cassandra keyspace. CassandraKeyspaceGetResults }
CassandraResourcesClientGetCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.GetCassandraKeyspace.
type CassandraResourcesClientGetCassandraKeyspaceThroughputOptions ¶
type CassandraResourcesClientGetCassandraKeyspaceThroughputOptions struct { }
CassandraResourcesClientGetCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspaceThroughput method.
type CassandraResourcesClientGetCassandraKeyspaceThroughputResponse ¶
type CassandraResourcesClientGetCassandraKeyspaceThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientGetCassandraKeyspaceThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraKeyspaceThroughput.
type CassandraResourcesClientGetCassandraTableOptions ¶
type CassandraResourcesClientGetCassandraTableOptions struct { }
CassandraResourcesClientGetCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTable method.
type CassandraResourcesClientGetCassandraTableResponse ¶
type CassandraResourcesClientGetCassandraTableResponse struct { // An Azure Cosmos DB Cassandra table. CassandraTableGetResults }
CassandraResourcesClientGetCassandraTableResponse contains the response from method CassandraResourcesClient.GetCassandraTable.
type CassandraResourcesClientGetCassandraTableThroughputOptions ¶
type CassandraResourcesClientGetCassandraTableThroughputOptions struct { }
CassandraResourcesClientGetCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTableThroughput method.
type CassandraResourcesClientGetCassandraTableThroughputResponse ¶
type CassandraResourcesClientGetCassandraTableThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientGetCassandraTableThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraTableThroughput.
type CassandraResourcesClientListCassandraKeyspacesOptions ¶
type CassandraResourcesClientListCassandraKeyspacesOptions struct { }
CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraKeyspacesPager method.
type CassandraResourcesClientListCassandraKeyspacesResponse ¶
type CassandraResourcesClientListCassandraKeyspacesResponse struct { // The List operation response, that contains the Cassandra keyspaces and their properties. CassandraKeyspaceListResult }
CassandraResourcesClientListCassandraKeyspacesResponse contains the response from method CassandraResourcesClient.NewListCassandraKeyspacesPager.
type CassandraResourcesClientListCassandraTablesOptions ¶
type CassandraResourcesClientListCassandraTablesOptions struct { }
CassandraResourcesClientListCassandraTablesOptions contains the optional parameters for the CassandraResourcesClient.NewListCassandraTablesPager method.
type CassandraResourcesClientListCassandraTablesResponse ¶
type CassandraResourcesClientListCassandraTablesResponse struct { // The List operation response, that contains the Cassandra tables and their properties. CassandraTableListResult }
CassandraResourcesClientListCassandraTablesResponse contains the response from method CassandraResourcesClient.NewListCassandraTablesPager.
type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse ¶
type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale.
type CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse ¶
type CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput.
type CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse ¶
type CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale.
type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse ¶
type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse contains the response from method CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput.
type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse ¶
type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse contains the response from method CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput.
type CassandraResourcesClientUpdateCassandraTableThroughputResponse ¶
type CassandraResourcesClientUpdateCassandraTableThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
CassandraResourcesClientUpdateCassandraTableThroughputResponse contains the response from method CassandraResourcesClient.BeginUpdateCassandraTableThroughput.
type CassandraSchema ¶
type CassandraSchema struct { // List of cluster key. ClusterKeys []*ClusterKey // List of Cassandra table columns. Columns []*Column // List of partition key. PartitionKeys []*CassandraPartitionKey }
CassandraSchema - Cosmos DB Cassandra table schema
func (CassandraSchema) MarshalJSON ¶
func (c CassandraSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraSchema.
func (*CassandraSchema) UnmarshalJSON ¶
func (c *CassandraSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraSchema.
type CassandraTableCreateUpdateParameters ¶
type CassandraTableCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra table. Properties *CassandraTableCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
CassandraTableCreateUpdateParameters - Parameters to create and update Cosmos DB Cassandra table.
func (CassandraTableCreateUpdateParameters) MarshalJSON ¶
func (c CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableCreateUpdateParameters.
func (*CassandraTableCreateUpdateParameters) UnmarshalJSON ¶
func (c *CassandraTableCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableCreateUpdateParameters.
type CassandraTableCreateUpdateProperties ¶
type CassandraTableCreateUpdateProperties struct { // REQUIRED; 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 }
CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
func (CassandraTableCreateUpdateProperties) MarshalJSON ¶
func (c CassandraTableCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableCreateUpdateProperties.
func (*CassandraTableCreateUpdateProperties) UnmarshalJSON ¶
func (c *CassandraTableCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableCreateUpdateProperties.
type CassandraTableGetProperties ¶
type CassandraTableGetProperties struct { Options *CassandraTableGetPropertiesOptions Resource *CassandraTableGetPropertiesResource }
CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table
func (CassandraTableGetProperties) MarshalJSON ¶
func (c CassandraTableGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableGetProperties.
func (*CassandraTableGetProperties) UnmarshalJSON ¶
func (c *CassandraTableGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableGetProperties.
type CassandraTableGetPropertiesOptions ¶
type CassandraTableGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (CassandraTableGetPropertiesOptions) MarshalJSON ¶
func (c CassandraTableGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableGetPropertiesOptions.
func (*CassandraTableGetPropertiesOptions) UnmarshalJSON ¶
func (c *CassandraTableGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableGetPropertiesOptions.
type CassandraTableGetPropertiesResource ¶
type CassandraTableGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Cassandra table ID *string // Analytical TTL. AnalyticalStorageTTL *int32 // Time to live of the Cosmos DB Cassandra table DefaultTTL *int32 // Schema of the Cosmos DB Cassandra table Schema *CassandraSchema // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (CassandraTableGetPropertiesResource) MarshalJSON ¶
func (c CassandraTableGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableGetPropertiesResource.
func (*CassandraTableGetPropertiesResource) UnmarshalJSON ¶
func (c *CassandraTableGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableGetPropertiesResource.
type CassandraTableGetResults ¶
type CassandraTableGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB Cassandra table Properties *CassandraTableGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
CassandraTableGetResults - An Azure Cosmos DB Cassandra table.
func (CassandraTableGetResults) MarshalJSON ¶
func (c CassandraTableGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableGetResults.
func (*CassandraTableGetResults) UnmarshalJSON ¶
func (c *CassandraTableGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableGetResults.
type CassandraTableListResult ¶
type CassandraTableListResult struct { // READ-ONLY; List of Cassandra tables and their properties. Value []*CassandraTableGetResults }
CassandraTableListResult - The List operation response, that contains the Cassandra tables and their properties.
func (CassandraTableListResult) MarshalJSON ¶
func (c CassandraTableListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableListResult.
func (*CassandraTableListResult) UnmarshalJSON ¶
func (c *CassandraTableListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableListResult.
type CassandraTableResource ¶
type CassandraTableResource struct { // REQUIRED; Name of the Cosmos DB Cassandra table ID *string // Analytical TTL. AnalyticalStorageTTL *int32 // Time to live of the Cosmos DB Cassandra table DefaultTTL *int32 // Schema of the Cosmos DB Cassandra table Schema *CassandraSchema }
CassandraTableResource - Cosmos DB Cassandra table resource object
func (CassandraTableResource) MarshalJSON ¶
func (c CassandraTableResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraTableResource.
func (*CassandraTableResource) UnmarshalJSON ¶
func (c *CassandraTableResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CassandraTableResource.
type Certificate ¶
type Certificate struct { // PEM formatted public key. Pem *string }
func (Certificate) MarshalJSON ¶
func (c Certificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Certificate.
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Certificate.
type ClientEncryptionIncludedPath ¶ added in v2.2.0
type ClientEncryptionIncludedPath struct { // REQUIRED; The identifier of the Client Encryption Key to be used to encrypt the path. ClientEncryptionKeyID *string // REQUIRED; The encryption algorithm which will be used. Eg - AEADAES256CBCHMAC_SHA256. EncryptionAlgorithm *string // REQUIRED; The type of encryption to be performed. Eg - Deterministic, Randomized. EncryptionType *string // REQUIRED; Path that needs to be encrypted. Path *string }
ClientEncryptionIncludedPath - .
func (ClientEncryptionIncludedPath) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionIncludedPath) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionIncludedPath.
func (*ClientEncryptionIncludedPath) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionIncludedPath) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionIncludedPath.
type ClientEncryptionKeyCreateUpdateParameters ¶ added in v2.2.0
type ClientEncryptionKeyCreateUpdateParameters struct { // REQUIRED; Properties to create and update ClientEncryptionKey. Properties *ClientEncryptionKeyCreateUpdateProperties }
ClientEncryptionKeyCreateUpdateParameters - Parameters to create and update ClientEncryptionKey.
func (ClientEncryptionKeyCreateUpdateParameters) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateParameters.
func (*ClientEncryptionKeyCreateUpdateParameters) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateParameters.
type ClientEncryptionKeyCreateUpdateProperties ¶ added in v2.2.0
type ClientEncryptionKeyCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a ClientEncryptionKey Resource *ClientEncryptionKeyResource }
ClientEncryptionKeyCreateUpdateProperties - Properties to create and update ClientEncryptionKey.
func (ClientEncryptionKeyCreateUpdateProperties) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyCreateUpdateProperties.
func (*ClientEncryptionKeyCreateUpdateProperties) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyCreateUpdateProperties.
type ClientEncryptionKeyGetProperties ¶ added in v2.2.0
type ClientEncryptionKeyGetProperties struct {
Resource *ClientEncryptionKeyGetPropertiesResource
}
ClientEncryptionKeyGetProperties - The properties of a ClientEncryptionKey resource
func (ClientEncryptionKeyGetProperties) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetProperties.
func (*ClientEncryptionKeyGetProperties) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetProperties.
type ClientEncryptionKeyGetPropertiesResource ¶ added in v2.2.0
type ClientEncryptionKeyGetPropertiesResource struct { // Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. EncryptionAlgorithm *string // Name of the ClientEncryptionKey ID *string // Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. KeyWrapMetadata *KeyWrapMetadata // Wrapped (encrypted) form of the key represented as a byte array. WrappedDataEncryptionKey []byte // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (ClientEncryptionKeyGetPropertiesResource) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetPropertiesResource.
func (*ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetPropertiesResource.
type ClientEncryptionKeyGetResults ¶ added in v2.2.0
type ClientEncryptionKeyGetResults struct { // The properties of a ClientEncryptionKey Properties *ClientEncryptionKeyGetProperties // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ClientEncryptionKeyGetResults - Client Encryption Key.
func (ClientEncryptionKeyGetResults) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetResults.
func (*ClientEncryptionKeyGetResults) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetResults.
type ClientEncryptionKeyResource ¶ added in v2.2.0
type ClientEncryptionKeyResource struct { // Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. EncryptionAlgorithm *string // Name of the ClientEncryptionKey ID *string // Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. KeyWrapMetadata *KeyWrapMetadata // Wrapped (encrypted) form of the key represented as a byte array. WrappedDataEncryptionKey []byte }
ClientEncryptionKeyResource - Cosmos DB client encryption key resource object.
func (ClientEncryptionKeyResource) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyResource.
func (*ClientEncryptionKeyResource) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyResource.
type ClientEncryptionKeysListResult ¶ added in v2.2.0
type ClientEncryptionKeysListResult struct { // READ-ONLY; List of client encryption keys and their properties. Value []*ClientEncryptionKeyGetResults }
ClientEncryptionKeysListResult - The List operation response, that contains the client encryption keys and their properties.
func (ClientEncryptionKeysListResult) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionKeysListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeysListResult.
func (*ClientEncryptionKeysListResult) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionKeysListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeysListResult.
type ClientEncryptionPolicy ¶ added in v2.2.0
type ClientEncryptionPolicy struct { // REQUIRED; Paths of the item that need encryption along with path-specific settings. IncludedPaths []*ClientEncryptionIncludedPath // REQUIRED; Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and // partition key path encryption. PolicyFormatVersion *int32 }
ClientEncryptionPolicy - Cosmos DB client encryption policy.
func (ClientEncryptionPolicy) MarshalJSON ¶ added in v2.2.0
func (c ClientEncryptionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientEncryptionPolicy.
func (*ClientEncryptionPolicy) UnmarshalJSON ¶ added in v2.2.0
func (c *ClientEncryptionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionPolicy.
type ClientFactory ¶ added in v2.3.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v2.3.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewCassandraClustersClient ¶ added in v2.3.0
func (c *ClientFactory) NewCassandraClustersClient() *CassandraClustersClient
NewCassandraClustersClient creates a new instance of CassandraClustersClient.
func (*ClientFactory) NewCassandraDataCentersClient ¶ added in v2.3.0
func (c *ClientFactory) NewCassandraDataCentersClient() *CassandraDataCentersClient
NewCassandraDataCentersClient creates a new instance of CassandraDataCentersClient.
func (*ClientFactory) NewCassandraResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewCassandraResourcesClient() *CassandraResourcesClient
NewCassandraResourcesClient creates a new instance of CassandraResourcesClient.
func (*ClientFactory) NewCollectionClient ¶ added in v2.3.0
func (c *ClientFactory) NewCollectionClient() *CollectionClient
NewCollectionClient creates a new instance of CollectionClient.
func (*ClientFactory) NewCollectionPartitionClient ¶ added in v2.3.0
func (c *ClientFactory) NewCollectionPartitionClient() *CollectionPartitionClient
NewCollectionPartitionClient creates a new instance of CollectionPartitionClient.
func (*ClientFactory) NewCollectionPartitionRegionClient ¶ added in v2.3.0
func (c *ClientFactory) NewCollectionPartitionRegionClient() *CollectionPartitionRegionClient
NewCollectionPartitionRegionClient creates a new instance of CollectionPartitionRegionClient.
func (*ClientFactory) NewCollectionRegionClient ¶ added in v2.3.0
func (c *ClientFactory) NewCollectionRegionClient() *CollectionRegionClient
NewCollectionRegionClient creates a new instance of CollectionRegionClient.
func (*ClientFactory) NewDatabaseAccountRegionClient ¶ added in v2.3.0
func (c *ClientFactory) NewDatabaseAccountRegionClient() *DatabaseAccountRegionClient
NewDatabaseAccountRegionClient creates a new instance of DatabaseAccountRegionClient.
func (*ClientFactory) NewDatabaseAccountsClient ¶ added in v2.3.0
func (c *ClientFactory) NewDatabaseAccountsClient() *DatabaseAccountsClient
NewDatabaseAccountsClient creates a new instance of DatabaseAccountsClient.
func (*ClientFactory) NewDatabaseClient ¶ added in v2.3.0
func (c *ClientFactory) NewDatabaseClient() *DatabaseClient
NewDatabaseClient creates a new instance of DatabaseClient.
func (*ClientFactory) NewGremlinResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewGremlinResourcesClient() *GremlinResourcesClient
NewGremlinResourcesClient creates a new instance of GremlinResourcesClient.
func (*ClientFactory) NewLocationsClient ¶ added in v2.3.0
func (c *ClientFactory) NewLocationsClient() *LocationsClient
NewLocationsClient creates a new instance of LocationsClient.
func (*ClientFactory) NewMongoDBResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewMongoDBResourcesClient() *MongoDBResourcesClient
NewMongoDBResourcesClient creates a new instance of MongoDBResourcesClient.
func (*ClientFactory) NewNotebookWorkspacesClient ¶ added in v2.3.0
func (c *ClientFactory) NewNotebookWorkspacesClient() *NotebookWorkspacesClient
NewNotebookWorkspacesClient creates a new instance of NotebookWorkspacesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v2.3.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPartitionKeyRangeIDClient ¶ added in v2.3.0
func (c *ClientFactory) NewPartitionKeyRangeIDClient() *PartitionKeyRangeIDClient
NewPartitionKeyRangeIDClient creates a new instance of PartitionKeyRangeIDClient.
func (*ClientFactory) NewPartitionKeyRangeIDRegionClient ¶ added in v2.3.0
func (c *ClientFactory) NewPartitionKeyRangeIDRegionClient() *PartitionKeyRangeIDRegionClient
NewPartitionKeyRangeIDRegionClient creates a new instance of PartitionKeyRangeIDRegionClient.
func (*ClientFactory) NewPercentileClient ¶ added in v2.3.0
func (c *ClientFactory) NewPercentileClient() *PercentileClient
NewPercentileClient creates a new instance of PercentileClient.
func (*ClientFactory) NewPercentileSourceTargetClient ¶ added in v2.3.0
func (c *ClientFactory) NewPercentileSourceTargetClient() *PercentileSourceTargetClient
NewPercentileSourceTargetClient creates a new instance of PercentileSourceTargetClient.
func (*ClientFactory) NewPercentileTargetClient ¶ added in v2.3.0
func (c *ClientFactory) NewPercentileTargetClient() *PercentileTargetClient
NewPercentileTargetClient creates a new instance of PercentileTargetClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v2.3.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewRestorableDatabaseAccountsClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableDatabaseAccountsClient() *RestorableDatabaseAccountsClient
NewRestorableDatabaseAccountsClient creates a new instance of RestorableDatabaseAccountsClient.
func (*ClientFactory) NewRestorableGremlinDatabasesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableGremlinDatabasesClient() *RestorableGremlinDatabasesClient
NewRestorableGremlinDatabasesClient creates a new instance of RestorableGremlinDatabasesClient.
func (*ClientFactory) NewRestorableGremlinGraphsClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableGremlinGraphsClient() *RestorableGremlinGraphsClient
NewRestorableGremlinGraphsClient creates a new instance of RestorableGremlinGraphsClient.
func (*ClientFactory) NewRestorableGremlinResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableGremlinResourcesClient() *RestorableGremlinResourcesClient
NewRestorableGremlinResourcesClient creates a new instance of RestorableGremlinResourcesClient.
func (*ClientFactory) NewRestorableMongodbCollectionsClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableMongodbCollectionsClient() *RestorableMongodbCollectionsClient
NewRestorableMongodbCollectionsClient creates a new instance of RestorableMongodbCollectionsClient.
func (*ClientFactory) NewRestorableMongodbDatabasesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableMongodbDatabasesClient() *RestorableMongodbDatabasesClient
NewRestorableMongodbDatabasesClient creates a new instance of RestorableMongodbDatabasesClient.
func (*ClientFactory) NewRestorableMongodbResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableMongodbResourcesClient() *RestorableMongodbResourcesClient
NewRestorableMongodbResourcesClient creates a new instance of RestorableMongodbResourcesClient.
func (*ClientFactory) NewRestorableSQLContainersClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableSQLContainersClient() *RestorableSQLContainersClient
NewRestorableSQLContainersClient creates a new instance of RestorableSQLContainersClient.
func (*ClientFactory) NewRestorableSQLDatabasesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableSQLDatabasesClient() *RestorableSQLDatabasesClient
NewRestorableSQLDatabasesClient creates a new instance of RestorableSQLDatabasesClient.
func (*ClientFactory) NewRestorableSQLResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableSQLResourcesClient() *RestorableSQLResourcesClient
NewRestorableSQLResourcesClient creates a new instance of RestorableSQLResourcesClient.
func (*ClientFactory) NewRestorableTableResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableTableResourcesClient() *RestorableTableResourcesClient
NewRestorableTableResourcesClient creates a new instance of RestorableTableResourcesClient.
func (*ClientFactory) NewRestorableTablesClient ¶ added in v2.3.0
func (c *ClientFactory) NewRestorableTablesClient() *RestorableTablesClient
NewRestorableTablesClient creates a new instance of RestorableTablesClient.
func (*ClientFactory) NewSQLResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewSQLResourcesClient() *SQLResourcesClient
NewSQLResourcesClient creates a new instance of SQLResourcesClient.
func (*ClientFactory) NewServiceClient ¶ added in v2.3.0
func (c *ClientFactory) NewServiceClient() *ServiceClient
NewServiceClient creates a new instance of ServiceClient.
func (*ClientFactory) NewTableResourcesClient ¶ added in v2.3.0
func (c *ClientFactory) NewTableResourcesClient() *TableResourcesClient
NewTableResourcesClient creates a new instance of TableResourcesClient.
type ClusterKey ¶
type ClusterKey struct { // 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 }
ClusterKey - Cosmos DB Cassandra table cluster key
func (ClusterKey) MarshalJSON ¶
func (c ClusterKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterKey.
func (*ClusterKey) UnmarshalJSON ¶
func (c *ClusterKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterKey.
type ClusterResource ¶
type ClusterResource struct { // Identity for the resource. Identity *ManagedCassandraManagedServiceIdentity // The location of the resource group to which the resource belongs. Location *string // Properties of a managed Cassandra cluster. Properties *ClusterResourceProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ClusterResource - Representation of a managed Cassandra cluster.
func (ClusterResource) MarshalJSON ¶
func (c ClusterResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterResource.
func (*ClusterResource) UnmarshalJSON ¶
func (c *ClusterResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResource.
type ClusterResourceProperties ¶
type ClusterResourceProperties struct { // Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not // be used except in emergencies. 'Cassandra' is the default password based // authentication. The default is 'Cassandra'. AuthenticationMethod *AuthenticationMethod // Whether Cassandra audit logging is enabled CassandraAuditLoggingEnabled *bool // Which version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, the cluster may take some // time to migrate to the new version. CassandraVersion *string // List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether // clientCertificates is set or not, but if clientCertificates is set, the managed // Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more // of the public certificates in this property. ClientCertificates []*Certificate // If you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set // the value to use on this property. ClusterNameOverride *string // Whether the cluster and associated data centers has been deallocated. Deallocated *bool // Resource id of a subnet that this cluster's management service should have its network interface attached to. The subnet // must be routable to all subnets that will be delegated to data centers. The // resource id must be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' DelegatedManagementSubnetID *string // List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged // data centers must be verifiable using one of the certificates provided in // this property. ExternalGossipCertificates []*Certificate // List of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed node lists of all managed // nodes. ExternalSeedNodes []*SeedNode // (Deprecated) Number of hours to wait between taking a backup of the cluster. HoursBetweenBackups *int32 // Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null // on GET. This field only applies when the authenticationMethod field is // 'Cassandra'. InitialCassandraAdminPassword *string // Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. PrometheusEndpoint *SeedNode // Error related to resource provisioning. ProvisionError *CassandraError // The status of the resource at the time the operation was called. ProvisioningState *ManagedCassandraProvisioningState // Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid // cluster where you are already doing your own repairs. RepairEnabled *bool // To create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to // the resource id of the backup. RestoreFromBackupID *string // READ-ONLY; List of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All managed nodes will // present TLS client certificates that are verifiable using one of the certificates // provided in this property. GossipCertificates []*Certificate // READ-ONLY; List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists // of all unmanaged nodes. SeedNodes []*SeedNode }
ClusterResourceProperties - Properties of a managed Cassandra cluster.
func (ClusterResourceProperties) MarshalJSON ¶
func (c ClusterResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties.
func (*ClusterResourceProperties) UnmarshalJSON ¶
func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties.
type CollectionClient ¶
type CollectionClient struct {
// contains filtered or unexported fields
}
CollectionClient contains the methods for the Collection group. Don't use this type directly, use NewCollectionClient() instead.
func NewCollectionClient ¶
func NewCollectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionClient, error)
NewCollectionClient creates a new instance of CollectionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CollectionClient) NewListMetricDefinitionsPager ¶
func (client *CollectionClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, options *CollectionClientListMetricDefinitionsOptions) *runtime.Pager[CollectionClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Retrieves metric definitions for the given collection.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- options - CollectionClientListMetricDefinitionsOptions contains the optional parameters for the CollectionClient.NewListMetricDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionGetMetricDefinitions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionClient().NewListMetricDefinitionsPager("rg1", "ddb1", "databaseRid", "collectionRid", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricDefinitionsListResult = armcosmos.MetricDefinitionsListResult{ // Value: []*armcosmos.MetricDefinition{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // MetricAvailabilities: []*armcosmos.MetricAvailability{ // { // Retention: to.Ptr("P2D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P60D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armcosmos.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*CollectionClient) NewListMetricsPager ¶
func (client *CollectionClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string, options *CollectionClientListMetricsOptions) *runtime.Pager[CollectionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and collection.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - CollectionClientListMetricsOptions contains the optional parameters for the CollectionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionClient().NewListMetricsPager("rg1", "ddb1", "databaseRid", "collectionRid", "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armcosmos.MetricListResult{ // Value: []*armcosmos.Metric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:03:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:08:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*CollectionClient) NewListUsagesPager ¶
func (client *CollectionClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, options *CollectionClientListUsagesOptions) *runtime.Pager[CollectionClientListUsagesResponse]
NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- options - CollectionClientListUsagesOptions contains the optional parameters for the CollectionClient.NewListUsagesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionGetUsages.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionClient().NewListUsagesPager("rg1", "ddb1", "databaseRid", "collectionRid", &armcosmos.CollectionClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsagesResult = armcosmos.UsagesResult{ // Value: []*armcosmos.Usage{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Storage"), // Value: to.Ptr("Storage"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](10737418240), // QuotaPeriod: to.Ptr("P1D"), // Unit: to.Ptr(armcosmos.UnitTypeBytes), // }}, // } }
Output:
type CollectionClientListMetricDefinitionsOptions ¶
type CollectionClientListMetricDefinitionsOptions struct { }
CollectionClientListMetricDefinitionsOptions contains the optional parameters for the CollectionClient.NewListMetricDefinitionsPager method.
type CollectionClientListMetricDefinitionsResponse ¶
type CollectionClientListMetricDefinitionsResponse struct { // The response to a list metric definitions request. MetricDefinitionsListResult }
CollectionClientListMetricDefinitionsResponse contains the response from method CollectionClient.NewListMetricDefinitionsPager.
type CollectionClientListMetricsOptions ¶
type CollectionClientListMetricsOptions struct { }
CollectionClientListMetricsOptions contains the optional parameters for the CollectionClient.NewListMetricsPager method.
type CollectionClientListMetricsResponse ¶
type CollectionClientListMetricsResponse struct { // The response to a list metrics request. MetricListResult }
CollectionClientListMetricsResponse contains the response from method CollectionClient.NewListMetricsPager.
type CollectionClientListUsagesOptions ¶
type CollectionClientListUsagesOptions struct { // An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of // the metric, can have an or of multiple names). Filter *string }
CollectionClientListUsagesOptions contains the optional parameters for the CollectionClient.NewListUsagesPager method.
type CollectionClientListUsagesResponse ¶
type CollectionClientListUsagesResponse struct { // The response to a list usage request. UsagesResult }
CollectionClientListUsagesResponse contains the response from method CollectionClient.NewListUsagesPager.
type CollectionPartitionClient ¶
type CollectionPartitionClient struct {
// contains filtered or unexported fields
}
CollectionPartitionClient contains the methods for the CollectionPartition group. Don't use this type directly, use NewCollectionPartitionClient() instead.
func NewCollectionPartitionClient ¶
func NewCollectionPartitionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionPartitionClient, error)
NewCollectionPartitionClient creates a new instance of CollectionPartitionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CollectionPartitionClient) NewListMetricsPager ¶
func (client *CollectionPartitionClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string, options *CollectionPartitionClientListMetricsOptions) *runtime.Pager[CollectionPartitionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection, split by partition.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - CollectionPartitionClientListMetricsOptions contains the optional parameters for the CollectionPartitionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionPartitionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionPartitionClient().NewListMetricsPager("rg1", "ddb1", "databaseRid", "collectionRid", "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PartitionMetricListResult = armcosmos.PartitionMetricListResult{ // Value: []*armcosmos.PartitionMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Max RUs Per Second"), // Value: to.Ptr("Max RUs Per Second"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T23:58:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:54:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:55:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:56:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:57:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT1M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // PartitionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PartitionKeyRangeID: to.Ptr("0"), // }}, // } }
Output:
func (*CollectionPartitionClient) NewListUsagesPager ¶
func (client *CollectionPartitionClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, options *CollectionPartitionClientListUsagesOptions) *runtime.Pager[CollectionPartitionClientListUsagesResponse]
NewListUsagesPager - Retrieves the usages (most recent storage data) for the given collection, split by partition.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- options - CollectionPartitionClientListUsagesOptions contains the optional parameters for the CollectionPartitionClient.NewListUsagesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionPartitionGetUsages.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionPartitionClient().NewListUsagesPager("rg1", "ddb1", "databaseRid", "collectionRid", &armcosmos.CollectionPartitionClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Partition Storage'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PartitionUsagesResult = armcosmos.PartitionUsagesResult{ // Value: []*armcosmos.PartitionUsage{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Storage"), // Value: to.Ptr("Storage"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](10737418240), // QuotaPeriod: to.Ptr("P1D"), // Unit: to.Ptr(armcosmos.UnitTypeBytes), // PartitionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PartitionKeyRangeID: to.Ptr("0"), // }}, // } }
Output:
type CollectionPartitionClientListMetricsOptions ¶
type CollectionPartitionClientListMetricsOptions struct { }
CollectionPartitionClientListMetricsOptions contains the optional parameters for the CollectionPartitionClient.NewListMetricsPager method.
type CollectionPartitionClientListMetricsResponse ¶
type CollectionPartitionClientListMetricsResponse struct { // The response to a list partition metrics request. PartitionMetricListResult }
CollectionPartitionClientListMetricsResponse contains the response from method CollectionPartitionClient.NewListMetricsPager.
type CollectionPartitionClientListUsagesOptions ¶
type CollectionPartitionClientListUsagesOptions struct { // An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of // the metric, can have an or of multiple names). Filter *string }
CollectionPartitionClientListUsagesOptions contains the optional parameters for the CollectionPartitionClient.NewListUsagesPager method.
type CollectionPartitionClientListUsagesResponse ¶
type CollectionPartitionClientListUsagesResponse struct { // The response to a list partition level usage request. PartitionUsagesResult }
CollectionPartitionClientListUsagesResponse contains the response from method CollectionPartitionClient.NewListUsagesPager.
type CollectionPartitionRegionClient ¶
type CollectionPartitionRegionClient struct {
// contains filtered or unexported fields
}
CollectionPartitionRegionClient contains the methods for the CollectionPartitionRegion group. Don't use this type directly, use NewCollectionPartitionRegionClient() instead.
func NewCollectionPartitionRegionClient ¶
func NewCollectionPartitionRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionPartitionRegionClient, error)
NewCollectionPartitionRegionClient creates a new instance of CollectionPartitionRegionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CollectionPartitionRegionClient) NewListMetricsPager ¶
func (client *CollectionPartitionRegionClient) NewListMetricsPager(resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string, options *CollectionPartitionRegionClientListMetricsOptions) *runtime.Pager[CollectionPartitionRegionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given collection and region, split by partition.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- region - Cosmos DB region, with spaces between words and each word capitalized.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - CollectionPartitionRegionClientListMetricsOptions contains the optional parameters for the CollectionPartitionRegionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionPartitionRegionClient().NewListMetricsPager("rg1", "ddb1", "North Europe", "databaseRid", "collectionRid", "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PartitionMetricListResult = armcosmos.PartitionMetricListResult{ // Value: []*armcosmos.PartitionMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Max RUs Per Second"), // Value: to.Ptr("Max RUs Per Second"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T23:58:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:54:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:55:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:56:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:57:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT1M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // PartitionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PartitionKeyRangeID: to.Ptr("0"), // }}, // } }
Output:
type CollectionPartitionRegionClientListMetricsOptions ¶
type CollectionPartitionRegionClientListMetricsOptions struct { }
CollectionPartitionRegionClientListMetricsOptions contains the optional parameters for the CollectionPartitionRegionClient.NewListMetricsPager method.
type CollectionPartitionRegionClientListMetricsResponse ¶
type CollectionPartitionRegionClientListMetricsResponse struct { // The response to a list partition metrics request. PartitionMetricListResult }
CollectionPartitionRegionClientListMetricsResponse contains the response from method CollectionPartitionRegionClient.NewListMetricsPager.
type CollectionRegionClient ¶
type CollectionRegionClient struct {
// contains filtered or unexported fields
}
CollectionRegionClient contains the methods for the CollectionRegion group. Don't use this type directly, use NewCollectionRegionClient() instead.
func NewCollectionRegionClient ¶
func NewCollectionRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectionRegionClient, error)
NewCollectionRegionClient creates a new instance of CollectionRegionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CollectionRegionClient) NewListMetricsPager ¶
func (client *CollectionRegionClient) NewListMetricsPager(resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string, options *CollectionRegionClientListMetricsOptions) *runtime.Pager[CollectionRegionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account, collection and region.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- region - Cosmos DB region, with spaces between words and each word capitalized.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - CollectionRegionClientListMetricsOptions contains the optional parameters for the CollectionRegionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRegionCollectionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCollectionRegionClient().NewListMetricsPager("rg1", "ddb1", "North Europe", "databaseRid", "collectionRid", "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armcosmos.MetricListResult{ // Value: []*armcosmos.Metric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:03:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:08:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
type CollectionRegionClientListMetricsOptions ¶
type CollectionRegionClientListMetricsOptions struct { }
CollectionRegionClientListMetricsOptions contains the optional parameters for the CollectionRegionClient.NewListMetricsPager method.
type CollectionRegionClientListMetricsResponse ¶
type CollectionRegionClientListMetricsResponse struct { // The response to a list metrics request. MetricListResult }
CollectionRegionClientListMetricsResponse contains the response from method CollectionRegionClient.NewListMetricsPager.
type Column ¶
type Column struct { // Name of the Cosmos DB Cassandra table column Name *string // Type of the Cosmos DB Cassandra table column Type *string }
Column - Cosmos DB Cassandra table column
func (Column) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Column.
func (*Column) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Column.
type CommandOutput ¶
type CommandOutput struct { // Output of the command. CommandOutput *string }
CommandOutput - Response of /command api
func (CommandOutput) MarshalJSON ¶
func (c CommandOutput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CommandOutput.
func (*CommandOutput) UnmarshalJSON ¶
func (c *CommandOutput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CommandOutput.
type CommandPostBody ¶
type CommandPostBody struct { // REQUIRED; The command which should be run Command *string // REQUIRED; IP address of the cassandra host to run the command on Host *string // The arguments for the command to be run Arguments map[string]*string // If true, stops cassandra before executing the command and then start it again CassandraStopStart *bool // If true, allows the command to write to the cassandra directory, otherwise read-only. Readwrite *bool }
CommandPostBody - Specification of which command to run where
func (CommandPostBody) MarshalJSON ¶
func (c CommandPostBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CommandPostBody.
func (*CommandPostBody) UnmarshalJSON ¶
func (c *CommandPostBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CommandPostBody.
type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties ¶
type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties struct { // READ-ONLY; The client id of user assigned identity. ClientID *string // READ-ONLY; The principal id of user assigned identity. PrincipalID *string }
func (Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON ¶
func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties.
func (*Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON ¶
func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties.
type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems ¶
type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems struct { // The node's IP address. Address *string // A float representing the current system-wide CPU utilization as a percentage. CPUUsage *float64 // Cassandra service status on this node CassandraProcessStatus *string // The amount of disk free, in kB, of the directory /var/lib/cassandra. DiskFreeKB *int64 // The amount of disk used, in kB, of the directory /var/lib/cassandra. DiskUsedKB *int64 // The network ID of the node. HostID *string // The amount of file system data in the data directory (e.g., 47.66 kB), excluding all content in the snapshots subdirectories. // Because all SSTable data files are included, any data that is not cleaned // up (such as TTL-expired cells or tombstones) is counted. Load *string // Memory used by kernel buffers (Buffers in /proc/meminfo) and page cache and slabs (Cached and SReclaimable in /proc/meminfo), // in kB. MemoryBuffersAndCachedKB *int64 // Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. MemoryFreeKB *int64 // Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB. MemoryTotalKB *int64 // Used memory (calculated as total - free - buffers - cache), in kB. MemoryUsedKB *int64 // The rack this node is part of. Rack *string Size *int32 // The state of the node in Cassandra ring. State *NodeState Status *string // The timestamp when these statistics were captured. Timestamp *string // List of tokens this node covers. Tokens []*string }
func (ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) MarshalJSON ¶
func (c ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems.
func (*ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) UnmarshalJSON ¶
func (c *ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems.
type CompositePath ¶
type CompositePath struct { // Sort order for composite paths. Order *CompositePathSortOrder // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string }
func (CompositePath) MarshalJSON ¶
func (c CompositePath) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CompositePath.
func (*CompositePath) UnmarshalJSON ¶
func (c *CompositePath) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CompositePath.
type CompositePathSortOrder ¶
type CompositePathSortOrder string
CompositePathSortOrder - Sort order for composite paths.
const ( CompositePathSortOrderAscending CompositePathSortOrder = "ascending" CompositePathSortOrderDescending CompositePathSortOrder = "descending" )
func PossibleCompositePathSortOrderValues ¶
func PossibleCompositePathSortOrderValues() []CompositePathSortOrder
PossibleCompositePathSortOrderValues returns the possible values for the CompositePathSortOrder const type.
type ComputedProperty ¶ added in v2.7.0
type ComputedProperty struct { // The name of a computed property, for example - "cp_lowerName" Name *string // The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c" Query *string }
ComputedProperty - The definition of a computed property
func (ComputedProperty) MarshalJSON ¶ added in v2.7.0
func (c ComputedProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ComputedProperty.
func (*ComputedProperty) UnmarshalJSON ¶ added in v2.7.0
func (c *ComputedProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ComputedProperty.
type ConflictResolutionMode ¶
type ConflictResolutionMode string
ConflictResolutionMode - Indicates the conflict resolution mode.
const ( ConflictResolutionModeCustom ConflictResolutionMode = "Custom" ConflictResolutionModeLastWriterWins ConflictResolutionMode = "LastWriterWins" )
func PossibleConflictResolutionModeValues ¶
func PossibleConflictResolutionModeValues() []ConflictResolutionMode
PossibleConflictResolutionModeValues returns the possible values for the ConflictResolutionMode const type.
type ConflictResolutionPolicy ¶
type ConflictResolutionPolicy struct { // 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 // Indicates the conflict resolution mode. Mode *ConflictResolutionMode }
ConflictResolutionPolicy - The conflict resolution policy for the container.
func (ConflictResolutionPolicy) MarshalJSON ¶
func (c ConflictResolutionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConflictResolutionPolicy.
func (*ConflictResolutionPolicy) UnmarshalJSON ¶
func (c *ConflictResolutionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConflictResolutionPolicy.
type ConnectionError ¶
type ConnectionError struct { // The kind of connection error that occurred. ConnectionState *ConnectionState // Detailed error message about the failed connection. Exception *string // The IP of host that originated the failed connection. IPFrom *string // The IP that the connection attempted to reach. IPTo *string // The TCP port the connection was attempted on. Port *int32 }
func (ConnectionError) MarshalJSON ¶
func (c ConnectionError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectionError.
func (*ConnectionError) UnmarshalJSON ¶
func (c *ConnectionError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionError.
type ConnectionState ¶
type ConnectionState string
ConnectionState - The kind of connection error that occurred.
const ( ConnectionStateDatacenterToDatacenterNetworkError ConnectionState = "DatacenterToDatacenterNetworkError" ConnectionStateInternalError ConnectionState = "InternalError" ConnectionStateInternalOperatorToDataCenterCertificateError ConnectionState = "InternalOperatorToDataCenterCertificateError" ConnectionStateOK ConnectionState = "OK" ConnectionStateOperatorToDataCenterNetworkError ConnectionState = "OperatorToDataCenterNetworkError" ConnectionStateUnknown ConnectionState = "Unknown" )
func PossibleConnectionStateValues ¶
func PossibleConnectionStateValues() []ConnectionState
PossibleConnectionStateValues returns the possible values for the ConnectionState const type.
type ConnectorOffer ¶
type ConnectorOffer string
ConnectorOffer - The cassandra connector offer type for the Cosmos DB C* database account.
const (
ConnectorOfferSmall ConnectorOffer = "Small"
)
func PossibleConnectorOfferValues ¶
func PossibleConnectorOfferValues() []ConnectorOffer
PossibleConnectorOfferValues returns the possible values for the ConnectorOffer const type.
type ConsistencyPolicy ¶
type ConsistencyPolicy struct { // REQUIRED; The default consistency level and configuration settings of the Cosmos DB account. DefaultConsistencyLevel *DefaultConsistencyLevel // 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 *int32 // 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 *int64 }
ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
func (ConsistencyPolicy) MarshalJSON ¶
func (c ConsistencyPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConsistencyPolicy.
func (*ConsistencyPolicy) UnmarshalJSON ¶
func (c *ConsistencyPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConsistencyPolicy.
type ContainerPartitionKey ¶
type ContainerPartitionKey struct { // Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are // supported for container create Kind *PartitionKind // List of paths using which data within the container can be partitioned Paths []*string // Indicates the version of the partition key definition Version *int32 // READ-ONLY; Indicates if the container is using a system generated partition key SystemKey *bool }
ContainerPartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions
func (ContainerPartitionKey) MarshalJSON ¶
func (c ContainerPartitionKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerPartitionKey.
func (*ContainerPartitionKey) UnmarshalJSON ¶
func (c *ContainerPartitionKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerPartitionKey.
type ContinuousBackupInformation ¶
type ContinuousBackupInformation struct { // The latest restorable timestamp for a resource. LatestRestorableTimestamp *string }
ContinuousBackupInformation - Information about the status of continuous backups.
func (ContinuousBackupInformation) MarshalJSON ¶
func (c ContinuousBackupInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContinuousBackupInformation.
func (*ContinuousBackupInformation) UnmarshalJSON ¶
func (c *ContinuousBackupInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupInformation.
type ContinuousBackupRestoreLocation ¶
type ContinuousBackupRestoreLocation struct { // The name of the continuous backup restore location. Location *string }
ContinuousBackupRestoreLocation - Properties of the regional restorable account.
func (ContinuousBackupRestoreLocation) MarshalJSON ¶
func (c ContinuousBackupRestoreLocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContinuousBackupRestoreLocation.
func (*ContinuousBackupRestoreLocation) UnmarshalJSON ¶
func (c *ContinuousBackupRestoreLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousBackupRestoreLocation.
type ContinuousModeBackupPolicy ¶
type ContinuousModeBackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType // Configuration values for continuous mode backup ContinuousModeProperties *ContinuousModeProperties // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState }
ContinuousModeBackupPolicy - The object representing continuous mode backup policy.
func (*ContinuousModeBackupPolicy) GetBackupPolicy ¶
func (c *ContinuousModeBackupPolicy) GetBackupPolicy() *BackupPolicy
GetBackupPolicy implements the BackupPolicyClassification interface for type ContinuousModeBackupPolicy.
func (ContinuousModeBackupPolicy) MarshalJSON ¶
func (c ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContinuousModeBackupPolicy.
func (*ContinuousModeBackupPolicy) UnmarshalJSON ¶
func (c *ContinuousModeBackupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeBackupPolicy.
type ContinuousModeProperties ¶ added in v2.5.0
type ContinuousModeProperties struct { // Enum to indicate type of Continuous backup mode Tier *ContinuousTier }
ContinuousModeProperties - Configuration values for periodic mode backup
func (ContinuousModeProperties) MarshalJSON ¶ added in v2.5.0
func (c ContinuousModeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContinuousModeProperties.
func (*ContinuousModeProperties) UnmarshalJSON ¶ added in v2.5.0
func (c *ContinuousModeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeProperties.
type ContinuousTier ¶ added in v2.5.0
type ContinuousTier string
ContinuousTier - Enum to indicate type of Continuous backup tier.
const ( ContinuousTierContinuous30Days ContinuousTier = "Continuous30Days" ContinuousTierContinuous7Days ContinuousTier = "Continuous7Days" )
func PossibleContinuousTierValues ¶ added in v2.5.0
func PossibleContinuousTierValues() []ContinuousTier
PossibleContinuousTierValues returns the possible values for the ContinuousTier const type.
type CorsPolicy ¶
type CorsPolicy struct { // REQUIRED; The origin domains that are permitted to make a request against the service via CORS. AllowedOrigins *string // The request headers that the origin domain may specify on the CORS request. AllowedHeaders *string // The methods (HTTP request verbs) that the origin domain may use for a CORS request. AllowedMethods *string // The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. ExposedHeaders *string // The maximum amount time that a browser should cache the preflight OPTIONS request. MaxAgeInSeconds *int64 }
CorsPolicy - The CORS policy for the Cosmos DB database account.
func (CorsPolicy) MarshalJSON ¶
func (c CorsPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CorsPolicy.
func (*CorsPolicy) UnmarshalJSON ¶
func (c *CorsPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CorsPolicy.
type CreateMode ¶
type CreateMode string
CreateMode - Enum to indicate the mode of account creation.
const ( CreateModeDefault CreateMode = "Default" CreateModeRestore CreateMode = "Restore" )
func PossibleCreateModeValues ¶
func PossibleCreateModeValues() []CreateMode
PossibleCreateModeValues returns the possible values for the CreateMode const type.
type CreateUpdateOptions ¶
type CreateUpdateOptions struct { // Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. AutoscaleSettings *AutoscaleSettings // Request Units per second. For example, "throughput": 10000. Throughput *int32 }
CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput"
func (CreateUpdateOptions) MarshalJSON ¶
func (c CreateUpdateOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateUpdateOptions.
func (*CreateUpdateOptions) UnmarshalJSON ¶
func (c *CreateUpdateOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateUpdateOptions.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DataCenterResource ¶
type DataCenterResource struct { // Properties of a managed Cassandra data center. Properties *DataCenterResourceProperties // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
DataCenterResource - A managed Cassandra data center.
func (DataCenterResource) MarshalJSON ¶
func (d DataCenterResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataCenterResource.
func (*DataCenterResource) UnmarshalJSON ¶
func (d *DataCenterResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResource.
type DataCenterResourceProperties ¶
type DataCenterResourceProperties struct { // Ldap authentication method properties. This feature is in preview. AuthenticationMethodLdapProperties *AuthenticationMethodLdapProperties // If the data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data // center virtual machines. AvailabilityZone *bool // Indicates the Key Uri of the customer key to use for encryption of the backup storage account. BackupStorageCustomerKeyURI *string // A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this data center. // The fragment should be Base64 encoded, and only a subset of keys are allowed. Base64EncodedCassandraYamlFragment *string // The region this data center should be created in. DataCenterLocation *string // Whether the data center has been deallocated. Deallocated *bool // Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must // be in the same region specified in 'dataCenterLocation' and must be able to // route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the // form '/subscriptions//resourceGroups/ // /providers/Microsoft.Network/virtualNetworks//subnets/'. DelegatedSubnetID *string // Number of disks attached to each node. Default is 4. DiskCapacity *int32 // Disk SKU used for data centers. Default value is P30. DiskSKU *string // Key uri to use for encryption of managed disks. Ensure the system assigned identity of the cluster has been assigned appropriate // permissions(key get/wrap/unwrap permissions) on the key. ManagedDiskCustomerKeyURI *string // The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for // the data center to be scaled to match. To monitor the number of nodes and their // status, use the fetchNodeStatus method on the cluster. NodeCount *int32 // Error related to resource provisioning. ProvisionError *CassandraError // The status of the resource at the time the operation was called. ProvisioningState *ManagedCassandraProvisioningState // Virtual Machine SKU used for data centers. Default value is StandardDS14v2 SKU *string // READ-ONLY; IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes // property on the cluster, which aggregates the seed nodes from all data centers in // the cluster. SeedNodes []*SeedNode }
DataCenterResourceProperties - Properties of a managed Cassandra data center.
func (DataCenterResourceProperties) MarshalJSON ¶
func (d DataCenterResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataCenterResourceProperties.
func (*DataCenterResourceProperties) UnmarshalJSON ¶
func (d *DataCenterResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataCenterResourceProperties.
type DataTransferRegionalServiceResource ¶
type DataTransferRegionalServiceResource struct { // READ-ONLY; The location name. Location *string // READ-ONLY; The regional service name. Name *string // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
DataTransferRegionalServiceResource - Resource for a regional service location.
func (DataTransferRegionalServiceResource) MarshalJSON ¶
func (d DataTransferRegionalServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataTransferRegionalServiceResource.
func (*DataTransferRegionalServiceResource) UnmarshalJSON ¶
func (d *DataTransferRegionalServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferRegionalServiceResource.
type DataTransferServiceResource ¶
type DataTransferServiceResource struct { // Properties for DataTransferServiceResource. Properties *DataTransferServiceResourceProperties }
DataTransferServiceResource - Describes the service response property.
func (DataTransferServiceResource) MarshalJSON ¶
func (d DataTransferServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResource.
func (*DataTransferServiceResource) UnmarshalJSON ¶
func (d *DataTransferServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResource.
type DataTransferServiceResourceProperties ¶
type DataTransferServiceResourceProperties struct { // REQUIRED; ServiceType for the service. ServiceType *ServiceType // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // READ-ONLY; Time of the last state change (ISO-8601 format). CreationTime *time.Time // READ-ONLY; An array that contains all of the locations for the service. Locations []*DataTransferRegionalServiceResource // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
DataTransferServiceResourceProperties - Properties for DataTransferServiceResource.
func (*DataTransferServiceResourceProperties) GetServiceResourceProperties ¶
func (d *DataTransferServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type DataTransferServiceResourceProperties.
func (DataTransferServiceResourceProperties) MarshalJSON ¶
func (d DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceProperties.
func (*DataTransferServiceResourceProperties) UnmarshalJSON ¶
func (d *DataTransferServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResourceProperties.
type DataType ¶
type DataType string
DataType - The datatype for which the indexing behavior is applied to.
func PossibleDataTypeValues ¶
func PossibleDataTypeValues() []DataType
PossibleDataTypeValues returns the possible values for the DataType const type.
type DatabaseAccountConnectionString ¶
type DatabaseAccountConnectionString struct { // READ-ONLY; Value of the connection string ConnectionString *string // READ-ONLY; Description of the connection string Description *string // READ-ONLY; Kind of the connection string key KeyKind *Kind // READ-ONLY; Type of the connection string Type *Type }
DatabaseAccountConnectionString - Connection string for the Cosmos DB account
func (DatabaseAccountConnectionString) MarshalJSON ¶
func (d DatabaseAccountConnectionString) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountConnectionString.
func (*DatabaseAccountConnectionString) UnmarshalJSON ¶
func (d *DatabaseAccountConnectionString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountConnectionString.
type DatabaseAccountCreateUpdateParameters ¶
type DatabaseAccountCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB database accounts. Properties *DatabaseAccountCreateUpdateProperties // Identity for the resource. Identity *ManagedServiceIdentity // Indicates the type of database account. This can only be set at database account creation. Kind *DatabaseAccountKind // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
DatabaseAccountCreateUpdateParameters - Parameters to create and update Cosmos DB database accounts.
func (DatabaseAccountCreateUpdateParameters) MarshalJSON ¶
func (d DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateParameters.
func (*DatabaseAccountCreateUpdateParameters) UnmarshalJSON ¶
func (d *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateParameters.
type DatabaseAccountCreateUpdateProperties ¶
type DatabaseAccountCreateUpdateProperties struct { // CONSTANT; The offer type for the database // Field has constant value "Standard", any specified value is ignored. DatabaseAccountOfferType *string // REQUIRED; An array that contains the georeplication locations enabled for the Cosmos DB account. Locations []*Location // API specific properties. Currently, supported only for MongoDB API. APIProperties *APIProperties // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification // List of Cosmos DB capabilities for the account Capabilities []*Capability // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer // The consistency policy for the Cosmos DB account. ConsistencyPolicy *ConsistencyPolicy // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy // Enum to indicate the mode of account creation. CreateMode *CreateMode // Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides // troubleshooting guidance. CustomerManagedKeyStatus *string // The default identity for accessing key vault used in features like customer managed keys. The default identity needs to // be explicitly set by the users. It can be "FirstPartyIdentity", // "SystemAssignedIdentity" and more. DefaultIdentity *string // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool // 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 *bool // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account EnableBurstCapacity *bool // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool // Flag to indicate enabling/disabling of Partition Merge feature on the account EnablePartitionMerge *bool // List of IpRules. IPRules []*IPAddressOrRange // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool // The URI of the key vault KeyVaultKeyURI *string // Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. MinimalTLSVersion *MinimalTLSVersion // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess // Parameters to indicate the information about the restore. RestoreParameters *RestoreParameters // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule // READ-ONLY; This property is ignored during the update/create operation, as the metadata is read-only. The object represents // the metadata for the Account Keys of the Cosmos DB account. KeysMetadata *DatabaseAccountKeysMetadata }
DatabaseAccountCreateUpdateProperties - Properties to create and update Azure Cosmos DB database accounts.
func (DatabaseAccountCreateUpdateProperties) MarshalJSON ¶
func (d DatabaseAccountCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountCreateUpdateProperties.
func (*DatabaseAccountCreateUpdateProperties) UnmarshalJSON ¶
func (d *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountCreateUpdateProperties.
type DatabaseAccountGetProperties ¶
type DatabaseAccountGetProperties struct { // API specific properties. APIProperties *APIProperties // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification // List of Cosmos DB capabilities for the account Capabilities []*Capability // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer // The consistency policy for the Cosmos DB database account. ConsistencyPolicy *ConsistencyPolicy // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy // Enum to indicate the mode of account creation. CreateMode *CreateMode // Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides // troubleshooting guidance. CustomerManagedKeyStatus *string // The default identity for accessing key vault used in features like customer managed keys. The default identity needs to // be explicitly set by the users. It can be "FirstPartyIdentity", // "SystemAssignedIdentity" and more. DefaultIdentity *string // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool // 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 *bool // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account EnableBurstCapacity *bool // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool // Flag to indicate enabling/disabling of Partition Merge feature on the account EnablePartitionMerge *bool // List of IpRules. IPRules []*IPAddressOrRange // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool // The URI of the key vault KeyVaultKeyURI *string // Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. MinimalTLSVersion *MinimalTLSVersion // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess // Parameters to indicate the information about the restore. RestoreParameters *RestoreParameters // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule // READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. DatabaseAccountOfferType *string // READ-ONLY; The connection endpoint for the Cosmos DB database account. DocumentEndpoint *string // READ-ONLY; An array that contains the regions ordered by their failover priorities. FailoverPolicies []*FailoverPolicy // READ-ONLY; A unique identifier assigned to the database account InstanceID *string // READ-ONLY; The object that represents the metadata for the Account Keys of the Cosmos DB account. KeysMetadata *DatabaseAccountKeysMetadata // READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account. Locations []*Location // READ-ONLY; List of Private Endpoint Connections configured for the Cosmos DB account. PrivateEndpointConnections []*PrivateEndpointConnection // READ-ONLY; 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. ProvisioningState *string // READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account. ReadLocations []*Location // READ-ONLY; An array that contains the write location for the Cosmos DB account. WriteLocations []*Location }
DatabaseAccountGetProperties - Properties for the database account.
func (DatabaseAccountGetProperties) MarshalJSON ¶
func (d DatabaseAccountGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetProperties.
func (*DatabaseAccountGetProperties) UnmarshalJSON ¶
func (d *DatabaseAccountGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetProperties.
type DatabaseAccountGetResults ¶
type DatabaseAccountGetResults struct { // Identity for the resource. Identity *ManagedServiceIdentity // Indicates the type of database account. This can only be set at database account creation. Kind *DatabaseAccountKind // The location of the resource group to which the resource belongs. Location *string // Properties for the database account. Properties *DatabaseAccountGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData // READ-ONLY; The type of Azure resource. Type *string }
DatabaseAccountGetResults - An Azure Cosmos DB database account.
func (DatabaseAccountGetResults) MarshalJSON ¶
func (d DatabaseAccountGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountGetResults.
func (*DatabaseAccountGetResults) UnmarshalJSON ¶
func (d *DatabaseAccountGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountGetResults.
type DatabaseAccountKeysMetadata ¶ added in v2.1.0
type DatabaseAccountKeysMetadata struct { // READ-ONLY; The metadata related to the Primary Read-Write Key for the given Cosmos DB database account. PrimaryMasterKey *AccountKeyMetadata // READ-ONLY; The metadata related to the Primary Read-Only Key for the given Cosmos DB database account. PrimaryReadonlyMasterKey *AccountKeyMetadata // READ-ONLY; The metadata related to the Secondary Read-Write Key for the given Cosmos DB database account. SecondaryMasterKey *AccountKeyMetadata // READ-ONLY; The metadata related to the Secondary Read-Only Key for the given Cosmos DB database account. SecondaryReadonlyMasterKey *AccountKeyMetadata }
DatabaseAccountKeysMetadata - The metadata related to each access key for the given Cosmos DB database account.
func (DatabaseAccountKeysMetadata) MarshalJSON ¶ added in v2.1.0
func (d DatabaseAccountKeysMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountKeysMetadata.
func (*DatabaseAccountKeysMetadata) UnmarshalJSON ¶ added in v2.1.0
func (d *DatabaseAccountKeysMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountKeysMetadata.
type DatabaseAccountKind ¶
type DatabaseAccountKind string
DatabaseAccountKind - Indicates the type of database account. This can only be set at database account creation.
const ( DatabaseAccountKindGlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB" DatabaseAccountKindMongoDB DatabaseAccountKind = "MongoDB" DatabaseAccountKindParse DatabaseAccountKind = "Parse" )
func PossibleDatabaseAccountKindValues ¶
func PossibleDatabaseAccountKindValues() []DatabaseAccountKind
PossibleDatabaseAccountKindValues returns the possible values for the DatabaseAccountKind const type.
type DatabaseAccountListConnectionStringsResult ¶
type DatabaseAccountListConnectionStringsResult struct { // An array that contains the connection strings for the Cosmos DB account. ConnectionStrings []*DatabaseAccountConnectionString }
DatabaseAccountListConnectionStringsResult - The connection strings for the given database account.
func (DatabaseAccountListConnectionStringsResult) MarshalJSON ¶
func (d DatabaseAccountListConnectionStringsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListConnectionStringsResult.
func (*DatabaseAccountListConnectionStringsResult) UnmarshalJSON ¶
func (d *DatabaseAccountListConnectionStringsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListConnectionStringsResult.
type DatabaseAccountListKeysResult ¶
type DatabaseAccountListKeysResult struct { // READ-ONLY; Base 64 encoded value of the primary read-write key. PrimaryMasterKey *string // READ-ONLY; Base 64 encoded value of the primary read-only key. PrimaryReadonlyMasterKey *string // READ-ONLY; Base 64 encoded value of the secondary read-write key. SecondaryMasterKey *string // READ-ONLY; Base 64 encoded value of the secondary read-only key. SecondaryReadonlyMasterKey *string }
DatabaseAccountListKeysResult - The access keys for the given database account.
func (DatabaseAccountListKeysResult) MarshalJSON ¶
func (d DatabaseAccountListKeysResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListKeysResult.
func (*DatabaseAccountListKeysResult) UnmarshalJSON ¶
func (d *DatabaseAccountListKeysResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListKeysResult.
type DatabaseAccountListReadOnlyKeysResult ¶
type DatabaseAccountListReadOnlyKeysResult struct { // READ-ONLY; Base 64 encoded value of the primary read-only key. PrimaryReadonlyMasterKey *string // READ-ONLY; Base 64 encoded value of the secondary read-only key. SecondaryReadonlyMasterKey *string }
DatabaseAccountListReadOnlyKeysResult - The read-only access keys for the given database account.
func (DatabaseAccountListReadOnlyKeysResult) MarshalJSON ¶
func (d DatabaseAccountListReadOnlyKeysResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountListReadOnlyKeysResult.
func (*DatabaseAccountListReadOnlyKeysResult) UnmarshalJSON ¶
func (d *DatabaseAccountListReadOnlyKeysResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountListReadOnlyKeysResult.
type DatabaseAccountRegenerateKeyParameters ¶
type DatabaseAccountRegenerateKeyParameters struct { // REQUIRED; The access key to regenerate. KeyKind *KeyKind }
DatabaseAccountRegenerateKeyParameters - Parameters to regenerate the keys within the database account.
func (DatabaseAccountRegenerateKeyParameters) MarshalJSON ¶
func (d DatabaseAccountRegenerateKeyParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountRegenerateKeyParameters.
func (*DatabaseAccountRegenerateKeyParameters) UnmarshalJSON ¶
func (d *DatabaseAccountRegenerateKeyParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountRegenerateKeyParameters.
type DatabaseAccountRegionClient ¶
type DatabaseAccountRegionClient struct {
// contains filtered or unexported fields
}
DatabaseAccountRegionClient contains the methods for the DatabaseAccountRegion group. Don't use this type directly, use NewDatabaseAccountRegionClient() instead.
func NewDatabaseAccountRegionClient ¶
func NewDatabaseAccountRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAccountRegionClient, error)
NewDatabaseAccountRegionClient creates a new instance of DatabaseAccountRegionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseAccountRegionClient) NewListMetricsPager ¶
func (client *DatabaseAccountRegionClient) NewListMetricsPager(resourceGroupName string, accountName string, region string, filter string, options *DatabaseAccountRegionClientListMetricsOptions) *runtime.Pager[DatabaseAccountRegionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and region.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- region - Cosmos DB region, with spaces between words and each word capitalized.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - DatabaseAccountRegionClientListMetricsOptions contains the optional parameters for the DatabaseAccountRegionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountRegionClient().NewListMetricsPager("rg1", "ddb1", "North Europe", "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armcosmos.MetricListResult{ // Value: []*armcosmos.Metric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:03:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:08:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
type DatabaseAccountRegionClientListMetricsOptions ¶
type DatabaseAccountRegionClientListMetricsOptions struct { }
DatabaseAccountRegionClientListMetricsOptions contains the optional parameters for the DatabaseAccountRegionClient.NewListMetricsPager method.
type DatabaseAccountRegionClientListMetricsResponse ¶
type DatabaseAccountRegionClientListMetricsResponse struct { // The response to a list metrics request. MetricListResult }
DatabaseAccountRegionClientListMetricsResponse contains the response from method DatabaseAccountRegionClient.NewListMetricsPager.
type DatabaseAccountUpdateParameters ¶
type DatabaseAccountUpdateParameters struct { // Identity for the resource. Identity *ManagedServiceIdentity // The location of the resource group to which the resource belongs. Location *string // Properties to update Azure Cosmos DB database accounts. Properties *DatabaseAccountUpdateProperties // 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". Tags map[string]*string }
DatabaseAccountUpdateParameters - Parameters for patching Azure Cosmos DB database account properties.
func (DatabaseAccountUpdateParameters) MarshalJSON ¶
func (d DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateParameters.
func (*DatabaseAccountUpdateParameters) UnmarshalJSON ¶
func (d *DatabaseAccountUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateParameters.
type DatabaseAccountUpdateProperties ¶
type DatabaseAccountUpdateProperties struct { // API specific properties. Currently, supported only for MongoDB API. APIProperties *APIProperties // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification // List of Cosmos DB capabilities for the account Capabilities []*Capability // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer // The consistency policy for the Cosmos DB account. ConsistencyPolicy *ConsistencyPolicy // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy // Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides // troubleshooting guidance. CustomerManagedKeyStatus *string // The default identity for accessing key vault used in features like customer managed keys. The default identity needs to // be explicitly set by the users. It can be "FirstPartyIdentity", // "SystemAssignedIdentity" and more. DefaultIdentity *string // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool // 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 *bool // Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account EnableBurstCapacity *bool // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool // Flag to indicate enabling/disabling of Partition Merge feature on the account EnablePartitionMerge *bool // List of IpRules. IPRules []*IPAddressOrRange // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool // The URI of the key vault KeyVaultKeyURI *string // An array that contains the georeplication locations enabled for the Cosmos DB account. Locations []*Location // Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. MinimalTLSVersion *MinimalTLSVersion // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule // READ-ONLY; This property is ignored during the update operation, as the metadata is read-only. The object represents the // metadata for the Account Keys of the Cosmos DB account. KeysMetadata *DatabaseAccountKeysMetadata }
DatabaseAccountUpdateProperties - Properties to update Azure Cosmos DB database accounts.
func (DatabaseAccountUpdateProperties) MarshalJSON ¶
func (d DatabaseAccountUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountUpdateProperties.
func (*DatabaseAccountUpdateProperties) UnmarshalJSON ¶
func (d *DatabaseAccountUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountUpdateProperties.
type DatabaseAccountsClient ¶
type DatabaseAccountsClient struct {
// contains filtered or unexported fields
}
DatabaseAccountsClient contains the methods for the DatabaseAccounts group. Don't use this type directly, use NewDatabaseAccountsClient() instead.
func NewDatabaseAccountsClient ¶
func NewDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAccountsClient, error)
NewDatabaseAccountsClient creates a new instance of DatabaseAccountsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseAccountsClient) BeginCreateOrUpdate ¶
func (client *DatabaseAccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters, options *DatabaseAccountsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseAccountsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- createUpdateParameters - The parameters to provide for the current database account.
- options - DatabaseAccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginCreateOrUpdate method.
Example (CosmosDbDatabaseAccountCreateMax) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountCreateUpdateParameters{ Location: to.Ptr("westus"), Tags: map[string]*string{}, Identity: &armcosmos.ManagedServiceIdentity{ Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, }, }, Kind: to.Ptr(armcosmos.DatabaseAccountKindMongoDB), Properties: &armcosmos.DatabaseAccountCreateUpdateProperties{ AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), }, APIProperties: &armcosmos.APIProperties{ ServerVersion: to.Ptr(armcosmos.ServerVersionThree2), }, BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ BackupIntervalInMinutes: to.Ptr[int32](240), BackupRetentionIntervalInHours: to.Ptr[int32](8), BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), }, }, Capacity: &armcosmos.Capacity{ TotalThroughputLimit: to.Ptr[int32](2000), }, ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), MaxIntervalInSeconds: to.Ptr[int32](10), MaxStalenessPrefix: to.Ptr[int64](200), }, Cors: []*armcosmos.CorsPolicy{ { AllowedOrigins: to.Ptr("https://test"), }}, CreateMode: to.Ptr(armcosmos.CreateModeDefault), DatabaseAccountOfferType: to.Ptr("Standard"), DefaultIdentity: to.Ptr("FirstPartyIdentity"), EnableAnalyticalStorage: to.Ptr(true), EnableBurstCapacity: to.Ptr(true), EnableFreeTier: to.Ptr(false), IPRules: []*armcosmos.IPAddressOrRange{ { IPAddressOrRange: to.Ptr("23.43.230.120"), }, { IPAddressOrRange: to.Ptr("110.12.240.0/12"), }}, IsVirtualNetworkFilterEnabled: to.Ptr(true), KeyVaultKeyURI: to.Ptr("https://myKeyVault.vault.azure.net"), Locations: []*armcosmos.Location{ { FailoverPriority: to.Ptr[int32](0), IsZoneRedundant: to.Ptr(false), LocationName: to.Ptr("southcentralus"), }, { FailoverPriority: to.Ptr[int32](1), IsZoneRedundant: to.Ptr(false), LocationName: to.Ptr("eastus"), }}, MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTls12), NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassAzureServices), NetworkACLBypassResourceIDs: []*string{ to.Ptr("/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName")}, PublicNetworkAccess: to.Ptr(armcosmos.PublicNetworkAccessEnabled), VirtualNetworkRules: []*armcosmos.VirtualNetworkRule{ { ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), IgnoreMissingVNetServiceEndpoint: to.Ptr(false), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountGetResults = armcosmos.DatabaseAccountGetResults{ // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), // TenantID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindMongoDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ // SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), // }, // APIProperties: &armcosmos.APIProperties{ // ServerVersion: to.Ptr(armcosmos.ServerVersionThree2), // }, // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](8), // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, // Capacity: &armcosmos.Capacity{ // TotalThroughputLimit: to.Ptr[int32](2000), // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), // MaxIntervalInSeconds: to.Ptr[int32](10), // MaxStalenessPrefix: to.Ptr[int64](200), // }, // Cors: []*armcosmos.CorsPolicy{ // { // AllowedOrigins: to.Ptr("https://test"), // }}, // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(true), // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // LocationName: to.Ptr("South Central US"), // }, // { // FailoverPriority: to.Ptr[int32](1), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // { // IPAddressOrRange: to.Ptr("23.43.230.120"), // }, // { // IPAddressOrRange: to.Ptr("110.12.240.0/12"), // }}, // IsVirtualNetworkFilterEnabled: to.Ptr(true), // KeyVaultKeyURI: to.Ptr("https://myKeyVault.vault.azure.net"), // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }, // { // FailoverPriority: to.Ptr[int32](1), // ID: to.Ptr("ddb1-eastus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTls12), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassAzureServices), // NetworkACLBypassResourceIDs: []*string{ // to.Ptr("/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName")}, // ProvisioningState: to.Ptr("Succeeded"), // PublicNetworkAccess: to.Ptr(armcosmos.PublicNetworkAccessEnabled), // ReadLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }, // { // FailoverPriority: to.Ptr[int32](1), // ID: to.Ptr("ddb1-eastus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // VirtualNetworkRules: []*armcosmos.VirtualNetworkRule{ // { // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // }}, // WriteLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // SystemData: &armcosmos.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }
Output:
Example (CosmosDbDatabaseAccountCreateMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountCreateUpdateParameters{ Location: to.Ptr("westus"), Properties: &armcosmos.DatabaseAccountCreateUpdateProperties{ CreateMode: to.Ptr(armcosmos.CreateModeDefault), DatabaseAccountOfferType: to.Ptr("Standard"), Locations: []*armcosmos.Location{ { FailoverPriority: to.Ptr[int32](0), IsZoneRedundant: to.Ptr(false), LocationName: to.Ptr("southcentralus"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountGetResults = armcosmos.DatabaseAccountGetResults{ // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // APIProperties: &armcosmos.APIProperties{ // }, // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](720), // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), // MaxStalenessPrefix: to.Ptr[int64](100), // }, // Cors: []*armcosmos.CorsPolicy{ // }, // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(false), // EnableFreeTier: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // LocationName: to.Ptr("South Central US"), // }}, // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassNone), // NetworkACLBypassResourceIDs: []*string{ // }, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // WriteLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // SystemData: &armcosmos.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }
Output:
Example (CosmosDbRestoreDatabaseAccountCreateUpdateJson) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestoreDatabaseAccountCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountCreateUpdateParameters{ Location: to.Ptr("westus"), Tags: map[string]*string{}, Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), Properties: &armcosmos.DatabaseAccountCreateUpdateProperties{ APIProperties: &armcosmos.APIProperties{ ServerVersion: to.Ptr(armcosmos.ServerVersionThree2), }, BackupPolicy: &armcosmos.ContinuousModeBackupPolicy{ Type: to.Ptr(armcosmos.BackupPolicyTypeContinuous), ContinuousModeProperties: &armcosmos.ContinuousModeProperties{ Tier: to.Ptr(armcosmos.ContinuousTierContinuous30Days), }, }, ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), MaxIntervalInSeconds: to.Ptr[int32](10), MaxStalenessPrefix: to.Ptr[int64](200), }, CreateMode: to.Ptr(armcosmos.CreateModeRestore), DatabaseAccountOfferType: to.Ptr("Standard"), EnableAnalyticalStorage: to.Ptr(true), EnableFreeTier: to.Ptr(false), KeyVaultKeyURI: to.Ptr("https://myKeyVault.vault.azure.net"), Locations: []*armcosmos.Location{ { FailoverPriority: to.Ptr[int32](0), IsZoneRedundant: to.Ptr(false), LocationName: to.Ptr("southcentralus"), }}, MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), RestoreParameters: &armcosmos.RestoreParameters{ RestoreSource: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/1a97b4bb-f6a0-430e-ade1-638d781830cc"), RestoreTimestampInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-11T22:05:09.000Z"); return t }()), DatabasesToRestore: []*armcosmos.DatabaseRestoreResource{ { CollectionNames: []*string{ to.Ptr("collection1"), to.Ptr("collection2")}, DatabaseName: to.Ptr("db1"), }, { CollectionNames: []*string{ to.Ptr("collection3"), to.Ptr("collection4")}, DatabaseName: to.Ptr("db2"), }}, RestoreMode: to.Ptr(armcosmos.RestoreModePointInTime), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountGetResults = armcosmos.DatabaseAccountGetResults{ // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // APIProperties: &armcosmos.APIProperties{ // }, // BackupPolicy: &armcosmos.ContinuousModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypeContinuous), // ContinuousModeProperties: &armcosmos.ContinuousModeProperties{ // Tier: to.Ptr(armcosmos.ContinuousTierContinuous30Days), // }, // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), // MaxStalenessPrefix: to.Ptr[int64](100), // }, // CreateMode: to.Ptr(armcosmos.CreateModeRestore), // DatabaseAccountOfferType: to.Ptr("Standard"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // EnableAnalyticalStorage: to.Ptr(false), // EnableFreeTier: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // LocationName: to.Ptr("South Central US"), // }}, // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // WriteLocations: []*armcosmos.Location{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-southcentralus"), // IsZoneRedundant: to.Ptr(false), // LocationName: to.Ptr("South Central US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // SystemData: &armcosmos.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }
Output:
func (*DatabaseAccountsClient) BeginDelete ¶
func (client *DatabaseAccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientBeginDeleteOptions) (*runtime.Poller[DatabaseAccountsClientDeleteResponse], error)
BeginDelete - Deletes an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientBeginDeleteOptions contains the optional parameters for the DatabaseAccountsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginDelete(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*DatabaseAccountsClient) BeginFailoverPriorityChange ¶
func (client *DatabaseAccountsClient) BeginFailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies, options *DatabaseAccountsClientBeginFailoverPriorityChangeOptions) (*runtime.Poller[DatabaseAccountsClientFailoverPriorityChangeResponse], error)
BeginFailoverPriorityChange - 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- failoverParameters - The new failover policies for the database account.
- options - DatabaseAccountsClientBeginFailoverPriorityChangeOptions contains the optional parameters for the DatabaseAccountsClient.BeginFailoverPriorityChange method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginFailoverPriorityChange(ctx, "rg1", "ddb1-failover", armcosmos.FailoverPolicies{ FailoverPolicies: []*armcosmos.FailoverPolicy{ { FailoverPriority: to.Ptr[int32](0), LocationName: to.Ptr("eastus"), }, { FailoverPriority: to.Ptr[int32](1), LocationName: to.Ptr("westus"), }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*DatabaseAccountsClient) BeginOfflineRegion ¶
func (client *DatabaseAccountsClient) BeginOfflineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOfflineRegionOptions) (*runtime.Poller[DatabaseAccountsClientOfflineRegionResponse], error)
BeginOfflineRegion - Offline the specified region for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- regionParameterForOffline - Cosmos DB region to offline for the database account.
- options - DatabaseAccountsClientBeginOfflineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOfflineRegion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountOfflineRegion.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginOfflineRegion(ctx, "rg1", "ddb1", armcosmos.RegionForOnlineOffline{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*DatabaseAccountsClient) BeginOnlineRegion ¶
func (client *DatabaseAccountsClient) BeginOnlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline, options *DatabaseAccountsClientBeginOnlineRegionOptions) (*runtime.Poller[DatabaseAccountsClientOnlineRegionResponse], error)
BeginOnlineRegion - Online the specified region for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- regionParameterForOnline - Cosmos DB region to online for the database account.
- options - DatabaseAccountsClientBeginOnlineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOnlineRegion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountOnlineRegion.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginOnlineRegion(ctx, "rg1", "ddb1", armcosmos.RegionForOnlineOffline{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*DatabaseAccountsClient) BeginRegenerateKey ¶
func (client *DatabaseAccountsClient) BeginRegenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters, options *DatabaseAccountsClientBeginRegenerateKeyOptions) (*runtime.Poller[DatabaseAccountsClientRegenerateKeyResponse], error)
BeginRegenerateKey - Regenerates an access key for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- keyToRegenerate - The name of the key to regenerate.
- options - DatabaseAccountsClientBeginRegenerateKeyOptions contains the optional parameters for the DatabaseAccountsClient.BeginRegenerateKey method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountRegenerateKey.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginRegenerateKey(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountRegenerateKeyParameters{ KeyKind: to.Ptr(armcosmos.KeyKindPrimary), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*DatabaseAccountsClient) BeginUpdate ¶
func (client *DatabaseAccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountUpdateParameters, options *DatabaseAccountsClientBeginUpdateOptions) (*runtime.Poller[DatabaseAccountsClientUpdateResponse], error)
BeginUpdate - Updates the properties of an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- updateParameters - The parameters to provide for the current database account.
- options - DatabaseAccountsClientBeginUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountPatch.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseAccountsClient().BeginUpdate(ctx, "rg1", "ddb1", armcosmos.DatabaseAccountUpdateParameters{ Identity: &armcosmos.ManagedServiceIdentity{ Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, }, }, Location: to.Ptr("westus"), Properties: &armcosmos.DatabaseAccountUpdateProperties{ AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), }, BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ BackupIntervalInMinutes: to.Ptr[int32](240), BackupRetentionIntervalInHours: to.Ptr[int32](720), BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyLocal), }, }, Capacity: &armcosmos.Capacity{ TotalThroughputLimit: to.Ptr[int32](2000), }, ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), MaxIntervalInSeconds: to.Ptr[int32](10), MaxStalenessPrefix: to.Ptr[int64](200), }, DefaultIdentity: to.Ptr("FirstPartyIdentity"), EnableAnalyticalStorage: to.Ptr(true), EnableBurstCapacity: to.Ptr(true), EnableFreeTier: to.Ptr(false), EnablePartitionMerge: to.Ptr(true), IPRules: []*armcosmos.IPAddressOrRange{ { IPAddressOrRange: to.Ptr("23.43.230.120"), }, { IPAddressOrRange: to.Ptr("110.12.240.0/12"), }}, IsVirtualNetworkFilterEnabled: to.Ptr(true), MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassAzureServices), NetworkACLBypassResourceIDs: []*string{ to.Ptr("/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName")}, VirtualNetworkRules: []*armcosmos.VirtualNetworkRule{ { ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), IgnoreMissingVNetServiceEndpoint: to.Ptr(false), }}, }, Tags: map[string]*string{ "dept": to.Ptr("finance"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountGetResults = armcosmos.DatabaseAccountGetResults{ // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "dept": to.Ptr("finance"), // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), // TenantID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ // SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), // }, // APIProperties: &armcosmos.APIProperties{ // }, // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](720), // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyLocal), // }, // }, // Capacity: &armcosmos.Capacity{ // TotalThroughputLimit: to.Ptr[int32](2000), // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelBoundedStaleness), // MaxIntervalInSeconds: to.Ptr[int32](10), // MaxStalenessPrefix: to.Ptr[int64](200), // }, // Cors: []*armcosmos.CorsPolicy{ // }, // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, // IPRules: []*armcosmos.IPAddressOrRange{ // { // IPAddressOrRange: to.Ptr("23.43.230.120"), // }, // { // IPAddressOrRange: to.Ptr("110.12.240.0/12"), // }}, // IsVirtualNetworkFilterEnabled: to.Ptr(true), // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassAzureServices), // NetworkACLBypassResourceIDs: []*string{ // to.Ptr("/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.Synapse/workspaces/workspaceName")}, // PrivateEndpointConnections: []*armcosmos.PrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/account1/privateEndpointConnections/pe1"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe1"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // }, // }}, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // VirtualNetworkRules: []*armcosmos.VirtualNetworkRule{ // { // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // IgnoreMissingVNetServiceEndpoint: to.Ptr(false), // }}, // WriteLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // }
Output:
func (*DatabaseAccountsClient) CheckNameExists ¶
func (client *DatabaseAccountsClient) CheckNameExists(ctx context.Context, accountName string, options *DatabaseAccountsClientCheckNameExistsOptions) (DatabaseAccountsClientCheckNameExistsResponse, error)
CheckNameExists - 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.
Generated from API version 2023-11-15
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientCheckNameExistsOptions contains the optional parameters for the DatabaseAccountsClient.CheckNameExists method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountCheckNameExists.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabaseAccountsClient().CheckNameExists(ctx, "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*DatabaseAccountsClient) Get ¶
func (client *DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientGetOptions) (DatabaseAccountsClientGetResponse, error)
Get - Retrieves the properties of an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientGetOptions contains the optional parameters for the DatabaseAccountsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAccountsClient().Get(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountGetResults = armcosmos.DatabaseAccountGetResults{ // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), // TenantID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ // SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), // }, // APIProperties: &armcosmos.APIProperties{ // }, // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), // MigrationState: &armcosmos.BackupPolicyMigrationState{ // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-09T21:07:16.000Z"); return t}()), // Status: to.Ptr(armcosmos.BackupPolicyMigrationStatusInProgress), // TargetType: to.Ptr(armcosmos.BackupPolicyTypeContinuous), // }, // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](8), // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), // MaxStalenessPrefix: to.Ptr[int64](100), // }, // Cors: []*armcosmos.CorsPolicy{ // }, // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // }, // IsVirtualNetworkFilterEnabled: to.Ptr(false), // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassNone), // NetworkACLBypassResourceIDs: []*string{ // }, // PrivateEndpointConnections: []*armcosmos.PrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/account1/privateEndpointConnections/pe1"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe1"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // }, // }}, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // VirtualNetworkRules: []*armcosmos.VirtualNetworkRule{ // }, // WriteLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // }
Output:
func (*DatabaseAccountsClient) GetReadOnlyKeys ¶
func (client *DatabaseAccountsClient) GetReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientGetReadOnlyKeysOptions) (DatabaseAccountsClientGetReadOnlyKeysResponse, error)
GetReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientGetReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.GetReadOnlyKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAccountsClient().GetReadOnlyKeys(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountListReadOnlyKeysResult = armcosmos.DatabaseAccountListReadOnlyKeysResult{ // PrimaryReadonlyMasterKey: to.Ptr("primaryReadonlyMasterKey"), // SecondaryReadonlyMasterKey: to.Ptr("secondaryReadonlyMasterKey"), // }
Output:
func (*DatabaseAccountsClient) ListConnectionStrings ¶
func (client *DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientListConnectionStringsOptions) (DatabaseAccountsClientListConnectionStringsResponse, error)
ListConnectionStrings - Lists the connection strings for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientListConnectionStringsOptions contains the optional parameters for the DatabaseAccountsClient.ListConnectionStrings method.
Example (CosmosDbDatabaseAccountListConnectionStrings) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAccountsClient().ListConnectionStrings(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountListConnectionStringsResult = armcosmos.DatabaseAccountListConnectionStringsResult{ // ConnectionStrings: []*armcosmos.DatabaseAccountConnectionString{ // { // Type: to.Ptr(armcosmos.TypeSQL), // Description: to.Ptr("Primary SQL Connection String"), // ConnectionString: to.Ptr("connection-string"), // KeyKind: to.Ptr(armcosmos.KindPrimary), // }}, // }
Output:
Example (CosmosDbDatabaseAccountListConnectionStringsMongo) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountListConnectionStringsMongo.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAccountsClient().ListConnectionStrings(ctx, "rg1", "mongo-ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountListConnectionStringsResult = armcosmos.DatabaseAccountListConnectionStringsResult{ // ConnectionStrings: []*armcosmos.DatabaseAccountConnectionString{ // { // Description: to.Ptr("Name of the connection string"), // ConnectionString: to.Ptr("connection-string"), // }}, // }
Output:
func (*DatabaseAccountsClient) ListKeys ¶
func (client *DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientListKeysOptions) (DatabaseAccountsClientListKeysResponse, error)
ListKeys - Lists the access keys for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientListKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountListKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAccountsClient().ListKeys(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAccountListKeysResult = armcosmos.DatabaseAccountListKeysResult{ // PrimaryReadonlyMasterKey: to.Ptr("primaryReadonlyMasterKey"), // SecondaryReadonlyMasterKey: to.Ptr("secondaryReadonlyMasterKey"), // PrimaryMasterKey: to.Ptr("primaryMasterKey"), // SecondaryMasterKey: to.Ptr("secondaryMasterKey"), // }
Output:
func (*DatabaseAccountsClient) ListReadOnlyKeys ¶
func (client *DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string, options *DatabaseAccountsClientListReadOnlyKeysOptions) (DatabaseAccountsClientListReadOnlyKeysResponse, error)
ListReadOnlyKeys - Lists the read-only access keys for the specified Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientListReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListReadOnlyKeys method.
func (*DatabaseAccountsClient) NewListByResourceGroupPager ¶
func (client *DatabaseAccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *DatabaseAccountsClientListByResourceGroupOptions) *runtime.Pager[DatabaseAccountsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all the Azure Cosmos DB database accounts available under the given resource group.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountsClient().NewListByResourceGroupPager("rg1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseAccountsListResult = armcosmos.DatabaseAccountsListResult{ // Value: []*armcosmos.DatabaseAccountGetResults{ // { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), // TenantID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), // MaxStalenessPrefix: to.Ptr[int64](100), // }, // Cors: []*armcosmos.CorsPolicy{ // }, // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableFreeTier: to.Ptr(false), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, // IPRules: []*armcosmos.IPAddressOrRange{ // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassNone), // NetworkACLBypassResourceIDs: []*string{ // }, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // WriteLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // }}, // } }
Output:
func (*DatabaseAccountsClient) NewListMetricDefinitionsPager ¶
func (client *DatabaseAccountsClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, options *DatabaseAccountsClientListMetricDefinitionsOptions) *runtime.Pager[DatabaseAccountsClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Retrieves metric definitions for the given database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountsClient().NewListMetricDefinitionsPager("rg1", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricDefinitionsListResult = armcosmos.MetricDefinitionsListResult{ // Value: []*armcosmos.MetricDefinition{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // MetricAvailabilities: []*armcosmos.MetricAvailability{ // { // Retention: to.Ptr("P2D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P60D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armcosmos.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*DatabaseAccountsClient) NewListMetricsPager ¶
func (client *DatabaseAccountsClient) NewListMetricsPager(resourceGroupName string, accountName string, filter string, options *DatabaseAccountsClientListMetricsOptions) *runtime.Pager[DatabaseAccountsClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - DatabaseAccountsClientListMetricsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountsClient().NewListMetricsPager("rg1", "ddb1", "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armcosmos.MetricListResult{ // Value: []*armcosmos.Metric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:03:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:08:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*DatabaseAccountsClient) NewListPager ¶
func (client *DatabaseAccountsClient) NewListPager(options *DatabaseAccountsClientListOptions) *runtime.Pager[DatabaseAccountsClientListResponse]
NewListPager - Lists all the Azure Cosmos DB database accounts available under the subscription.
Generated from API version 2023-11-15
- options - DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseAccountsListResult = armcosmos.DatabaseAccountsListResult{ // Value: []*armcosmos.DatabaseAccountGetResults{ // { // Name: to.Ptr("ddb1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Identity: &armcosmos.ManagedServiceIdentity{ // Type: to.Ptr(armcosmos.ResourceIdentityTypeSystemAssignedUserAssigned), // PrincipalID: to.Ptr("52f4fef3-3c3f-4ff3-b52e-b5c9eeb68656"), // TenantID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // UserAssignedIdentities: map[string]*armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // "/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armcosmos.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ // ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"), // PrincipalID: to.Ptr("33e01921-4d64-4f8c-a055-5bdaffd5e33d"), // }, // }, // }, // Kind: to.Ptr(armcosmos.DatabaseAccountKindGlobalDocumentDB), // Properties: &armcosmos.DatabaseAccountGetProperties{ // AnalyticalStorageConfiguration: &armcosmos.AnalyticalStorageConfiguration{ // SchemaType: to.Ptr(armcosmos.AnalyticalStorageSchemaTypeWellDefined), // }, // APIProperties: &armcosmos.APIProperties{ // }, // BackupPolicy: &armcosmos.PeriodicModeBackupPolicy{ // Type: to.Ptr(armcosmos.BackupPolicyTypePeriodic), // PeriodicModeProperties: &armcosmos.PeriodicModeProperties{ // BackupIntervalInMinutes: to.Ptr[int32](240), // BackupRetentionIntervalInHours: to.Ptr[int32](720), // BackupStorageRedundancy: to.Ptr(armcosmos.BackupStorageRedundancyGeo), // }, // }, // ConsistencyPolicy: &armcosmos.ConsistencyPolicy{ // DefaultConsistencyLevel: to.Ptr(armcosmos.DefaultConsistencyLevelSession), // MaxIntervalInSeconds: to.Ptr[int32](5), // MaxStalenessPrefix: to.Ptr[int64](100), // }, // Cors: []*armcosmos.CorsPolicy{ // }, // CreateMode: to.Ptr(armcosmos.CreateModeDefault), // DatabaseAccountOfferType: to.Ptr("Standard"), // DefaultIdentity: to.Ptr("FirstPartyIdentity"), // DisableKeyBasedMetadataWriteAccess: to.Ptr(false), // DocumentEndpoint: to.Ptr("https://ddb1.documents.azure.com:443/"), // EnableAnalyticalStorage: to.Ptr(true), // EnableBurstCapacity: to.Ptr(true), // EnableFreeTier: to.Ptr(false), // EnablePartitionMerge: to.Ptr(true), // FailoverPolicies: []*armcosmos.FailoverPolicy{ // { // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // }}, // InstanceID: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // IPRules: []*armcosmos.IPAddressOrRange{ // }, // KeysMetadata: &armcosmos.DatabaseAccountKeysMetadata{ // PrimaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // PrimaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // SecondaryReadonlyMasterKey: &armcosmos.AccountKeyMetadata{ // GenerationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-25T20:30:11.000Z"); return t}()), // }, // }, // Locations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // MinimalTLSVersion: to.Ptr(armcosmos.MinimalTLSVersionTLS), // NetworkACLBypass: to.Ptr(armcosmos.NetworkACLBypassNone), // NetworkACLBypassResourceIDs: []*string{ // }, // PrivateEndpointConnections: []*armcosmos.PrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/account1/privateEndpointConnections/pe1"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe1"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // }, // }}, // ProvisioningState: to.Ptr("Succeeded"), // ReadLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // WriteLocations: []*armcosmos.Location{ // { // DocumentEndpoint: to.Ptr("https://ddb1-eastus.documents.azure.com:443/"), // FailoverPriority: to.Ptr[int32](0), // ID: to.Ptr("ddb1-eastus"), // LocationName: to.Ptr("East US"), // ProvisioningState: to.Ptr("Succeeded"), // }}, // }, // SystemData: &armcosmos.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // }, // }}, // } }
Output:
func (*DatabaseAccountsClient) NewListUsagesPager ¶
func (client *DatabaseAccountsClient) NewListUsagesPager(resourceGroupName string, accountName string, options *DatabaseAccountsClientListUsagesOptions) *runtime.Pager[DatabaseAccountsClientListUsagesResponse]
NewListUsagesPager - Retrieves the usages (most recent data) for the given database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - DatabaseAccountsClientListUsagesOptions contains the optional parameters for the DatabaseAccountsClient.NewListUsagesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseAccountGetUsages.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAccountsClient().NewListUsagesPager("rg1", "ddb1", &armcosmos.DatabaseAccountsClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsagesResult = armcosmos.UsagesResult{ // Value: []*armcosmos.Usage{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Storage"), // Value: to.Ptr("Storage"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](10737418240), // QuotaPeriod: to.Ptr("P1D"), // Unit: to.Ptr(armcosmos.UnitTypeBytes), // }}, // } }
Output:
type DatabaseAccountsClientBeginCreateOrUpdateOptions ¶
type DatabaseAccountsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginCreateOrUpdate method.
type DatabaseAccountsClientBeginDeleteOptions ¶
type DatabaseAccountsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginDeleteOptions contains the optional parameters for the DatabaseAccountsClient.BeginDelete method.
type DatabaseAccountsClientBeginFailoverPriorityChangeOptions ¶
type DatabaseAccountsClientBeginFailoverPriorityChangeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginFailoverPriorityChangeOptions contains the optional parameters for the DatabaseAccountsClient.BeginFailoverPriorityChange method.
type DatabaseAccountsClientBeginOfflineRegionOptions ¶
type DatabaseAccountsClientBeginOfflineRegionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginOfflineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOfflineRegion method.
type DatabaseAccountsClientBeginOnlineRegionOptions ¶
type DatabaseAccountsClientBeginOnlineRegionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginOnlineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOnlineRegion method.
type DatabaseAccountsClientBeginRegenerateKeyOptions ¶
type DatabaseAccountsClientBeginRegenerateKeyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginRegenerateKeyOptions contains the optional parameters for the DatabaseAccountsClient.BeginRegenerateKey method.
type DatabaseAccountsClientBeginUpdateOptions ¶
type DatabaseAccountsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginUpdate method.
type DatabaseAccountsClientCheckNameExistsOptions ¶
type DatabaseAccountsClientCheckNameExistsOptions struct { }
DatabaseAccountsClientCheckNameExistsOptions contains the optional parameters for the DatabaseAccountsClient.CheckNameExists method.
type DatabaseAccountsClientCheckNameExistsResponse ¶
type DatabaseAccountsClientCheckNameExistsResponse struct { // Success indicates if the operation succeeded or failed. Success bool }
DatabaseAccountsClientCheckNameExistsResponse contains the response from method DatabaseAccountsClient.CheckNameExists.
type DatabaseAccountsClientCreateOrUpdateResponse ¶
type DatabaseAccountsClientCreateOrUpdateResponse struct { // An Azure Cosmos DB database account. DatabaseAccountGetResults }
DatabaseAccountsClientCreateOrUpdateResponse contains the response from method DatabaseAccountsClient.BeginCreateOrUpdate.
type DatabaseAccountsClientDeleteResponse ¶
type DatabaseAccountsClientDeleteResponse struct { }
DatabaseAccountsClientDeleteResponse contains the response from method DatabaseAccountsClient.BeginDelete.
type DatabaseAccountsClientFailoverPriorityChangeResponse ¶
type DatabaseAccountsClientFailoverPriorityChangeResponse struct { }
DatabaseAccountsClientFailoverPriorityChangeResponse contains the response from method DatabaseAccountsClient.BeginFailoverPriorityChange.
type DatabaseAccountsClientGetOptions ¶
type DatabaseAccountsClientGetOptions struct { }
DatabaseAccountsClientGetOptions contains the optional parameters for the DatabaseAccountsClient.Get method.
type DatabaseAccountsClientGetReadOnlyKeysOptions ¶
type DatabaseAccountsClientGetReadOnlyKeysOptions struct { }
DatabaseAccountsClientGetReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.GetReadOnlyKeys method.
type DatabaseAccountsClientGetReadOnlyKeysResponse ¶
type DatabaseAccountsClientGetReadOnlyKeysResponse struct { // The read-only access keys for the given database account. DatabaseAccountListReadOnlyKeysResult }
DatabaseAccountsClientGetReadOnlyKeysResponse contains the response from method DatabaseAccountsClient.GetReadOnlyKeys.
type DatabaseAccountsClientGetResponse ¶
type DatabaseAccountsClientGetResponse struct { // An Azure Cosmos DB database account. DatabaseAccountGetResults }
DatabaseAccountsClientGetResponse contains the response from method DatabaseAccountsClient.Get.
type DatabaseAccountsClientListByResourceGroupOptions ¶
type DatabaseAccountsClientListByResourceGroupOptions struct { }
DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.NewListByResourceGroupPager method.
type DatabaseAccountsClientListByResourceGroupResponse ¶
type DatabaseAccountsClientListByResourceGroupResponse struct { // The List operation response, that contains the database accounts and their properties. DatabaseAccountsListResult }
DatabaseAccountsClientListByResourceGroupResponse contains the response from method DatabaseAccountsClient.NewListByResourceGroupPager.
type DatabaseAccountsClientListConnectionStringsOptions ¶
type DatabaseAccountsClientListConnectionStringsOptions struct { }
DatabaseAccountsClientListConnectionStringsOptions contains the optional parameters for the DatabaseAccountsClient.ListConnectionStrings method.
type DatabaseAccountsClientListConnectionStringsResponse ¶
type DatabaseAccountsClientListConnectionStringsResponse struct { // The connection strings for the given database account. DatabaseAccountListConnectionStringsResult }
DatabaseAccountsClientListConnectionStringsResponse contains the response from method DatabaseAccountsClient.ListConnectionStrings.
type DatabaseAccountsClientListKeysOptions ¶
type DatabaseAccountsClientListKeysOptions struct { }
DatabaseAccountsClientListKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListKeys method.
type DatabaseAccountsClientListKeysResponse ¶
type DatabaseAccountsClientListKeysResponse struct { // The access keys for the given database account. DatabaseAccountListKeysResult }
DatabaseAccountsClientListKeysResponse contains the response from method DatabaseAccountsClient.ListKeys.
type DatabaseAccountsClientListMetricDefinitionsOptions ¶
type DatabaseAccountsClientListMetricDefinitionsOptions struct { }
DatabaseAccountsClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricDefinitionsPager method.
type DatabaseAccountsClientListMetricDefinitionsResponse ¶
type DatabaseAccountsClientListMetricDefinitionsResponse struct { // The response to a list metric definitions request. MetricDefinitionsListResult }
DatabaseAccountsClientListMetricDefinitionsResponse contains the response from method DatabaseAccountsClient.NewListMetricDefinitionsPager.
type DatabaseAccountsClientListMetricsOptions ¶
type DatabaseAccountsClientListMetricsOptions struct { }
DatabaseAccountsClientListMetricsOptions contains the optional parameters for the DatabaseAccountsClient.NewListMetricsPager method.
type DatabaseAccountsClientListMetricsResponse ¶
type DatabaseAccountsClientListMetricsResponse struct { // The response to a list metrics request. MetricListResult }
DatabaseAccountsClientListMetricsResponse contains the response from method DatabaseAccountsClient.NewListMetricsPager.
type DatabaseAccountsClientListOptions ¶
type DatabaseAccountsClientListOptions struct { }
DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.NewListPager method.
type DatabaseAccountsClientListReadOnlyKeysOptions ¶
type DatabaseAccountsClientListReadOnlyKeysOptions struct { }
DatabaseAccountsClientListReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListReadOnlyKeys method.
type DatabaseAccountsClientListReadOnlyKeysResponse ¶
type DatabaseAccountsClientListReadOnlyKeysResponse struct { // The read-only access keys for the given database account. DatabaseAccountListReadOnlyKeysResult }
DatabaseAccountsClientListReadOnlyKeysResponse contains the response from method DatabaseAccountsClient.ListReadOnlyKeys.
type DatabaseAccountsClientListResponse ¶
type DatabaseAccountsClientListResponse struct { // The List operation response, that contains the database accounts and their properties. DatabaseAccountsListResult }
DatabaseAccountsClientListResponse contains the response from method DatabaseAccountsClient.NewListPager.
type DatabaseAccountsClientListUsagesOptions ¶
type DatabaseAccountsClientListUsagesOptions struct { // An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of // the metric, can have an or of multiple names). Filter *string }
DatabaseAccountsClientListUsagesOptions contains the optional parameters for the DatabaseAccountsClient.NewListUsagesPager method.
type DatabaseAccountsClientListUsagesResponse ¶
type DatabaseAccountsClientListUsagesResponse struct { // The response to a list usage request. UsagesResult }
DatabaseAccountsClientListUsagesResponse contains the response from method DatabaseAccountsClient.NewListUsagesPager.
type DatabaseAccountsClientOfflineRegionResponse ¶
type DatabaseAccountsClientOfflineRegionResponse struct { }
DatabaseAccountsClientOfflineRegionResponse contains the response from method DatabaseAccountsClient.BeginOfflineRegion.
type DatabaseAccountsClientOnlineRegionResponse ¶
type DatabaseAccountsClientOnlineRegionResponse struct { }
DatabaseAccountsClientOnlineRegionResponse contains the response from method DatabaseAccountsClient.BeginOnlineRegion.
type DatabaseAccountsClientRegenerateKeyResponse ¶
type DatabaseAccountsClientRegenerateKeyResponse struct { }
DatabaseAccountsClientRegenerateKeyResponse contains the response from method DatabaseAccountsClient.BeginRegenerateKey.
type DatabaseAccountsClientUpdateResponse ¶
type DatabaseAccountsClientUpdateResponse struct { // An Azure Cosmos DB database account. DatabaseAccountGetResults }
DatabaseAccountsClientUpdateResponse contains the response from method DatabaseAccountsClient.BeginUpdate.
type DatabaseAccountsListResult ¶
type DatabaseAccountsListResult struct { // READ-ONLY; List of database account and their properties. Value []*DatabaseAccountGetResults }
DatabaseAccountsListResult - The List operation response, that contains the database accounts and their properties.
func (DatabaseAccountsListResult) MarshalJSON ¶
func (d DatabaseAccountsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAccountsListResult.
func (*DatabaseAccountsListResult) UnmarshalJSON ¶
func (d *DatabaseAccountsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAccountsListResult.
type DatabaseClient ¶
type DatabaseClient struct {
// contains filtered or unexported fields
}
DatabaseClient contains the methods for the Database group. Don't use this type directly, use NewDatabaseClient() instead.
func NewDatabaseClient ¶
func NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseClient, error)
NewDatabaseClient creates a new instance of DatabaseClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseClient) NewListMetricDefinitionsPager ¶
func (client *DatabaseClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, databaseRid string, options *DatabaseClientListMetricDefinitionsOptions) *runtime.Pager[DatabaseClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Retrieves metric definitions for the given database.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- options - DatabaseClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseClient.NewListMetricDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseGetMetricDefinitions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseClient().NewListMetricDefinitionsPager("rg1", "ddb1", "databaseRid", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricDefinitionsListResult = armcosmos.MetricDefinitionsListResult{ // Value: []*armcosmos.MetricDefinition{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // MetricAvailabilities: []*armcosmos.MetricAvailability{ // { // Retention: to.Ptr("P2D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P60D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armcosmos.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*DatabaseClient) NewListMetricsPager ¶
func (client *DatabaseClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, filter string, options *DatabaseClientListMetricsOptions) *runtime.Pager[DatabaseClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account and database.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - DatabaseClientListMetricsOptions contains the optional parameters for the DatabaseClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseClient().NewListMetricsPager("rg1", "ddb1", "rid", "$filter=(name.value eq 'Total Requests') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armcosmos.MetricListResult{ // Value: []*armcosmos.Metric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Total Requests"), // Value: to.Ptr("Total Requests"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:03:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Count: to.Ptr[int32](0), // Average: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:08:55.278Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // }}, // } }
Output:
func (*DatabaseClient) NewListUsagesPager ¶
func (client *DatabaseClient) NewListUsagesPager(resourceGroupName string, accountName string, databaseRid string, options *DatabaseClientListUsagesOptions) *runtime.Pager[DatabaseClientListUsagesResponse]
NewListUsagesPager - Retrieves the usages (most recent data) for the given database.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- options - DatabaseClientListUsagesOptions contains the optional parameters for the DatabaseClient.NewListUsagesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDatabaseGetUsages.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseClient().NewListUsagesPager("rg1", "ddb1", "databaseRid", &armcosmos.DatabaseClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsagesResult = armcosmos.UsagesResult{ // Value: []*armcosmos.Usage{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Storage"), // Value: to.Ptr("Storage"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](10737418240), // QuotaPeriod: to.Ptr("P1D"), // Unit: to.Ptr(armcosmos.UnitTypeBytes), // }}, // } }
Output:
type DatabaseClientListMetricDefinitionsOptions ¶
type DatabaseClientListMetricDefinitionsOptions struct { }
DatabaseClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseClient.NewListMetricDefinitionsPager method.
type DatabaseClientListMetricDefinitionsResponse ¶
type DatabaseClientListMetricDefinitionsResponse struct { // The response to a list metric definitions request. MetricDefinitionsListResult }
DatabaseClientListMetricDefinitionsResponse contains the response from method DatabaseClient.NewListMetricDefinitionsPager.
type DatabaseClientListMetricsOptions ¶
type DatabaseClientListMetricsOptions struct { }
DatabaseClientListMetricsOptions contains the optional parameters for the DatabaseClient.NewListMetricsPager method.
type DatabaseClientListMetricsResponse ¶
type DatabaseClientListMetricsResponse struct { // The response to a list metrics request. MetricListResult }
DatabaseClientListMetricsResponse contains the response from method DatabaseClient.NewListMetricsPager.
type DatabaseClientListUsagesOptions ¶
type DatabaseClientListUsagesOptions struct { // An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of // the metric, can have an or of multiple names). Filter *string }
DatabaseClientListUsagesOptions contains the optional parameters for the DatabaseClient.NewListUsagesPager method.
type DatabaseClientListUsagesResponse ¶
type DatabaseClientListUsagesResponse struct { // The response to a list usage request. UsagesResult }
DatabaseClientListUsagesResponse contains the response from method DatabaseClient.NewListUsagesPager.
type DatabaseRestoreResource ¶
type DatabaseRestoreResource struct { // The names of the collections available for restore. CollectionNames []*string // The name of the database available for restore. DatabaseName *string }
DatabaseRestoreResource - Specific Databases to restore.
func (DatabaseRestoreResource) MarshalJSON ¶
func (d DatabaseRestoreResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseRestoreResource.
func (*DatabaseRestoreResource) UnmarshalJSON ¶
func (d *DatabaseRestoreResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseRestoreResource.
type DefaultConsistencyLevel ¶
type DefaultConsistencyLevel string
DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account.
const ( DefaultConsistencyLevelBoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" DefaultConsistencyLevelConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" DefaultConsistencyLevelEventual DefaultConsistencyLevel = "Eventual" DefaultConsistencyLevelSession DefaultConsistencyLevel = "Session" DefaultConsistencyLevelStrong DefaultConsistencyLevel = "Strong" )
func PossibleDefaultConsistencyLevelValues ¶
func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel
PossibleDefaultConsistencyLevelValues returns the possible values for the DefaultConsistencyLevel const type.
type ErrorResponse ¶
type ErrorResponse struct { // Error code. Code *string // Error message indicating why the operation failed. Message *string }
ErrorResponse - Error Response.
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ExcludedPath ¶
type ExcludedPath struct { // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string }
func (ExcludedPath) MarshalJSON ¶
func (e ExcludedPath) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExcludedPath.
func (*ExcludedPath) UnmarshalJSON ¶
func (e *ExcludedPath) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExcludedPath.
type ExtendedResourceProperties ¶
type ExtendedResourceProperties struct { // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
ExtendedResourceProperties - The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs.
func (ExtendedResourceProperties) MarshalJSON ¶
func (e ExtendedResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedResourceProperties.
func (*ExtendedResourceProperties) UnmarshalJSON ¶
func (e *ExtendedResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedResourceProperties.
type FailoverPolicies ¶
type FailoverPolicies struct { // REQUIRED; List of failover policies. FailoverPolicies []*FailoverPolicy }
FailoverPolicies - The list of new failover policies for the failover priority change.
func (FailoverPolicies) MarshalJSON ¶
func (f FailoverPolicies) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverPolicies.
func (*FailoverPolicies) UnmarshalJSON ¶
func (f *FailoverPolicies) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicies.
type FailoverPolicy ¶
type FailoverPolicy struct { // 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 *int32 // The name of the region in which the database account exists. LocationName *string // READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>. ID *string }
FailoverPolicy - The failover policy for a given region of a database account.
func (FailoverPolicy) MarshalJSON ¶
func (f FailoverPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverPolicy.
func (*FailoverPolicy) UnmarshalJSON ¶
func (f *FailoverPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverPolicy.
type GraphAPIComputeRegionalServiceResource ¶
type GraphAPIComputeRegionalServiceResource struct { // READ-ONLY; The regional endpoint for GraphAPICompute. GraphAPIComputeEndpoint *string // READ-ONLY; The location name. Location *string // READ-ONLY; The regional service name. Name *string // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
GraphAPIComputeRegionalServiceResource - Resource for a regional service location.
func (GraphAPIComputeRegionalServiceResource) MarshalJSON ¶
func (g GraphAPIComputeRegionalServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeRegionalServiceResource.
func (*GraphAPIComputeRegionalServiceResource) UnmarshalJSON ¶
func (g *GraphAPIComputeRegionalServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeRegionalServiceResource.
type GraphAPIComputeServiceResource ¶
type GraphAPIComputeServiceResource struct { // Properties for GraphAPIComputeServiceResource. Properties *GraphAPIComputeServiceResourceProperties }
GraphAPIComputeServiceResource - Describes the service response property for GraphAPICompute.
func (GraphAPIComputeServiceResource) MarshalJSON ¶
func (g GraphAPIComputeServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResource.
func (*GraphAPIComputeServiceResource) UnmarshalJSON ¶
func (g *GraphAPIComputeServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResource.
type GraphAPIComputeServiceResourceProperties ¶
type GraphAPIComputeServiceResourceProperties struct { // REQUIRED; ServiceType for the service. ServiceType *ServiceType // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // GraphAPICompute endpoint for the service. GraphAPIComputeEndpoint *string // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // READ-ONLY; Time of the last state change (ISO-8601 format). CreationTime *time.Time // READ-ONLY; An array that contains all of the locations for the service. Locations []*GraphAPIComputeRegionalServiceResource // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
GraphAPIComputeServiceResourceProperties - Properties for GraphAPIComputeServiceResource.
func (*GraphAPIComputeServiceResourceProperties) GetServiceResourceProperties ¶
func (g *GraphAPIComputeServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type GraphAPIComputeServiceResourceProperties.
func (GraphAPIComputeServiceResourceProperties) MarshalJSON ¶
func (g GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceProperties.
func (*GraphAPIComputeServiceResourceProperties) UnmarshalJSON ¶
func (g *GraphAPIComputeServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResourceProperties.
type GremlinDatabaseCreateUpdateParameters ¶
type GremlinDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin database. Properties *GremlinDatabaseCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
GremlinDatabaseCreateUpdateParameters - Parameters to create and update Cosmos DB Gremlin database.
func (GremlinDatabaseCreateUpdateParameters) MarshalJSON ¶
func (g GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateParameters.
func (*GremlinDatabaseCreateUpdateParameters) UnmarshalJSON ¶
func (g *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateParameters.
type GremlinDatabaseCreateUpdateProperties ¶
type GremlinDatabaseCreateUpdateProperties struct { // REQUIRED; 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 }
GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
func (GremlinDatabaseCreateUpdateProperties) MarshalJSON ¶
func (g GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseCreateUpdateProperties.
func (*GremlinDatabaseCreateUpdateProperties) UnmarshalJSON ¶
func (g *GremlinDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseCreateUpdateProperties.
type GremlinDatabaseGetProperties ¶
type GremlinDatabaseGetProperties struct { Options *GremlinDatabaseGetPropertiesOptions Resource *GremlinDatabaseGetPropertiesResource }
GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
func (GremlinDatabaseGetProperties) MarshalJSON ¶
func (g GremlinDatabaseGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetProperties.
func (*GremlinDatabaseGetProperties) UnmarshalJSON ¶
func (g *GremlinDatabaseGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetProperties.
type GremlinDatabaseGetPropertiesOptions ¶
type GremlinDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (GremlinDatabaseGetPropertiesOptions) MarshalJSON ¶
func (g GremlinDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesOptions.
func (*GremlinDatabaseGetPropertiesOptions) UnmarshalJSON ¶
func (g *GremlinDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesOptions.
type GremlinDatabaseGetPropertiesResource ¶
type GremlinDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (GremlinDatabaseGetPropertiesResource) MarshalJSON ¶
func (g GremlinDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetPropertiesResource.
func (*GremlinDatabaseGetPropertiesResource) UnmarshalJSON ¶
func (g *GremlinDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetPropertiesResource.
type GremlinDatabaseGetResults ¶
type GremlinDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB SQL database Properties *GremlinDatabaseGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
GremlinDatabaseGetResults - An Azure Cosmos DB Gremlin database.
func (GremlinDatabaseGetResults) MarshalJSON ¶
func (g GremlinDatabaseGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseGetResults.
func (*GremlinDatabaseGetResults) UnmarshalJSON ¶
func (g *GremlinDatabaseGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseGetResults.
type GremlinDatabaseListResult ¶
type GremlinDatabaseListResult struct { // READ-ONLY; List of Gremlin databases and their properties. Value []*GremlinDatabaseGetResults }
GremlinDatabaseListResult - The List operation response, that contains the Gremlin databases and their properties.
func (GremlinDatabaseListResult) MarshalJSON ¶
func (g GremlinDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseListResult.
func (*GremlinDatabaseListResult) UnmarshalJSON ¶
func (g *GremlinDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseListResult.
type GremlinDatabaseResource ¶
type GremlinDatabaseResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters }
GremlinDatabaseResource - Cosmos DB Gremlin database resource object
func (GremlinDatabaseResource) MarshalJSON ¶
func (g GremlinDatabaseResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseResource.
func (*GremlinDatabaseResource) UnmarshalJSON ¶
func (g *GremlinDatabaseResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseResource.
type GremlinDatabaseRestoreResource ¶ added in v2.2.0
type GremlinDatabaseRestoreResource struct { // The name of the gremlin database available for restore. DatabaseName *string // The names of the graphs available for restore. GraphNames []*string }
GremlinDatabaseRestoreResource - Specific Gremlin Databases to restore.
func (GremlinDatabaseRestoreResource) MarshalJSON ¶ added in v2.2.0
func (g GremlinDatabaseRestoreResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseRestoreResource.
func (*GremlinDatabaseRestoreResource) UnmarshalJSON ¶ added in v2.2.0
func (g *GremlinDatabaseRestoreResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinDatabaseRestoreResource.
type GremlinGraphCreateUpdateParameters ¶
type GremlinGraphCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin graph. Properties *GremlinGraphCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
GremlinGraphCreateUpdateParameters - Parameters to create and update Cosmos DB Gremlin graph.
func (GremlinGraphCreateUpdateParameters) MarshalJSON ¶
func (g GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateParameters.
func (*GremlinGraphCreateUpdateParameters) UnmarshalJSON ¶
func (g *GremlinGraphCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateParameters.
type GremlinGraphCreateUpdateProperties ¶
type GremlinGraphCreateUpdateProperties struct { // REQUIRED; 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 }
GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
func (GremlinGraphCreateUpdateProperties) MarshalJSON ¶
func (g GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphCreateUpdateProperties.
func (*GremlinGraphCreateUpdateProperties) UnmarshalJSON ¶
func (g *GremlinGraphCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphCreateUpdateProperties.
type GremlinGraphGetProperties ¶
type GremlinGraphGetProperties struct { Options *GremlinGraphGetPropertiesOptions Resource *GremlinGraphGetPropertiesResource }
GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph
func (GremlinGraphGetProperties) MarshalJSON ¶
func (g GremlinGraphGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetProperties.
func (*GremlinGraphGetProperties) UnmarshalJSON ¶
func (g *GremlinGraphGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetProperties.
type GremlinGraphGetPropertiesOptions ¶
type GremlinGraphGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (GremlinGraphGetPropertiesOptions) MarshalJSON ¶
func (g GremlinGraphGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesOptions.
func (*GremlinGraphGetPropertiesOptions) UnmarshalJSON ¶
func (g *GremlinGraphGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesOptions.
type GremlinGraphGetPropertiesResource ¶
type GremlinGraphGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Gremlin graph ID *string // Analytical TTL. AnalyticalStorageTTL *int64 // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Default time to live DefaultTTL *int32 // 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 // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (GremlinGraphGetPropertiesResource) MarshalJSON ¶
func (g GremlinGraphGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetPropertiesResource.
func (*GremlinGraphGetPropertiesResource) UnmarshalJSON ¶
func (g *GremlinGraphGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetPropertiesResource.
type GremlinGraphGetResults ¶
type GremlinGraphGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB Gremlin graph Properties *GremlinGraphGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
GremlinGraphGetResults - An Azure Cosmos DB Gremlin graph.
func (GremlinGraphGetResults) MarshalJSON ¶
func (g GremlinGraphGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphGetResults.
func (*GremlinGraphGetResults) UnmarshalJSON ¶
func (g *GremlinGraphGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphGetResults.
type GremlinGraphListResult ¶
type GremlinGraphListResult struct { // READ-ONLY; List of graphs and their properties. Value []*GremlinGraphGetResults }
GremlinGraphListResult - The List operation response, that contains the graphs and their properties.
func (GremlinGraphListResult) MarshalJSON ¶
func (g GremlinGraphListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphListResult.
func (*GremlinGraphListResult) UnmarshalJSON ¶
func (g *GremlinGraphListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphListResult.
type GremlinGraphResource ¶
type GremlinGraphResource struct { // REQUIRED; Name of the Cosmos DB Gremlin graph ID *string // Analytical TTL. AnalyticalStorageTTL *int64 // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Default time to live DefaultTTL *int32 // 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 // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy }
GremlinGraphResource - Cosmos DB Gremlin graph resource object
func (GremlinGraphResource) MarshalJSON ¶
func (g GremlinGraphResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GremlinGraphResource.
func (*GremlinGraphResource) UnmarshalJSON ¶
func (g *GremlinGraphResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GremlinGraphResource.
type GremlinResourcesClient ¶
type GremlinResourcesClient struct {
// contains filtered or unexported fields
}
GremlinResourcesClient contains the methods for the GremlinResources group. Don't use this type directly, use NewGremlinResourcesClient() instead.
func NewGremlinResourcesClient ¶
func NewGremlinResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GremlinResourcesClient, error)
NewGremlinResourcesClient creates a new instance of GremlinResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GremlinResourcesClient) BeginCreateUpdateGremlinDatabase ¶
func (client *GremlinResourcesClient) BeginCreateUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters GremlinDatabaseCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions) (*runtime.Poller[GremlinResourcesClientCreateUpdateGremlinDatabaseResponse], error)
BeginCreateUpdateGremlinDatabase - Create or update an Azure Cosmos DB Gremlin database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- createUpdateGremlinDatabaseParameters - The parameters to provide for the current Gremlin database.
- options - GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginCreateUpdateGremlinDatabase(ctx, "rg1", "ddb1", "databaseName", armcosmos.GremlinDatabaseCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.GremlinDatabaseCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.GremlinDatabaseResource{ ID: to.Ptr("databaseName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GremlinDatabaseGetResults = armcosmos.GremlinDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.GremlinDatabaseGetProperties{ // Resource: &armcosmos.GremlinDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginCreateUpdateGremlinGraph ¶
func (client *GremlinResourcesClient) BeginCreateUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters GremlinGraphCreateUpdateParameters, options *GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions) (*runtime.Poller[GremlinResourcesClientCreateUpdateGremlinGraphResponse], error)
BeginCreateUpdateGremlinGraph - Create or update an Azure Cosmos DB Gremlin graph If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- createUpdateGremlinGraphParameters - The parameters to provide for the current Gremlin graph.
- options - GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinGraph method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginCreateUpdateGremlinGraph(ctx, "rg1", "ddb1", "databaseName", "graphName", armcosmos.GremlinGraphCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.GremlinGraphCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.GremlinGraphResource{ ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ ConflictResolutionPath: to.Ptr("/path"), Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), }, DefaultTTL: to.Ptr[int32](100), ID: to.Ptr("graphName"), IndexingPolicy: &armcosmos.IndexingPolicy{ Automatic: to.Ptr(true), ExcludedPaths: []*armcosmos.ExcludedPath{}, IncludedPaths: []*armcosmos.IncludedPath{ { Path: to.Ptr("/*"), Indexes: []*armcosmos.Indexes{ { DataType: to.Ptr(armcosmos.DataTypeString), Kind: to.Ptr(armcosmos.IndexKindRange), Precision: to.Ptr[int32](-1), }, { DataType: to.Ptr(armcosmos.DataTypeNumber), Kind: to.Ptr(armcosmos.IndexKindRange), Precision: to.Ptr[int32](-1), }}, }}, IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), }, PartitionKey: &armcosmos.ContainerPartitionKey{ Kind: to.Ptr(armcosmos.PartitionKindHash), Paths: []*string{ to.Ptr("/AccountNumber")}, }, UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ UniqueKeys: []*armcosmos.UniqueKey{ { Paths: []*string{ to.Ptr("/testPath")}, }}, }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GremlinGraphGetResults = armcosmos.GremlinGraphGetResults{ // Name: to.Ptr("graphName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/gremlinGraphs"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/gremlinGraphs/graphName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.GremlinGraphGetProperties{ // Resource: &armcosmos.GremlinGraphGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("graphName"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginDeleteGremlinDatabase ¶
func (client *GremlinResourcesClient) BeginDeleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginDeleteGremlinDatabaseOptions) (*runtime.Poller[GremlinResourcesClientDeleteGremlinDatabaseResponse], error)
BeginDeleteGremlinDatabase - Deletes an existing Azure Cosmos DB Gremlin database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientBeginDeleteGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginDeleteGremlinDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*GremlinResourcesClient) BeginDeleteGremlinGraph ¶
func (client *GremlinResourcesClient) BeginDeleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginDeleteGremlinGraphOptions) (*runtime.Poller[GremlinResourcesClientDeleteGremlinGraphResponse], error)
BeginDeleteGremlinGraph - Deletes an existing Azure Cosmos DB Gremlin graph. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- options - GremlinResourcesClientBeginDeleteGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinGraph method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginDeleteGremlinGraph(ctx, "rg1", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*GremlinResourcesClient) BeginMigrateGremlinDatabaseToAutoscale ¶
func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions) (*runtime.Poller[GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse], error)
BeginMigrateGremlinDatabaseToAutoscale - Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginMigrateGremlinDatabaseToAutoscale(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginMigrateGremlinDatabaseToManualThroughput ¶
func (client *GremlinResourcesClient) BeginMigrateGremlinDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions) (*runtime.Poller[GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse], error)
BeginMigrateGremlinDatabaseToManualThroughput - Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginMigrateGremlinDatabaseToManualThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginMigrateGremlinGraphToAutoscale ¶
func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions) (*runtime.Poller[GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse], error)
BeginMigrateGremlinGraphToAutoscale - Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- options - GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginMigrateGremlinGraphToAutoscale(ctx, "rg1", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginMigrateGremlinGraphToManualThroughput ¶
func (client *GremlinResourcesClient) BeginMigrateGremlinGraphToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions) (*runtime.Poller[GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse], error)
BeginMigrateGremlinGraphToManualThroughput - Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- options - GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginMigrateGremlinGraphToManualThroughput(ctx, "rg1", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginRetrieveContinuousBackupInformation ¶ added in v2.2.0
func (client *GremlinResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, location ContinuousBackupRestoreLocation, options *GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*runtime.Poller[GremlinResourcesClientRetrieveContinuousBackupInformationResponse], error)
BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- location - The name of the continuous backup restore location.
- options - GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the GremlinResourcesClient.BeginRetrieveContinuousBackupInformation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphBackupInformation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginRetrieveContinuousBackupInformation(ctx, "rgName", "ddb1", "databaseName", "graphName", armcosmos.ContinuousBackupRestoreLocation{ Location: to.Ptr("North Europe"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupInformation = armcosmos.BackupInformation{ // ContinuousBackupInformation: &armcosmos.ContinuousBackupInformation{ // LatestRestorableTimestamp: to.Ptr("2021-02-05T02:40:50Z"), // }, // }
Output:
func (*GremlinResourcesClient) BeginUpdateGremlinDatabaseThroughput ¶
func (client *GremlinResourcesClient) BeginUpdateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions) (*runtime.Poller[GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse], error)
BeginUpdateGremlinDatabaseThroughput - Update RUs per second of an Azure Cosmos DB Gremlin database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current Gremlin database.
- options - GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginUpdateGremlinDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) BeginUpdateGremlinGraphThroughput ¶
func (client *GremlinResourcesClient) BeginUpdateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions) (*runtime.Poller[GremlinResourcesClientUpdateGremlinGraphThroughputResponse], error)
BeginUpdateGremlinGraphThroughput - Update RUs per second of an Azure Cosmos DB Gremlin graph If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current Gremlin graph.
- options - GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinGraphThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGremlinResourcesClient().BeginUpdateGremlinGraphThroughput(ctx, "rg1", "ddb1", "databaseName", "graphName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/gremlinGraphs/graphName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) GetGremlinDatabase ¶
func (client *GremlinResourcesClient) GetGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientGetGremlinDatabaseOptions) (GremlinResourcesClientGetGremlinDatabaseResponse, error)
GetGremlinDatabase - Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientGetGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGremlinResourcesClient().GetGremlinDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GremlinDatabaseGetResults = armcosmos.GremlinDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.GremlinDatabaseGetProperties{ // Resource: &armcosmos.GremlinDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // }, // }, // }
Output:
func (*GremlinResourcesClient) GetGremlinDatabaseThroughput ¶
func (client *GremlinResourcesClient) GetGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientGetGremlinDatabaseThroughputOptions) (GremlinResourcesClientGetGremlinDatabaseThroughputResponse, error)
GetGremlinDatabaseThroughput - Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientGetGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGremlinResourcesClient().GetGremlinDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) GetGremlinGraph ¶
func (client *GremlinResourcesClient) GetGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientGetGremlinGraphOptions) (GremlinResourcesClientGetGremlinGraphResponse, error)
GetGremlinGraph - Gets the Gremlin graph under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- options - GremlinResourcesClientGetGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraph method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGremlinResourcesClient().GetGremlinGraph(ctx, "rgName", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GremlinGraphGetResults = armcosmos.GremlinGraphGetResults{ // Name: to.Ptr("graphName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/apis/databases/graphs"), // ID: to.Ptr("graphName"), // Properties: &armcosmos.GremlinGraphGetProperties{ // Resource: &armcosmos.GremlinGraphGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("graphName"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }
Output:
func (*GremlinResourcesClient) GetGremlinGraphThroughput ¶
func (client *GremlinResourcesClient) GetGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, options *GremlinResourcesClientGetGremlinGraphThroughputOptions) (GremlinResourcesClientGetGremlinGraphThroughputResponse, error)
GetGremlinGraphThroughput - Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- graphName - Cosmos DB graph name.
- options - GremlinResourcesClientGetGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraphThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGremlinResourcesClient().GetGremlinGraphThroughput(ctx, "rg1", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/gremlinGraphs/graphName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*GremlinResourcesClient) NewListGremlinDatabasesPager ¶
func (client *GremlinResourcesClient) NewListGremlinDatabasesPager(resourceGroupName string, accountName string, options *GremlinResourcesClientListGremlinDatabasesOptions) *runtime.Pager[GremlinResourcesClientListGremlinDatabasesResponse]
NewListGremlinDatabasesPager - Lists the Gremlin databases under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - GremlinResourcesClientListGremlinDatabasesOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinDatabasesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGremlinResourcesClient().NewListGremlinDatabasesPager("rgName", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.GremlinDatabaseListResult = armcosmos.GremlinDatabaseListResult{ // Value: []*armcosmos.GremlinDatabaseGetResults{ // { // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/gremlinDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.GremlinDatabaseGetProperties{ // Resource: &armcosmos.GremlinDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // }, // }, // }}, // } }
Output:
func (*GremlinResourcesClient) NewListGremlinGraphsPager ¶
func (client *GremlinResourcesClient) NewListGremlinGraphsPager(resourceGroupName string, accountName string, databaseName string, options *GremlinResourcesClientListGremlinGraphsOptions) *runtime.Pager[GremlinResourcesClientListGremlinGraphsResponse]
NewListGremlinGraphsPager - Lists the Gremlin graph under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - GremlinResourcesClientListGremlinGraphsOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinGraphsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGremlinGraphList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGremlinResourcesClient().NewListGremlinGraphsPager("rgName", "ddb1", "databaseName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.GremlinGraphListResult = armcosmos.GremlinGraphListResult{ // Value: []*armcosmos.GremlinGraphGetResults{ // { // Name: to.Ptr("testgrf"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/apis/databases/graphs"), // ID: to.Ptr("testgrf"), // Properties: &armcosmos.GremlinGraphGetProperties{ // Resource: &armcosmos.GremlinGraphGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("testgrf"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }}, // } }
Output:
type GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions ¶
type GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinDatabase method.
type GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions ¶
type GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinGraph method.
type GremlinResourcesClientBeginDeleteGremlinDatabaseOptions ¶
type GremlinResourcesClientBeginDeleteGremlinDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginDeleteGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinDatabase method.
type GremlinResourcesClientBeginDeleteGremlinGraphOptions ¶
type GremlinResourcesClientBeginDeleteGremlinGraphOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginDeleteGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinGraph method.
type GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions ¶
type GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale method.
type GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions ¶
type GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput method.
type GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions ¶
type GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale method.
type GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions ¶
type GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput method.
type GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶ added in v2.2.0
type GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the GremlinResourcesClient.BeginRetrieveContinuousBackupInformation method.
type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions ¶
type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput method.
type GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions ¶
type GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinGraphThroughput method.
type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse ¶
type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse struct { // An Azure Cosmos DB Gremlin database. GremlinDatabaseGetResults }
GremlinResourcesClientCreateUpdateGremlinDatabaseResponse contains the response from method GremlinResourcesClient.BeginCreateUpdateGremlinDatabase.
type GremlinResourcesClientCreateUpdateGremlinGraphResponse ¶
type GremlinResourcesClientCreateUpdateGremlinGraphResponse struct { // An Azure Cosmos DB Gremlin graph. GremlinGraphGetResults }
GremlinResourcesClientCreateUpdateGremlinGraphResponse contains the response from method GremlinResourcesClient.BeginCreateUpdateGremlinGraph.
type GremlinResourcesClientDeleteGremlinDatabaseResponse ¶
type GremlinResourcesClientDeleteGremlinDatabaseResponse struct { }
GremlinResourcesClientDeleteGremlinDatabaseResponse contains the response from method GremlinResourcesClient.BeginDeleteGremlinDatabase.
type GremlinResourcesClientDeleteGremlinGraphResponse ¶
type GremlinResourcesClientDeleteGremlinGraphResponse struct { }
GremlinResourcesClientDeleteGremlinGraphResponse contains the response from method GremlinResourcesClient.BeginDeleteGremlinGraph.
type GremlinResourcesClientGetGremlinDatabaseOptions ¶
type GremlinResourcesClientGetGremlinDatabaseOptions struct { }
GremlinResourcesClientGetGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabase method.
type GremlinResourcesClientGetGremlinDatabaseResponse ¶
type GremlinResourcesClientGetGremlinDatabaseResponse struct { // An Azure Cosmos DB Gremlin database. GremlinDatabaseGetResults }
GremlinResourcesClientGetGremlinDatabaseResponse contains the response from method GremlinResourcesClient.GetGremlinDatabase.
type GremlinResourcesClientGetGremlinDatabaseThroughputOptions ¶
type GremlinResourcesClientGetGremlinDatabaseThroughputOptions struct { }
GremlinResourcesClientGetGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabaseThroughput method.
type GremlinResourcesClientGetGremlinDatabaseThroughputResponse ¶
type GremlinResourcesClientGetGremlinDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientGetGremlinDatabaseThroughputResponse contains the response from method GremlinResourcesClient.GetGremlinDatabaseThroughput.
type GremlinResourcesClientGetGremlinGraphOptions ¶
type GremlinResourcesClientGetGremlinGraphOptions struct { }
GremlinResourcesClientGetGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraph method.
type GremlinResourcesClientGetGremlinGraphResponse ¶
type GremlinResourcesClientGetGremlinGraphResponse struct { // An Azure Cosmos DB Gremlin graph. GremlinGraphGetResults }
GremlinResourcesClientGetGremlinGraphResponse contains the response from method GremlinResourcesClient.GetGremlinGraph.
type GremlinResourcesClientGetGremlinGraphThroughputOptions ¶
type GremlinResourcesClientGetGremlinGraphThroughputOptions struct { }
GremlinResourcesClientGetGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraphThroughput method.
type GremlinResourcesClientGetGremlinGraphThroughputResponse ¶
type GremlinResourcesClientGetGremlinGraphThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientGetGremlinGraphThroughputResponse contains the response from method GremlinResourcesClient.GetGremlinGraphThroughput.
type GremlinResourcesClientListGremlinDatabasesOptions ¶
type GremlinResourcesClientListGremlinDatabasesOptions struct { }
GremlinResourcesClientListGremlinDatabasesOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinDatabasesPager method.
type GremlinResourcesClientListGremlinDatabasesResponse ¶
type GremlinResourcesClientListGremlinDatabasesResponse struct { // The List operation response, that contains the Gremlin databases and their properties. GremlinDatabaseListResult }
GremlinResourcesClientListGremlinDatabasesResponse contains the response from method GremlinResourcesClient.NewListGremlinDatabasesPager.
type GremlinResourcesClientListGremlinGraphsOptions ¶
type GremlinResourcesClientListGremlinGraphsOptions struct { }
GremlinResourcesClientListGremlinGraphsOptions contains the optional parameters for the GremlinResourcesClient.NewListGremlinGraphsPager method.
type GremlinResourcesClientListGremlinGraphsResponse ¶
type GremlinResourcesClientListGremlinGraphsResponse struct { // The List operation response, that contains the graphs and their properties. GremlinGraphListResult }
GremlinResourcesClientListGremlinGraphsResponse contains the response from method GremlinResourcesClient.NewListGremlinGraphsPager.
type GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse ¶
type GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse contains the response from method GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale.
type GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse ¶
type GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse contains the response from method GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput.
type GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse ¶
type GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse contains the response from method GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale.
type GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse ¶
type GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse contains the response from method GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput.
type GremlinResourcesClientRetrieveContinuousBackupInformationResponse ¶ added in v2.2.0
type GremlinResourcesClientRetrieveContinuousBackupInformationResponse struct { // Backup information of a resource. BackupInformation }
GremlinResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method GremlinResourcesClient.BeginRetrieveContinuousBackupInformation.
type GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse ¶
type GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse contains the response from method GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput.
type GremlinResourcesClientUpdateGremlinGraphThroughputResponse ¶
type GremlinResourcesClientUpdateGremlinGraphThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
GremlinResourcesClientUpdateGremlinGraphThroughputResponse contains the response from method GremlinResourcesClient.BeginUpdateGremlinGraphThroughput.
type IPAddressOrRange ¶
type IPAddressOrRange struct { // 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 }
IPAddressOrRange - IpAddressOrRange object
func (IPAddressOrRange) MarshalJSON ¶
func (i IPAddressOrRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPAddressOrRange.
func (*IPAddressOrRange) UnmarshalJSON ¶
func (i *IPAddressOrRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressOrRange.
type IncludedPath ¶
type IncludedPath struct { // List of indexes for this path Indexes []*Indexes // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string }
IncludedPath - The paths that are included in indexing
func (IncludedPath) MarshalJSON ¶
func (i IncludedPath) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IncludedPath.
func (*IncludedPath) UnmarshalJSON ¶
func (i *IncludedPath) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IncludedPath.
type IndexKind ¶
type IndexKind string
IndexKind - Indicates the type of index.
func PossibleIndexKindValues ¶
func PossibleIndexKindValues() []IndexKind
PossibleIndexKindValues returns the possible values for the IndexKind const type.
type Indexes ¶
type Indexes struct { // The datatype for which the indexing behavior is applied to. DataType *DataType // Indicates the type of index. Kind *IndexKind // The precision of the index. -1 is maximum precision. Precision *int32 }
Indexes - The indexes for the path.
func (Indexes) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Indexes.
func (*Indexes) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Indexes.
type IndexingMode ¶
type IndexingMode string
IndexingMode - Indicates the indexing mode.
const ( IndexingModeConsistent IndexingMode = "consistent" IndexingModeLazy IndexingMode = "lazy" IndexingModeNone IndexingMode = "none" )
func PossibleIndexingModeValues ¶
func PossibleIndexingModeValues() []IndexingMode
PossibleIndexingModeValues returns the possible values for the IndexingMode const type.
type IndexingPolicy ¶
type IndexingPolicy struct { // Indicates if the indexing policy is automatic Automatic *bool // List of composite path list CompositeIndexes [][]*CompositePath // List of paths to exclude from indexing ExcludedPaths []*ExcludedPath // List of paths to include in the indexing IncludedPaths []*IncludedPath // Indicates the indexing mode. IndexingMode *IndexingMode // List of spatial specifics SpatialIndexes []*SpatialSpec }
IndexingPolicy - Cosmos DB indexing policy
func (IndexingPolicy) MarshalJSON ¶
func (i IndexingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IndexingPolicy.
func (*IndexingPolicy) UnmarshalJSON ¶
func (i *IndexingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IndexingPolicy.
type KeyKind ¶
type KeyKind string
KeyKind - The access key to regenerate.
func PossibleKeyKindValues ¶
func PossibleKeyKindValues() []KeyKind
PossibleKeyKindValues returns the possible values for the KeyKind const type.
type KeyWrapMetadata ¶ added in v2.2.0
type KeyWrapMetadata struct { // Algorithm used in wrapping and unwrapping of the data encryption key. Algorithm *string // The name of associated KeyEncryptionKey (aka CustomerManagedKey). Name *string // ProviderName of KeyStoreProvider. Type *string // Reference / link to the KeyEncryptionKey. Value *string }
KeyWrapMetadata - Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key.
func (KeyWrapMetadata) MarshalJSON ¶ added in v2.2.0
func (k KeyWrapMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyWrapMetadata.
func (*KeyWrapMetadata) UnmarshalJSON ¶ added in v2.2.0
func (k *KeyWrapMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyWrapMetadata.
type Kind ¶ added in v2.4.0
type Kind string
Kind - Kind of the connection string key
func PossibleKindValues ¶ added in v2.4.0
func PossibleKindValues() []Kind
PossibleKindValues returns the possible values for the Kind const type.
type ListClusters ¶
type ListClusters struct { // Container for the array of clusters. Value []*ClusterResource }
ListClusters - List of managed Cassandra clusters.
func (ListClusters) MarshalJSON ¶
func (l ListClusters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListClusters.
func (*ListClusters) UnmarshalJSON ¶
func (l *ListClusters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListClusters.
type ListDataCenters ¶
type ListDataCenters struct { // READ-ONLY; Container for array of data centers. Value []*DataCenterResource }
ListDataCenters - List of managed Cassandra data centers and their properties.
func (ListDataCenters) MarshalJSON ¶
func (l ListDataCenters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListDataCenters.
func (*ListDataCenters) UnmarshalJSON ¶
func (l *ListDataCenters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListDataCenters.
type Location ¶
type Location struct { // 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 *int32 // Flag to indicate whether or not this region is an AvailabilityZone region IsZoneRedundant *bool // The name of the region. LocationName *string // READ-ONLY; The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/ DocumentEndpoint *string // READ-ONLY; The unique identifier of the region within the database account. Example: <accountName>-<locationName>. ID *string // READ-ONLY; 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. ProvisioningState *string }
Location - A region in which the Azure Cosmos DB database account is deployed.
func (Location) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Location.
func (*Location) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Location.
type LocationGetResult ¶
type LocationGetResult struct { // Cosmos DB location metadata Properties *LocationProperties // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
LocationGetResult - Cosmos DB location get result
func (LocationGetResult) MarshalJSON ¶
func (l LocationGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationGetResult.
func (*LocationGetResult) UnmarshalJSON ¶
func (l *LocationGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocationGetResult.
type LocationListResult ¶
type LocationListResult struct { // READ-ONLY; List of Cosmos DB locations and their properties. Value []*LocationGetResult }
LocationListResult - The List operation response, that contains Cosmos DB locations and their properties.
func (LocationListResult) MarshalJSON ¶
func (l LocationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationListResult.
func (*LocationListResult) UnmarshalJSON ¶
func (l *LocationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocationListResult.
type LocationProperties ¶
type LocationProperties struct { // READ-ONLY; The properties of available backup storage redundancies. BackupStorageRedundancies []*BackupStorageRedundancy // READ-ONLY; Flag indicating whether the location is residency sensitive. IsResidencyRestricted *bool // READ-ONLY; Flag indicating whether the subscription have access in region for Availability Zones(Az). IsSubscriptionRegionAccessAllowedForAz *bool // READ-ONLY; Flag indicating whether the subscription have access in region for Non-Availability Zones. IsSubscriptionRegionAccessAllowedForRegular *bool // READ-ONLY; Enum to indicate current buildout status of the region. Status *Status // READ-ONLY; Flag indicating whether the location supports availability zones or not. SupportsAvailabilityZone *bool }
LocationProperties - Cosmos DB location metadata
func (LocationProperties) MarshalJSON ¶
func (l LocationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationProperties.
func (*LocationProperties) UnmarshalJSON ¶
func (l *LocationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocationProperties.
type LocationsClient ¶
type LocationsClient struct {
// contains filtered or unexported fields
}
LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.
func NewLocationsClient ¶
func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)
NewLocationsClient creates a new instance of LocationsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocationsClient) Get ¶
func (client *LocationsClient) Get(ctx context.Context, location string, options *LocationsClientGetOptions) (LocationsClientGetResponse, error)
Get - Get the properties of an existing Cosmos DB location If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- options - LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBLocationGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().Get(ctx, "westus", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocationGetResult = armcosmos.LocationGetResult{ // Name: to.Ptr("westus"), // Type: to.Ptr("Microsoft.DocumentDB/locations"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus"), // Properties: &armcosmos.LocationProperties{ // BackupStorageRedundancies: []*armcosmos.BackupStorageRedundancy{ // to.Ptr(armcosmos.BackupStorageRedundancyLocal), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(true), // IsSubscriptionRegionAccessAllowedForAz: to.Ptr(true), // IsSubscriptionRegionAccessAllowedForRegular: to.Ptr(true), // Status: to.Ptr(armcosmos.StatusOnline), // SupportsAvailabilityZone: to.Ptr(true), // }, // }
Output:
func (*LocationsClient) NewListPager ¶
func (client *LocationsClient) NewListPager(options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse]
NewListPager - List Cosmos DB locations and their properties
Generated from API version 2023-11-15
- options - LocationsClientListOptions contains the optional parameters for the LocationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBLocationList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLocationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LocationListResult = armcosmos.LocationListResult{ // Value: []*armcosmos.LocationGetResult{ // { // Name: to.Ptr("westus"), // Type: to.Ptr("Microsoft.DocumentDB/locations"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus"), // Properties: &armcosmos.LocationProperties{ // BackupStorageRedundancies: []*armcosmos.BackupStorageRedundancy{ // to.Ptr(armcosmos.BackupStorageRedundancyLocal), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(false), // IsSubscriptionRegionAccessAllowedForAz: to.Ptr(false), // IsSubscriptionRegionAccessAllowedForRegular: to.Ptr(true), // Status: to.Ptr(armcosmos.StatusOnline), // SupportsAvailabilityZone: to.Ptr(false), // }, // }, // { // Name: to.Ptr("centralus"), // Type: to.Ptr("Microsoft.DocumentDB/locations"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus"), // Properties: &armcosmos.LocationProperties{ // BackupStorageRedundancies: []*armcosmos.BackupStorageRedundancy{ // to.Ptr(armcosmos.BackupStorageRedundancyZone), // to.Ptr(armcosmos.BackupStorageRedundancyGeo)}, // IsResidencyRestricted: to.Ptr(false), // IsSubscriptionRegionAccessAllowedForAz: to.Ptr(true), // IsSubscriptionRegionAccessAllowedForRegular: to.Ptr(false), // Status: to.Ptr(armcosmos.StatusOnline), // SupportsAvailabilityZone: to.Ptr(true), // }, // }}, // } }
Output:
type LocationsClientGetOptions ¶
type LocationsClientGetOptions struct { }
LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method.
type LocationsClientGetResponse ¶
type LocationsClientGetResponse struct { // Cosmos DB location get result LocationGetResult }
LocationsClientGetResponse contains the response from method LocationsClient.Get.
type LocationsClientListOptions ¶
type LocationsClientListOptions struct { }
LocationsClientListOptions contains the optional parameters for the LocationsClient.NewListPager method.
type LocationsClientListResponse ¶
type LocationsClientListResponse struct { // The List operation response, that contains Cosmos DB locations and their properties. LocationListResult }
LocationsClientListResponse contains the response from method LocationsClient.NewListPager.
type ManagedCassandraARMResourceProperties ¶
type ManagedCassandraARMResourceProperties struct { // Identity for the resource. Identity *ManagedCassandraManagedServiceIdentity // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ManagedCassandraARMResourceProperties - The core properties of ARM resources.
func (ManagedCassandraARMResourceProperties) MarshalJSON ¶
func (m ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCassandraARMResourceProperties.
func (*ManagedCassandraARMResourceProperties) UnmarshalJSON ¶
func (m *ManagedCassandraARMResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraARMResourceProperties.
type ManagedCassandraManagedServiceIdentity ¶
type ManagedCassandraManagedServiceIdentity struct { // The type of the resource. Type *ManagedCassandraResourceIdentityType // READ-ONLY; The object id of the identity resource. PrincipalID *string // READ-ONLY; The tenant id of the resource. TenantID *string }
ManagedCassandraManagedServiceIdentity - Identity for the resource.
func (ManagedCassandraManagedServiceIdentity) MarshalJSON ¶
func (m ManagedCassandraManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCassandraManagedServiceIdentity.
func (*ManagedCassandraManagedServiceIdentity) UnmarshalJSON ¶
func (m *ManagedCassandraManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraManagedServiceIdentity.
type ManagedCassandraProvisioningState ¶
type ManagedCassandraProvisioningState string
ManagedCassandraProvisioningState - The status of the resource at the time the operation was called.
const ( ManagedCassandraProvisioningStateCanceled ManagedCassandraProvisioningState = "Canceled" ManagedCassandraProvisioningStateCreating ManagedCassandraProvisioningState = "Creating" ManagedCassandraProvisioningStateDeleting ManagedCassandraProvisioningState = "Deleting" ManagedCassandraProvisioningStateFailed ManagedCassandraProvisioningState = "Failed" ManagedCassandraProvisioningStateSucceeded ManagedCassandraProvisioningState = "Succeeded" ManagedCassandraProvisioningStateUpdating ManagedCassandraProvisioningState = "Updating" )
func PossibleManagedCassandraProvisioningStateValues ¶
func PossibleManagedCassandraProvisioningStateValues() []ManagedCassandraProvisioningState
PossibleManagedCassandraProvisioningStateValues returns the possible values for the ManagedCassandraProvisioningState const type.
type ManagedCassandraReaperStatus ¶
type ManagedCassandraReaperStatus struct { Healthy *bool // Dictionary of RepairRunIDs map[string]*string // Dictionary of RepairSchedules map[string]*string }
func (ManagedCassandraReaperStatus) MarshalJSON ¶
func (m ManagedCassandraReaperStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCassandraReaperStatus.
func (*ManagedCassandraReaperStatus) UnmarshalJSON ¶
func (m *ManagedCassandraReaperStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCassandraReaperStatus.
type ManagedCassandraResourceIdentityType ¶
type ManagedCassandraResourceIdentityType string
ManagedCassandraResourceIdentityType - The type of the resource.
const ( ManagedCassandraResourceIdentityTypeNone ManagedCassandraResourceIdentityType = "None" ManagedCassandraResourceIdentityTypeSystemAssigned ManagedCassandraResourceIdentityType = "SystemAssigned" )
func PossibleManagedCassandraResourceIdentityTypeValues ¶
func PossibleManagedCassandraResourceIdentityTypeValues() []ManagedCassandraResourceIdentityType
PossibleManagedCassandraResourceIdentityTypeValues returns the possible values for the ManagedCassandraResourceIdentityType const type.
type ManagedServiceIdentity ¶
type ManagedServiceIdentity struct { // 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 *ResourceIdentityType // The list of user identities associated with resource. The user identity dictionary key references will be ARM resource // ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. UserAssignedIdentities map[string]*Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties // READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string // READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string }
ManagedServiceIdentity - Identity for the resource.
func (ManagedServiceIdentity) MarshalJSON ¶
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type MaterializedViewsBuilderRegionalServiceResource ¶
type MaterializedViewsBuilderRegionalServiceResource struct { // READ-ONLY; The location name. Location *string // READ-ONLY; The regional service name. Name *string // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
MaterializedViewsBuilderRegionalServiceResource - Resource for a regional service location.
func (MaterializedViewsBuilderRegionalServiceResource) MarshalJSON ¶
func (m MaterializedViewsBuilderRegionalServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderRegionalServiceResource.
func (*MaterializedViewsBuilderRegionalServiceResource) UnmarshalJSON ¶
func (m *MaterializedViewsBuilderRegionalServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderRegionalServiceResource.
type MaterializedViewsBuilderServiceResource ¶
type MaterializedViewsBuilderServiceResource struct { // Properties for MaterializedViewsBuilderServiceResource. Properties *MaterializedViewsBuilderServiceResourceProperties }
MaterializedViewsBuilderServiceResource - Describes the service response property for MaterializedViewsBuilder.
func (MaterializedViewsBuilderServiceResource) MarshalJSON ¶
func (m MaterializedViewsBuilderServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResource.
func (*MaterializedViewsBuilderServiceResource) UnmarshalJSON ¶
func (m *MaterializedViewsBuilderServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResource.
type MaterializedViewsBuilderServiceResourceProperties ¶
type MaterializedViewsBuilderServiceResourceProperties struct { // REQUIRED; ServiceType for the service. ServiceType *ServiceType // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // READ-ONLY; Time of the last state change (ISO-8601 format). CreationTime *time.Time // READ-ONLY; An array that contains all of the locations for the service. Locations []*MaterializedViewsBuilderRegionalServiceResource // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
MaterializedViewsBuilderServiceResourceProperties - Properties for MaterializedViewsBuilderServiceResource.
func (*MaterializedViewsBuilderServiceResourceProperties) GetServiceResourceProperties ¶
func (m *MaterializedViewsBuilderServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type MaterializedViewsBuilderServiceResourceProperties.
func (MaterializedViewsBuilderServiceResourceProperties) MarshalJSON ¶
func (m MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceProperties.
func (*MaterializedViewsBuilderServiceResourceProperties) UnmarshalJSON ¶
func (m *MaterializedViewsBuilderServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResourceProperties.
type Metric ¶
type Metric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string // READ-ONLY; The unit of the metric. Unit *UnitType }
Metric data
func (Metric) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Metric.
func (*Metric) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Metric.
type MetricAvailability ¶
type MetricAvailability struct { // READ-ONLY; The retention for the metric values. Retention *string // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string }
MetricAvailability - The availability of the metric.
func (MetricAvailability) MarshalJSON ¶
func (m MetricAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricAvailability.
func (*MetricAvailability) UnmarshalJSON ¶
func (m *MetricAvailability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability.
type MetricDefinition ¶
type MetricDefinition struct { // READ-ONLY; The list of metric availabilities for the account. MetricAvailabilities []*MetricAvailability // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The primary aggregation type of the metric. PrimaryAggregationType *PrimaryAggregationType // READ-ONLY; The resource uri of the database. ResourceURI *string // READ-ONLY; The unit of the metric. Unit *UnitType }
MetricDefinition - The definition of a metric.
func (MetricDefinition) MarshalJSON ¶
func (m MetricDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDefinition.
func (*MetricDefinition) UnmarshalJSON ¶
func (m *MetricDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinition.
type MetricDefinitionsListResult ¶
type MetricDefinitionsListResult struct { // READ-ONLY; The list of metric definitions for the account. Value []*MetricDefinition }
MetricDefinitionsListResult - The response to a list metric definitions request.
func (MetricDefinitionsListResult) MarshalJSON ¶
func (m MetricDefinitionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDefinitionsListResult.
func (*MetricDefinitionsListResult) UnmarshalJSON ¶
func (m *MetricDefinitionsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinitionsListResult.
type MetricListResult ¶
type MetricListResult struct { // READ-ONLY; The list of metrics for the account. Value []*Metric }
MetricListResult - The response to a list metrics request.
func (MetricListResult) MarshalJSON ¶
func (m MetricListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricListResult.
func (*MetricListResult) UnmarshalJSON ¶
func (m *MetricListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult.
type MetricName ¶
type MetricName struct { // READ-ONLY; The friendly name of the metric. LocalizedValue *string // READ-ONLY; The name of the metric. Value *string }
MetricName - A metric name.
func (MetricName) MarshalJSON ¶
func (m MetricName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricName.
func (*MetricName) UnmarshalJSON ¶
func (m *MetricName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricName.
type MetricValue ¶
type MetricValue struct { // READ-ONLY; The average value of the metric. Average *float64 // READ-ONLY; The number of values for the metric. Count *int32 // READ-ONLY; The max value of the metric. Maximum *float64 // READ-ONLY; The min value of the metric. Minimum *float64 // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time // READ-ONLY; The total value of the metric. Total *float64 }
MetricValue - Represents metrics values.
func (MetricValue) MarshalJSON ¶
func (m MetricValue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricValue.
func (*MetricValue) UnmarshalJSON ¶
func (m *MetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue.
type MinimalTLSVersion ¶ added in v2.2.0
type MinimalTLSVersion string
MinimalTLSVersion - Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2.
const ( MinimalTLSVersionTLS MinimalTLSVersion = "Tls" MinimalTLSVersionTls11 MinimalTLSVersion = "Tls11" MinimalTLSVersionTls12 MinimalTLSVersion = "Tls12" )
func PossibleMinimalTLSVersionValues ¶ added in v2.2.0
func PossibleMinimalTLSVersionValues() []MinimalTLSVersion
PossibleMinimalTLSVersionValues returns the possible values for the MinimalTLSVersion const type.
type MongoDBCollectionCreateUpdateParameters ¶
type MongoDBCollectionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB collection. Properties *MongoDBCollectionCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoDBCollectionCreateUpdateParameters - Parameters to create and update Cosmos DB MongoDB collection.
func (MongoDBCollectionCreateUpdateParameters) MarshalJSON ¶
func (m MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateParameters.
func (*MongoDBCollectionCreateUpdateParameters) UnmarshalJSON ¶
func (m *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateParameters.
type MongoDBCollectionCreateUpdateProperties ¶
type MongoDBCollectionCreateUpdateProperties struct { // REQUIRED; 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 }
MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
func (MongoDBCollectionCreateUpdateProperties) MarshalJSON ¶
func (m MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionCreateUpdateProperties.
func (*MongoDBCollectionCreateUpdateProperties) UnmarshalJSON ¶
func (m *MongoDBCollectionCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionCreateUpdateProperties.
type MongoDBCollectionGetProperties ¶
type MongoDBCollectionGetProperties struct { Options *MongoDBCollectionGetPropertiesOptions Resource *MongoDBCollectionGetPropertiesResource }
MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection
func (MongoDBCollectionGetProperties) MarshalJSON ¶
func (m MongoDBCollectionGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetProperties.
func (*MongoDBCollectionGetProperties) UnmarshalJSON ¶
func (m *MongoDBCollectionGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetProperties.
type MongoDBCollectionGetPropertiesOptions ¶
type MongoDBCollectionGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (MongoDBCollectionGetPropertiesOptions) MarshalJSON ¶
func (m MongoDBCollectionGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesOptions.
func (*MongoDBCollectionGetPropertiesOptions) UnmarshalJSON ¶
func (m *MongoDBCollectionGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesOptions.
type MongoDBCollectionGetPropertiesResource ¶
type MongoDBCollectionGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB MongoDB collection ID *string // Analytical TTL. AnalyticalStorageTTL *int32 // Enum to indicate the mode of resource creation. CreateMode *CreateMode // List of index keys Indexes []*MongoIndex // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (MongoDBCollectionGetPropertiesResource) MarshalJSON ¶
func (m MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesResource.
func (*MongoDBCollectionGetPropertiesResource) UnmarshalJSON ¶
func (m *MongoDBCollectionGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetPropertiesResource.
type MongoDBCollectionGetResults ¶
type MongoDBCollectionGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB MongoDB collection Properties *MongoDBCollectionGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoDBCollectionGetResults - An Azure Cosmos DB MongoDB collection.
func (MongoDBCollectionGetResults) MarshalJSON ¶
func (m MongoDBCollectionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetResults.
func (*MongoDBCollectionGetResults) UnmarshalJSON ¶
func (m *MongoDBCollectionGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionGetResults.
type MongoDBCollectionListResult ¶
type MongoDBCollectionListResult struct { // READ-ONLY; List of MongoDB collections and their properties. Value []*MongoDBCollectionGetResults }
MongoDBCollectionListResult - The List operation response, that contains the MongoDB collections and their properties.
func (MongoDBCollectionListResult) MarshalJSON ¶
func (m MongoDBCollectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionListResult.
func (*MongoDBCollectionListResult) UnmarshalJSON ¶
func (m *MongoDBCollectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionListResult.
type MongoDBCollectionResource ¶
type MongoDBCollectionResource struct { // REQUIRED; Name of the Cosmos DB MongoDB collection ID *string // Analytical TTL. AnalyticalStorageTTL *int32 // Enum to indicate the mode of resource creation. CreateMode *CreateMode // List of index keys Indexes []*MongoIndex // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string }
MongoDBCollectionResource - Cosmos DB MongoDB collection resource object
func (MongoDBCollectionResource) MarshalJSON ¶
func (m MongoDBCollectionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionResource.
func (*MongoDBCollectionResource) UnmarshalJSON ¶
func (m *MongoDBCollectionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBCollectionResource.
type MongoDBDatabaseCreateUpdateParameters ¶
type MongoDBDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB database. Properties *MongoDBDatabaseCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoDBDatabaseCreateUpdateParameters - Parameters to create and update Cosmos DB MongoDB database.
func (MongoDBDatabaseCreateUpdateParameters) MarshalJSON ¶
func (m MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateParameters.
func (*MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON ¶
func (m *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateParameters.
type MongoDBDatabaseCreateUpdateProperties ¶
type MongoDBDatabaseCreateUpdateProperties struct { // REQUIRED; 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 }
MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
func (MongoDBDatabaseCreateUpdateProperties) MarshalJSON ¶
func (m MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseCreateUpdateProperties.
func (*MongoDBDatabaseCreateUpdateProperties) UnmarshalJSON ¶
func (m *MongoDBDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseCreateUpdateProperties.
type MongoDBDatabaseGetProperties ¶
type MongoDBDatabaseGetProperties struct { Options *MongoDBDatabaseGetPropertiesOptions Resource *MongoDBDatabaseGetPropertiesResource }
MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database
func (MongoDBDatabaseGetProperties) MarshalJSON ¶
func (m MongoDBDatabaseGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetProperties.
func (*MongoDBDatabaseGetProperties) UnmarshalJSON ¶
func (m *MongoDBDatabaseGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetProperties.
type MongoDBDatabaseGetPropertiesOptions ¶
type MongoDBDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (MongoDBDatabaseGetPropertiesOptions) MarshalJSON ¶
func (m MongoDBDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesOptions.
func (*MongoDBDatabaseGetPropertiesOptions) UnmarshalJSON ¶
func (m *MongoDBDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesOptions.
type MongoDBDatabaseGetPropertiesResource ¶
type MongoDBDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (MongoDBDatabaseGetPropertiesResource) MarshalJSON ¶
func (m MongoDBDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetPropertiesResource.
func (*MongoDBDatabaseGetPropertiesResource) UnmarshalJSON ¶
func (m *MongoDBDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetPropertiesResource.
type MongoDBDatabaseGetResults ¶
type MongoDBDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB MongoDB database Properties *MongoDBDatabaseGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoDBDatabaseGetResults - An Azure Cosmos DB MongoDB database.
func (MongoDBDatabaseGetResults) MarshalJSON ¶
func (m MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseGetResults.
func (*MongoDBDatabaseGetResults) UnmarshalJSON ¶
func (m *MongoDBDatabaseGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseGetResults.
type MongoDBDatabaseListResult ¶
type MongoDBDatabaseListResult struct { // READ-ONLY; List of MongoDB databases and their properties. Value []*MongoDBDatabaseGetResults }
MongoDBDatabaseListResult - The List operation response, that contains the MongoDB databases and their properties.
func (MongoDBDatabaseListResult) MarshalJSON ¶
func (m MongoDBDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseListResult.
func (*MongoDBDatabaseListResult) UnmarshalJSON ¶
func (m *MongoDBDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseListResult.
type MongoDBDatabaseResource ¶
type MongoDBDatabaseResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters }
MongoDBDatabaseResource - Cosmos DB MongoDB database resource object
func (MongoDBDatabaseResource) MarshalJSON ¶
func (m MongoDBDatabaseResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBDatabaseResource.
func (*MongoDBDatabaseResource) UnmarshalJSON ¶
func (m *MongoDBDatabaseResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoDBDatabaseResource.
type MongoDBResourcesClient ¶
type MongoDBResourcesClient struct {
// contains filtered or unexported fields
}
MongoDBResourcesClient contains the methods for the MongoDBResources group. Don't use this type directly, use NewMongoDBResourcesClient() instead.
func NewMongoDBResourcesClient ¶
func NewMongoDBResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MongoDBResourcesClient, error)
NewMongoDBResourcesClient creates a new instance of MongoDBResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MongoDBResourcesClient) BeginCreateUpdateMongoDBCollection ¶
func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters MongoDBCollectionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse], error)
BeginCreateUpdateMongoDBCollection - Create or update an Azure Cosmos DB MongoDB Collection If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- createUpdateMongoDBCollectionParameters - The parameters to provide for the current MongoDB Collection.
- options - MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoDBCollection(ctx, "rg1", "ddb1", "databaseName", "collectionName", armcosmos.MongoDBCollectionCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.MongoDBCollectionCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.MongoDBCollectionResource{ ID: to.Ptr("collectionName"), Indexes: []*armcosmos.MongoIndex{ { Key: &armcosmos.MongoIndexKeys{ Keys: []*string{ to.Ptr("_ts")}, }, Options: &armcosmos.MongoIndexOptions{ ExpireAfterSeconds: to.Ptr[int32](100), Unique: to.Ptr(true), }, }, { Key: &armcosmos.MongoIndexKeys{ Keys: []*string{ to.Ptr("_id")}, }, }}, ShardKey: map[string]*string{ "testKey": to.Ptr("Hash"), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoDBCollectionGetResults = armcosmos.MongoDBCollectionGetResults{ // Name: to.Ptr("collectionName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBCollectionGetProperties{ // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ // ID: to.Ptr("collectionName"), // Indexes: []*armcosmos.MongoIndex{ // { // Key: &armcosmos.MongoIndexKeys{ // Keys: []*string{ // to.Ptr("_ts")}, // }, // Options: &armcosmos.MongoIndexOptions{ // ExpireAfterSeconds: to.Ptr[int32](100), // Unique: to.Ptr(true), // }, // }, // { // Key: &armcosmos.MongoIndexKeys{ // Keys: []*string{ // to.Ptr("_id")}, // }, // }}, // ShardKey: map[string]*string{ // "testKey": to.Ptr("Hash"), // }, // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginCreateUpdateMongoDBDatabase ¶
func (client *MongoDBResourcesClient) BeginCreateUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters MongoDBDatabaseCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse], error)
BeginCreateUpdateMongoDBDatabase - Create or updates Azure Cosmos DB MongoDB database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- createUpdateMongoDBDatabaseParameters - The parameters to provide for the current MongoDB database.
- options - MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoDBDatabase(ctx, "rg1", "ddb1", "databaseName", armcosmos.MongoDBDatabaseCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.MongoDBDatabaseCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.MongoDBDatabaseResource{ ID: to.Ptr("databaseName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoDBDatabaseGetResults = armcosmos.MongoDBDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBDatabaseGetProperties{ // Resource: &armcosmos.MongoDBDatabaseGetPropertiesResource{ // ID: to.Ptr("updatedDatabaseName"), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoRoleDefinitionParameters MongoRoleDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse], error)
BeginCreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- createUpdateMongoRoleDefinitionParameters - The properties required to create or update a Role Definition.
- options - MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoRoleDefinition(ctx, "myMongoRoleDefinitionId", "myResourceGroupName", "myAccountName", armcosmos.MongoRoleDefinitionCreateUpdateParameters{ Properties: &armcosmos.MongoRoleDefinitionResource{ DatabaseName: to.Ptr("sales"), Privileges: []*armcosmos.Privilege{ { Actions: []*string{ to.Ptr("insert"), to.Ptr("find")}, Resource: &armcosmos.PrivilegeResource{ Collection: to.Ptr("sales"), Db: to.Ptr("sales"), }, }}, RoleName: to.Ptr("myRoleName"), Roles: []*armcosmos.Role{ { Db: to.Ptr("sales"), Role: to.Ptr("myInheritedRole"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoRoleDefinitionGetResults = armcosmos.MongoRoleDefinitionGetResults{ // Name: to.Ptr("myMongoDbRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongoDbRoleDefinitionId"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbRoleDefinitions/myMongoDbRoleDefinitionId"), // Properties: &armcosmos.MongoRoleDefinitionResource{ // Type: to.Ptr(armcosmos.MongoRoleDefinitionTypeCustomRole), // DatabaseName: to.Ptr("sales"), // Privileges: []*armcosmos.Privilege{ // { // Actions: []*string{ // to.Ptr("find"), // to.Ptr("insert")}, // Resource: &armcosmos.PrivilegeResource{ // Collection: to.Ptr("coll"), // Db: to.Ptr("sales"), // }, // }}, // RoleName: to.Ptr("myRoleName"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // }, // }
Output:
func (*MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoUserDefinitionParameters MongoUserDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse], error)
BeginCreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoUserDefinitionID - The ID for the User Definition {dbName.userName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- createUpdateMongoUserDefinitionParameters - The properties required to create or update a User Definition.
- options - MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginCreateUpdateMongoUserDefinition(ctx, "myMongoUserDefinitionId", "myResourceGroupName", "myAccountName", armcosmos.MongoUserDefinitionCreateUpdateParameters{ Properties: &armcosmos.MongoUserDefinitionResource{ CustomData: to.Ptr("My custom data"), DatabaseName: to.Ptr("sales"), Mechanisms: to.Ptr("SCRAM-SHA-256"), Password: to.Ptr("myPassword"), Roles: []*armcosmos.Role{ { Db: to.Ptr("sales"), Role: to.Ptr("myReadRole"), }}, UserName: to.Ptr("myUserName"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoUserDefinitionGetResults = armcosmos.MongoUserDefinitionGetResults{ // Name: to.Ptr("myUserName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId"), // Properties: &armcosmos.MongoUserDefinitionResource{ // CustomData: to.Ptr("My custom data"), // DatabaseName: to.Ptr("sales"), // Mechanisms: to.Ptr("SCRAM-SHA-256"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // UserName: to.Ptr("myUserName"), // }, // }
Output:
func (*MongoDBResourcesClient) BeginDeleteMongoDBCollection ¶
func (client *MongoDBResourcesClient) BeginDeleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoDBCollectionResponse], error)
BeginDeleteMongoDBCollection - Deletes an existing Azure Cosmos DB MongoDB Collection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- options - MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBCollection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginDeleteMongoDBCollection(ctx, "rg1", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*MongoDBResourcesClient) BeginDeleteMongoDBDatabase ¶
func (client *MongoDBResourcesClient) BeginDeleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoDBDatabaseResponse], error)
BeginDeleteMongoDBDatabase - Deletes an existing Azure Cosmos DB MongoDB database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginDeleteMongoDBDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*MongoDBResourcesClient) BeginDeleteMongoRoleDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) BeginDeleteMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoRoleDefinitionResponse], error)
BeginDeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBRoleDefinitionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginDeleteMongoRoleDefinition(ctx, "myMongoRoleDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*MongoDBResourcesClient) BeginDeleteMongoUserDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) BeginDeleteMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoUserDefinitionResponse], error)
BeginDeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoUserDefinitionID - The ID for the User Definition {dbName.userName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoUserDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBUserDefinitionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginDeleteMongoUserDefinition(ctx, "myMongoUserDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*MongoDBResourcesClient) BeginMigrateMongoDBCollectionToAutoscale ¶
func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions) (*runtime.Poller[MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse], error)
BeginMigrateMongoDBCollectionToAutoscale - Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- options - MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginMigrateMongoDBCollectionToAutoscale(ctx, "rg1", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginMigrateMongoDBCollectionToManualThroughput ¶
func (client *MongoDBResourcesClient) BeginMigrateMongoDBCollectionToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse], error)
BeginMigrateMongoDBCollectionToManualThroughput - Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- options - MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginMigrateMongoDBCollectionToManualThroughput(ctx, "rg1", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToAutoscale ¶
func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions) (*runtime.Poller[MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse], error)
BeginMigrateMongoDBDatabaseToAutoscale - Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginMigrateMongoDBDatabaseToAutoscale(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToManualThroughput ¶
func (client *MongoDBResourcesClient) BeginMigrateMongoDBDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse], error)
BeginMigrateMongoDBDatabaseToManualThroughput - Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginMigrateMongoDBDatabaseToManualThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation ¶
func (client *MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, location ContinuousBackupRestoreLocation, options *MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*runtime.Poller[MongoDBResourcesClientRetrieveContinuousBackupInformationResponse], error)
BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a Mongodb collection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- location - The name of the continuous backup restore location.
- options - MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionBackupInformation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginRetrieveContinuousBackupInformation(ctx, "rgName", "ddb1", "databaseName", "collectionName", armcosmos.ContinuousBackupRestoreLocation{ Location: to.Ptr("North Europe"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupInformation = armcosmos.BackupInformation{ // ContinuousBackupInformation: &armcosmos.ContinuousBackupInformation{ // LatestRestorableTimestamp: to.Ptr("2021-02-05T02:40:50Z"), // }, // }
Output:
func (*MongoDBResourcesClient) BeginUpdateMongoDBCollectionThroughput ¶
func (client *MongoDBResourcesClient) BeginUpdateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions) (*runtime.Poller[MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse], error)
BeginUpdateMongoDBCollectionThroughput - Update the RUs per second of an Azure Cosmos DB MongoDB collection If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current MongoDB collection.
- options - MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginUpdateMongoDBCollectionThroughput(ctx, "rg1", "ddb1", "databaseName", "collectionName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) BeginUpdateMongoDBDatabaseThroughput ¶
func (client *MongoDBResourcesClient) BeginUpdateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions) (*runtime.Poller[MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse], error)
BeginUpdateMongoDBDatabaseThroughput - Update RUs per second of the an Azure Cosmos DB MongoDB database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- updateThroughputParameters - The RUs per second of the parameters to provide for the current MongoDB database.
- options - MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMongoDBResourcesClient().BeginUpdateMongoDBDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoDBCollection ¶
func (client *MongoDBResourcesClient) GetMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientGetMongoDBCollectionOptions) (MongoDBResourcesClientGetMongoDBCollectionResponse, error)
GetMongoDBCollection - Gets the MongoDB collection under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- options - MongoDBResourcesClientGetMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoDBCollection(ctx, "rgName", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoDBCollectionGetResults = armcosmos.MongoDBCollectionGetResults{ // Name: to.Ptr("collectionName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBCollectionGetProperties{ // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ID: to.Ptr("testcoll"), // Indexes: []*armcosmos.MongoIndex{ // { // Key: &armcosmos.MongoIndexKeys{ // Keys: []*string{ // to.Ptr("testKey")}, // }, // Options: &armcosmos.MongoIndexOptions{ // ExpireAfterSeconds: to.Ptr[int32](100), // Unique: to.Ptr(true), // }, // }}, // ShardKey: map[string]*string{ // "testKey": to.Ptr("Hash"), // }, // }, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoDBCollectionThroughput ¶
func (client *MongoDBResourcesClient) GetMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, options *MongoDBResourcesClientGetMongoDBCollectionThroughputOptions) (MongoDBResourcesClientGetMongoDBCollectionThroughputResponse, error)
GetMongoDBCollectionThroughput - Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- collectionName - Cosmos DB collection name.
- options - MongoDBResourcesClientGetMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollectionThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoDBCollectionThroughput(ctx, "rg1", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoDBDatabase ¶
func (client *MongoDBResourcesClient) GetMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientGetMongoDBDatabaseOptions) (MongoDBResourcesClientGetMongoDBDatabaseResponse, error)
GetMongoDBDatabase - Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientGetMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoDBDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoDBDatabaseGetResults = armcosmos.MongoDBDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBDatabaseGetProperties{ // Resource: &armcosmos.MongoDBDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ID: to.Ptr("databaseName"), // }, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoDBDatabaseThroughput ¶
func (client *MongoDBResourcesClient) GetMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions) (MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse, error)
GetMongoDBDatabaseThroughput - Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoDBDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoRoleDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) GetMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientGetMongoRoleDefinitionOptions) (MongoDBResourcesClientGetMongoRoleDefinitionResponse, error)
GetMongoRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientGetMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBRoleDefinitionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoRoleDefinition(ctx, "myMongoRoleDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoRoleDefinitionGetResults = armcosmos.MongoRoleDefinitionGetResults{ // Name: to.Ptr("myMongoRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbRoleDefinitions/myMongoDbRoleDefinitionId"), // Properties: &armcosmos.MongoRoleDefinitionResource{ // Type: to.Ptr(armcosmos.MongoRoleDefinitionTypeCustomRole), // DatabaseName: to.Ptr("sales"), // Privileges: []*armcosmos.Privilege{ // { // Actions: []*string{ // to.Ptr("find"), // to.Ptr("insert")}, // Resource: &armcosmos.PrivilegeResource{ // Collection: to.Ptr("coll"), // Db: to.Ptr("sales"), // }, // }}, // RoleName: to.Ptr("myRoleName"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // }, // }
Output:
func (*MongoDBResourcesClient) GetMongoUserDefinition ¶ added in v2.1.0
func (client *MongoDBResourcesClient) GetMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientGetMongoUserDefinitionOptions) (MongoDBResourcesClientGetMongoUserDefinitionResponse, error)
GetMongoUserDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- mongoUserDefinitionID - The ID for the User Definition {dbName.userName}.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientGetMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoUserDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBUserDefinitionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMongoDBResourcesClient().GetMongoUserDefinition(ctx, "myMongoUserDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MongoUserDefinitionGetResults = armcosmos.MongoUserDefinitionGetResults{ // Name: to.Ptr("myUserId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId"), // Properties: &armcosmos.MongoUserDefinitionResource{ // CustomData: to.Ptr("My custom data"), // DatabaseName: to.Ptr("sales"), // Mechanisms: to.Ptr("SCRAM-SHA-256"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // UserName: to.Ptr("myUserName"), // }, // }
Output:
func (*MongoDBResourcesClient) NewListMongoDBCollectionsPager ¶
func (client *MongoDBResourcesClient) NewListMongoDBCollectionsPager(resourceGroupName string, accountName string, databaseName string, options *MongoDBResourcesClientListMongoDBCollectionsOptions) *runtime.Pager[MongoDBResourcesClientListMongoDBCollectionsResponse]
NewListMongoDBCollectionsPager - Lists the MongoDB collection under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - MongoDBResourcesClientListMongoDBCollectionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBCollectionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBCollectionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMongoDBResourcesClient().NewListMongoDBCollectionsPager("rgName", "ddb1", "databaseName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MongoDBCollectionListResult = armcosmos.MongoDBCollectionListResult{ // Value: []*armcosmos.MongoDBCollectionGetResults{ // { // Name: to.Ptr("collectionName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/mongodbCollections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName/mongodbCollections/collectionName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBCollectionGetProperties{ // Resource: &armcosmos.MongoDBCollectionGetPropertiesResource{ // ID: to.Ptr("testcoll"), // Indexes: []*armcosmos.MongoIndex{ // { // Key: &armcosmos.MongoIndexKeys{ // Keys: []*string{ // to.Ptr("testKey")}, // }, // Options: &armcosmos.MongoIndexOptions{ // ExpireAfterSeconds: to.Ptr[int32](100), // Unique: to.Ptr(true), // }, // }}, // ShardKey: map[string]*string{ // "testKey": to.Ptr("Hash"), // }, // }, // }, // }}, // } }
Output:
func (*MongoDBResourcesClient) NewListMongoDBDatabasesPager ¶
func (client *MongoDBResourcesClient) NewListMongoDBDatabasesPager(resourceGroupName string, accountName string, options *MongoDBResourcesClientListMongoDBDatabasesOptions) *runtime.Pager[MongoDBResourcesClientListMongoDBDatabasesResponse]
NewListMongoDBDatabasesPager - Lists the MongoDB databases under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientListMongoDBDatabasesOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBDatabasesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMongoDBResourcesClient().NewListMongoDBDatabasesPager("rgName", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MongoDBDatabaseListResult = armcosmos.MongoDBDatabaseListResult{ // Value: []*armcosmos.MongoDBDatabaseGetResults{ // { // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.MongoDBDatabaseGetProperties{ // Resource: &armcosmos.MongoDBDatabaseGetPropertiesResource{ // ID: to.Ptr("databaseName"), // }, // }, // }}, // } }
Output:
func (*MongoDBResourcesClient) NewListMongoRoleDefinitionsPager ¶ added in v2.1.0
func (client *MongoDBResourcesClient) NewListMongoRoleDefinitionsPager(resourceGroupName string, accountName string, options *MongoDBResourcesClientListMongoRoleDefinitionsOptions) *runtime.Pager[MongoDBResourcesClientListMongoRoleDefinitionsResponse]
NewListMongoRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo Role Definitions.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoRoleDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBRoleDefinitionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMongoDBResourcesClient().NewListMongoRoleDefinitionsPager("myResourceGroupName", "myAccountName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MongoRoleDefinitionListResult = armcosmos.MongoRoleDefinitionListResult{ // Value: []*armcosmos.MongoRoleDefinitionGetResults{ // { // Name: to.Ptr("myRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbRoleDefinitions/myRoleDefinitionId"), // Properties: &armcosmos.MongoRoleDefinitionResource{ // Type: to.Ptr(armcosmos.MongoRoleDefinitionTypeCustomRole), // DatabaseName: to.Ptr("sales"), // Privileges: []*armcosmos.Privilege{ // { // Actions: []*string{ // to.Ptr("find"), // to.Ptr("insert")}, // Resource: &armcosmos.PrivilegeResource{ // Collection: to.Ptr("coll"), // Db: to.Ptr("sales"), // }, // }}, // RoleName: to.Ptr("myRoleName"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // }, // }}, // } }
Output:
func (*MongoDBResourcesClient) NewListMongoUserDefinitionsPager ¶ added in v2.1.0
func (client *MongoDBResourcesClient) NewListMongoUserDefinitionsPager(resourceGroupName string, accountName string, options *MongoDBResourcesClientListMongoUserDefinitionsOptions) *runtime.Pager[MongoDBResourcesClientListMongoUserDefinitionsResponse]
NewListMongoUserDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo User Definition.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoUserDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMongoDBUserDefinitionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMongoDBResourcesClient().NewListMongoUserDefinitionsPager("myResourceGroupName", "myAccountName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MongoUserDefinitionListResult = armcosmos.MongoUserDefinitionListResult{ // Value: []*armcosmos.MongoUserDefinitionGetResults{ // { // Name: to.Ptr("myUserId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId"), // Properties: &armcosmos.MongoUserDefinitionResource{ // CustomData: to.Ptr("My custom data"), // DatabaseName: to.Ptr("sales"), // Mechanisms: to.Ptr("SCRAM-SHA-256"), // Roles: []*armcosmos.Role{ // { // Db: to.Ptr("sales"), // Role: to.Ptr("myReadRole"), // }}, // UserName: to.Ptr("myUserName"), // }, // }}, // } }
Output:
type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions ¶
type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection method.
type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions ¶
type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase method.
type MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition method.
type MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition method.
type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions ¶
type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBCollection method.
type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions ¶
type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBDatabase method.
type MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoRoleDefinition method.
type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoUserDefinition method.
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions ¶
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale method.
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions ¶
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput method.
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions ¶
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale method.
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions ¶
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput method.
type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶
type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation method.
type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions ¶
type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput method.
type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions ¶
type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput method.
type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse ¶
type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse struct { // An Azure Cosmos DB MongoDB collection. MongoDBCollectionGetResults }
MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection.
type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse ¶
type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse struct { // An Azure Cosmos DB MongoDB database. MongoDBDatabaseGetResults }
MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase.
type MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse struct { // An Azure Cosmos DB Mongo Role Definition. MongoRoleDefinitionGetResults }
MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition.
type MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse struct { // An Azure Cosmos DB User Definition MongoUserDefinitionGetResults }
MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition.
type MongoDBResourcesClientDeleteMongoDBCollectionResponse ¶
type MongoDBResourcesClientDeleteMongoDBCollectionResponse struct { }
MongoDBResourcesClientDeleteMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.BeginDeleteMongoDBCollection.
type MongoDBResourcesClientDeleteMongoDBDatabaseResponse ¶
type MongoDBResourcesClientDeleteMongoDBDatabaseResponse struct { }
MongoDBResourcesClientDeleteMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.BeginDeleteMongoDBDatabase.
type MongoDBResourcesClientDeleteMongoRoleDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientDeleteMongoRoleDefinitionResponse struct { }
MongoDBResourcesClientDeleteMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.BeginDeleteMongoRoleDefinition.
type MongoDBResourcesClientDeleteMongoUserDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientDeleteMongoUserDefinitionResponse struct { }
MongoDBResourcesClientDeleteMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.BeginDeleteMongoUserDefinition.
type MongoDBResourcesClientGetMongoDBCollectionOptions ¶
type MongoDBResourcesClientGetMongoDBCollectionOptions struct { }
MongoDBResourcesClientGetMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollection method.
type MongoDBResourcesClientGetMongoDBCollectionResponse ¶
type MongoDBResourcesClientGetMongoDBCollectionResponse struct { // An Azure Cosmos DB MongoDB collection. MongoDBCollectionGetResults }
MongoDBResourcesClientGetMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.GetMongoDBCollection.
type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions ¶
type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions struct { }
MongoDBResourcesClientGetMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollectionThroughput method.
type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse ¶
type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientGetMongoDBCollectionThroughputResponse contains the response from method MongoDBResourcesClient.GetMongoDBCollectionThroughput.
type MongoDBResourcesClientGetMongoDBDatabaseOptions ¶
type MongoDBResourcesClientGetMongoDBDatabaseOptions struct { }
MongoDBResourcesClientGetMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabase method.
type MongoDBResourcesClientGetMongoDBDatabaseResponse ¶
type MongoDBResourcesClientGetMongoDBDatabaseResponse struct { // An Azure Cosmos DB MongoDB database. MongoDBDatabaseGetResults }
MongoDBResourcesClientGetMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.GetMongoDBDatabase.
type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions ¶
type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions struct { }
MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabaseThroughput method.
type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse ¶
type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse contains the response from method MongoDBResourcesClient.GetMongoDBDatabaseThroughput.
type MongoDBResourcesClientGetMongoRoleDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientGetMongoRoleDefinitionOptions struct { }
MongoDBResourcesClientGetMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoRoleDefinition method.
type MongoDBResourcesClientGetMongoRoleDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientGetMongoRoleDefinitionResponse struct { // An Azure Cosmos DB Mongo Role Definition. MongoRoleDefinitionGetResults }
MongoDBResourcesClientGetMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.GetMongoRoleDefinition.
type MongoDBResourcesClientGetMongoUserDefinitionOptions ¶ added in v2.1.0
type MongoDBResourcesClientGetMongoUserDefinitionOptions struct { }
MongoDBResourcesClientGetMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoUserDefinition method.
type MongoDBResourcesClientGetMongoUserDefinitionResponse ¶ added in v2.1.0
type MongoDBResourcesClientGetMongoUserDefinitionResponse struct { // An Azure Cosmos DB User Definition MongoUserDefinitionGetResults }
MongoDBResourcesClientGetMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.GetMongoUserDefinition.
type MongoDBResourcesClientListMongoDBCollectionsOptions ¶
type MongoDBResourcesClientListMongoDBCollectionsOptions struct { }
MongoDBResourcesClientListMongoDBCollectionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBCollectionsPager method.
type MongoDBResourcesClientListMongoDBCollectionsResponse ¶
type MongoDBResourcesClientListMongoDBCollectionsResponse struct { // The List operation response, that contains the MongoDB collections and their properties. MongoDBCollectionListResult }
MongoDBResourcesClientListMongoDBCollectionsResponse contains the response from method MongoDBResourcesClient.NewListMongoDBCollectionsPager.
type MongoDBResourcesClientListMongoDBDatabasesOptions ¶
type MongoDBResourcesClientListMongoDBDatabasesOptions struct { }
MongoDBResourcesClientListMongoDBDatabasesOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoDBDatabasesPager method.
type MongoDBResourcesClientListMongoDBDatabasesResponse ¶
type MongoDBResourcesClientListMongoDBDatabasesResponse struct { // The List operation response, that contains the MongoDB databases and their properties. MongoDBDatabaseListResult }
MongoDBResourcesClientListMongoDBDatabasesResponse contains the response from method MongoDBResourcesClient.NewListMongoDBDatabasesPager.
type MongoDBResourcesClientListMongoRoleDefinitionsOptions ¶ added in v2.1.0
type MongoDBResourcesClientListMongoRoleDefinitionsOptions struct { }
MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoRoleDefinitionsPager method.
type MongoDBResourcesClientListMongoRoleDefinitionsResponse ¶ added in v2.1.0
type MongoDBResourcesClientListMongoRoleDefinitionsResponse struct { // The relevant Mongo Role Definitions. MongoRoleDefinitionListResult }
MongoDBResourcesClientListMongoRoleDefinitionsResponse contains the response from method MongoDBResourcesClient.NewListMongoRoleDefinitionsPager.
type MongoDBResourcesClientListMongoUserDefinitionsOptions ¶ added in v2.1.0
type MongoDBResourcesClientListMongoUserDefinitionsOptions struct { }
MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.NewListMongoUserDefinitionsPager method.
type MongoDBResourcesClientListMongoUserDefinitionsResponse ¶ added in v2.1.0
type MongoDBResourcesClientListMongoUserDefinitionsResponse struct { // The relevant User Definition. MongoUserDefinitionListResult }
MongoDBResourcesClientListMongoUserDefinitionsResponse contains the response from method MongoDBResourcesClient.NewListMongoUserDefinitionsPager.
type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse ¶
type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse contains the response from method MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale.
type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse ¶
type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse contains the response from method MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput.
type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse ¶
type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse contains the response from method MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale.
type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse ¶
type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse contains the response from method MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput.
type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse ¶
type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse struct { // Backup information of a resource. BackupInformation }
MongoDBResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation.
type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse ¶
type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse contains the response from method MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput.
type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse ¶
type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse contains the response from method MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput.
type MongoIndex ¶
type MongoIndex struct { // Cosmos DB MongoDB collection index keys Key *MongoIndexKeys // Cosmos DB MongoDB collection index key options Options *MongoIndexOptions }
MongoIndex - Cosmos DB MongoDB collection index key
func (MongoIndex) MarshalJSON ¶
func (m MongoIndex) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoIndex.
func (*MongoIndex) UnmarshalJSON ¶
func (m *MongoIndex) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndex.
type MongoIndexKeys ¶
type MongoIndexKeys struct { // List of keys for each MongoDB collection in the Azure Cosmos DB service Keys []*string }
MongoIndexKeys - Cosmos DB MongoDB collection resource object
func (MongoIndexKeys) MarshalJSON ¶
func (m MongoIndexKeys) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoIndexKeys.
func (*MongoIndexKeys) UnmarshalJSON ¶
func (m *MongoIndexKeys) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexKeys.
type MongoIndexOptions ¶
type MongoIndexOptions struct { // Expire after seconds ExpireAfterSeconds *int32 // Is unique or not Unique *bool }
MongoIndexOptions - Cosmos DB MongoDB collection index options
func (MongoIndexOptions) MarshalJSON ¶
func (m MongoIndexOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoIndexOptions.
func (*MongoIndexOptions) UnmarshalJSON ¶
func (m *MongoIndexOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoIndexOptions.
type MongoRoleDefinitionCreateUpdateParameters ¶ added in v2.1.0
type MongoRoleDefinitionCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB Mongo Role Definition. Properties *MongoRoleDefinitionResource }
MongoRoleDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB Mongo Role Definition.
func (MongoRoleDefinitionCreateUpdateParameters) MarshalJSON ¶ added in v2.1.0
func (m MongoRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionCreateUpdateParameters.
func (*MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoRoleDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionCreateUpdateParameters.
type MongoRoleDefinitionGetResults ¶ added in v2.1.0
type MongoRoleDefinitionGetResults struct { // Properties related to the Mongo Role Definition. Properties *MongoRoleDefinitionResource // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoRoleDefinitionGetResults - An Azure Cosmos DB Mongo Role Definition.
func (MongoRoleDefinitionGetResults) MarshalJSON ¶ added in v2.1.0
func (m MongoRoleDefinitionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionGetResults.
func (*MongoRoleDefinitionGetResults) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoRoleDefinitionGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionGetResults.
type MongoRoleDefinitionListResult ¶ added in v2.1.0
type MongoRoleDefinitionListResult struct { // READ-ONLY; List of Mongo Role Definitions and their properties. Value []*MongoRoleDefinitionGetResults }
MongoRoleDefinitionListResult - The relevant Mongo Role Definitions.
func (MongoRoleDefinitionListResult) MarshalJSON ¶ added in v2.1.0
func (m MongoRoleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionListResult.
func (*MongoRoleDefinitionListResult) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoRoleDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionListResult.
type MongoRoleDefinitionResource ¶ added in v2.1.0
type MongoRoleDefinitionResource struct { // The database name for which access is being granted for this Role Definition. DatabaseName *string // A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire // database account or any underlying Database / Collection. Scopes higher than // Database are not enforceable as privilege. Privileges []*Privilege // A user-friendly name for the Role Definition. Must be unique for the database account. RoleName *string // The set of roles inherited by this Role Definition. Roles []*Role // Indicates whether the Role Definition was built-in or user created. Type *MongoRoleDefinitionType }
MongoRoleDefinitionResource - Azure Cosmos DB Mongo Role Definition resource object.
func (MongoRoleDefinitionResource) MarshalJSON ¶ added in v2.1.0
func (m MongoRoleDefinitionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionResource.
func (*MongoRoleDefinitionResource) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoRoleDefinitionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoRoleDefinitionResource.
type MongoRoleDefinitionType ¶ added in v2.1.0
type MongoRoleDefinitionType string
MongoRoleDefinitionType - Indicates whether the Role Definition was built-in or user created.
const ( MongoRoleDefinitionTypeBuiltInRole MongoRoleDefinitionType = "BuiltInRole" MongoRoleDefinitionTypeCustomRole MongoRoleDefinitionType = "CustomRole" )
func PossibleMongoRoleDefinitionTypeValues ¶ added in v2.1.0
func PossibleMongoRoleDefinitionTypeValues() []MongoRoleDefinitionType
PossibleMongoRoleDefinitionTypeValues returns the possible values for the MongoRoleDefinitionType const type.
type MongoUserDefinitionCreateUpdateParameters ¶ added in v2.1.0
type MongoUserDefinitionCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB Mongo User Definition. Properties *MongoUserDefinitionResource }
MongoUserDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB Mongo User Definition.
func (MongoUserDefinitionCreateUpdateParameters) MarshalJSON ¶ added in v2.1.0
func (m MongoUserDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionCreateUpdateParameters.
func (*MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoUserDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionCreateUpdateParameters.
type MongoUserDefinitionGetResults ¶ added in v2.1.0
type MongoUserDefinitionGetResults struct { // Properties related to the User Definition. Properties *MongoUserDefinitionResource // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
MongoUserDefinitionGetResults - An Azure Cosmos DB User Definition
func (MongoUserDefinitionGetResults) MarshalJSON ¶ added in v2.1.0
func (m MongoUserDefinitionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionGetResults.
func (*MongoUserDefinitionGetResults) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoUserDefinitionGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionGetResults.
type MongoUserDefinitionListResult ¶ added in v2.1.0
type MongoUserDefinitionListResult struct { // READ-ONLY; List of User Definition and their properties Value []*MongoUserDefinitionGetResults }
MongoUserDefinitionListResult - The relevant User Definition.
func (MongoUserDefinitionListResult) MarshalJSON ¶ added in v2.1.0
func (m MongoUserDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionListResult.
func (*MongoUserDefinitionListResult) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoUserDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionListResult.
type MongoUserDefinitionResource ¶ added in v2.1.0
type MongoUserDefinitionResource struct { // A custom definition for the USer Definition. CustomData *string // The database name for which access is being granted for this User Definition. DatabaseName *string // The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256. Mechanisms *string // The password for User Definition. Response does not contain user password. Password *string // The set of roles inherited by the User Definition. Roles []*Role // The user name for User Definition. UserName *string }
MongoUserDefinitionResource - Azure Cosmos DB Mongo User Definition resource object.
func (MongoUserDefinitionResource) MarshalJSON ¶ added in v2.1.0
func (m MongoUserDefinitionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionResource.
func (*MongoUserDefinitionResource) UnmarshalJSON ¶ added in v2.1.0
func (m *MongoUserDefinitionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MongoUserDefinitionResource.
type NetworkACLBypass ¶
type NetworkACLBypass string
NetworkACLBypass - Indicates what services are allowed to bypass firewall checks.
const ( NetworkACLBypassAzureServices NetworkACLBypass = "AzureServices" NetworkACLBypassNone NetworkACLBypass = "None" )
func PossibleNetworkACLBypassValues ¶
func PossibleNetworkACLBypassValues() []NetworkACLBypass
PossibleNetworkACLBypassValues returns the possible values for the NetworkACLBypass const type.
type NodeState ¶
type NodeState string
NodeState - The state of the node in Cassandra ring.
func PossibleNodeStateValues ¶
func PossibleNodeStateValues() []NodeState
PossibleNodeStateValues returns the possible values for the NodeState const type.
type NodeStatus ¶
type NodeStatus string
NodeStatus - Indicates whether the node is functioning or not.
const ( NodeStatusDown NodeStatus = "Down" NodeStatusUp NodeStatus = "Up" )
func PossibleNodeStatusValues ¶
func PossibleNodeStatusValues() []NodeStatus
PossibleNodeStatusValues returns the possible values for the NodeStatus const type.
type NotebookWorkspace ¶
type NotebookWorkspace struct { // Resource properties. Properties *NotebookWorkspaceProperties // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
NotebookWorkspace - A notebook workspace resource
func (NotebookWorkspace) MarshalJSON ¶
func (n NotebookWorkspace) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotebookWorkspace.
func (*NotebookWorkspace) UnmarshalJSON ¶
func (n *NotebookWorkspace) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspace.
type NotebookWorkspaceConnectionInfoResult ¶
type NotebookWorkspaceConnectionInfoResult struct { // READ-ONLY; Specifies auth token used for connecting to Notebook server (uses token-based auth). AuthToken *string // READ-ONLY; Specifies the endpoint of Notebook server. NotebookServerEndpoint *string }
NotebookWorkspaceConnectionInfoResult - The connection info for the given notebook workspace
func (NotebookWorkspaceConnectionInfoResult) MarshalJSON ¶
func (n NotebookWorkspaceConnectionInfoResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceConnectionInfoResult.
func (*NotebookWorkspaceConnectionInfoResult) UnmarshalJSON ¶
func (n *NotebookWorkspaceConnectionInfoResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceConnectionInfoResult.
type NotebookWorkspaceCreateUpdateParameters ¶
type NotebookWorkspaceCreateUpdateParameters struct { // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
NotebookWorkspaceCreateUpdateParameters - Parameters to create a notebook workspace resource
func (NotebookWorkspaceCreateUpdateParameters) MarshalJSON ¶
func (n NotebookWorkspaceCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceCreateUpdateParameters.
func (*NotebookWorkspaceCreateUpdateParameters) UnmarshalJSON ¶
func (n *NotebookWorkspaceCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceCreateUpdateParameters.
type NotebookWorkspaceListResult ¶
type NotebookWorkspaceListResult struct { // Array of notebook workspace resources Value []*NotebookWorkspace }
NotebookWorkspaceListResult - A list of notebook workspace resources
func (NotebookWorkspaceListResult) MarshalJSON ¶
func (n NotebookWorkspaceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceListResult.
func (*NotebookWorkspaceListResult) UnmarshalJSON ¶
func (n *NotebookWorkspaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceListResult.
type NotebookWorkspaceName ¶
type NotebookWorkspaceName string
const (
NotebookWorkspaceNameDefault NotebookWorkspaceName = "default"
)
func PossibleNotebookWorkspaceNameValues ¶
func PossibleNotebookWorkspaceNameValues() []NotebookWorkspaceName
PossibleNotebookWorkspaceNameValues returns the possible values for the NotebookWorkspaceName const type.
type NotebookWorkspaceProperties ¶
type NotebookWorkspaceProperties struct { // READ-ONLY; Specifies the endpoint of Notebook server. NotebookServerEndpoint *string // READ-ONLY; Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. Status *string }
NotebookWorkspaceProperties - Properties of a notebook workspace resource.
func (NotebookWorkspaceProperties) MarshalJSON ¶
func (n NotebookWorkspaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotebookWorkspaceProperties.
func (*NotebookWorkspaceProperties) UnmarshalJSON ¶
func (n *NotebookWorkspaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotebookWorkspaceProperties.
type NotebookWorkspacesClient ¶
type NotebookWorkspacesClient struct {
// contains filtered or unexported fields
}
NotebookWorkspacesClient contains the methods for the NotebookWorkspaces group. Don't use this type directly, use NewNotebookWorkspacesClient() instead.
func NewNotebookWorkspacesClient ¶
func NewNotebookWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotebookWorkspacesClient, error)
NewNotebookWorkspacesClient creates a new instance of NotebookWorkspacesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*NotebookWorkspacesClient) BeginCreateOrUpdate ¶
func (client *NotebookWorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, notebookCreateUpdateParameters NotebookWorkspaceCreateUpdateParameters, options *NotebookWorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NotebookWorkspacesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates the notebook workspace for a Cosmos DB account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- notebookCreateUpdateParameters - The notebook workspace to create for the current database account.
- options - NotebookWorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NotebookWorkspacesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNotebookWorkspacesClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, armcosmos.NotebookWorkspaceCreateUpdateParameters{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.NotebookWorkspace = armcosmos.NotebookWorkspace{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/notebookWorkspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/notebookWorkspaces/default"), // Properties: &armcosmos.NotebookWorkspaceProperties{ // NotebookServerEndpoint: to.Ptr("endpoint"), // Status: to.Ptr("Online"), // }, // }
Output:
func (*NotebookWorkspacesClient) BeginDelete ¶
func (client *NotebookWorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginDeleteOptions) (*runtime.Poller[NotebookWorkspacesClientDeleteResponse], error)
BeginDelete - Deletes the notebook workspace for a Cosmos DB account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- options - NotebookWorkspacesClientBeginDeleteOptions contains the optional parameters for the NotebookWorkspacesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNotebookWorkspacesClient().BeginDelete(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*NotebookWorkspacesClient) BeginRegenerateAuthToken ¶
func (client *NotebookWorkspacesClient) BeginRegenerateAuthToken(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginRegenerateAuthTokenOptions) (*runtime.Poller[NotebookWorkspacesClientRegenerateAuthTokenResponse], error)
BeginRegenerateAuthToken - Regenerates the auth token for the notebook workspace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- options - NotebookWorkspacesClientBeginRegenerateAuthTokenOptions contains the optional parameters for the NotebookWorkspacesClient.BeginRegenerateAuthToken method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNotebookWorkspacesClient().BeginRegenerateAuthToken(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*NotebookWorkspacesClient) BeginStart ¶
func (client *NotebookWorkspacesClient) BeginStart(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientBeginStartOptions) (*runtime.Poller[NotebookWorkspacesClientStartResponse], error)
BeginStart - Starts the notebook workspace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- options - NotebookWorkspacesClientBeginStartOptions contains the optional parameters for the NotebookWorkspacesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceStart.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNotebookWorkspacesClient().BeginStart(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*NotebookWorkspacesClient) Get ¶
func (client *NotebookWorkspacesClient) Get(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientGetOptions) (NotebookWorkspacesClientGetResponse, error)
Get - Gets the notebook workspace for a Cosmos DB account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- options - NotebookWorkspacesClientGetOptions contains the optional parameters for the NotebookWorkspacesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNotebookWorkspacesClient().Get(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.NotebookWorkspace = armcosmos.NotebookWorkspace{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/notebookWorkspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/notebookWorkspaces/default"), // Properties: &armcosmos.NotebookWorkspaceProperties{ // NotebookServerEndpoint: to.Ptr("endpoint"), // Status: to.Ptr("Online"), // }, // }
Output:
func (*NotebookWorkspacesClient) ListConnectionInfo ¶
func (client *NotebookWorkspacesClient) ListConnectionInfo(ctx context.Context, resourceGroupName string, accountName string, notebookWorkspaceName NotebookWorkspaceName, options *NotebookWorkspacesClientListConnectionInfoOptions) (NotebookWorkspacesClientListConnectionInfoResponse, error)
ListConnectionInfo - Retrieves the connection info for the notebook workspace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- notebookWorkspaceName - The name of the notebook workspace resource.
- options - NotebookWorkspacesClientListConnectionInfoOptions contains the optional parameters for the NotebookWorkspacesClient.ListConnectionInfo method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNotebookWorkspacesClient().ListConnectionInfo(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.NotebookWorkspaceConnectionInfoResult = armcosmos.NotebookWorkspaceConnectionInfoResult{ // AuthToken: to.Ptr("auth-token"), // NotebookServerEndpoint: to.Ptr("notebook endpoint"), // }
Output:
func (*NotebookWorkspacesClient) NewListByDatabaseAccountPager ¶
func (client *NotebookWorkspacesClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, options *NotebookWorkspacesClientListByDatabaseAccountOptions) *runtime.Pager[NotebookWorkspacesClientListByDatabaseAccountResponse]
NewListByDatabaseAccountPager - Gets the notebook workspace resources of an existing Cosmos DB account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - NotebookWorkspacesClientListByDatabaseAccountOptions contains the optional parameters for the NotebookWorkspacesClient.NewListByDatabaseAccountPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBNotebookWorkspaceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNotebookWorkspacesClient().NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.NotebookWorkspaceListResult = armcosmos.NotebookWorkspaceListResult{ // Value: []*armcosmos.NotebookWorkspace{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/notebookWorkspaces"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/notebookWorkspaces/default"), // Properties: &armcosmos.NotebookWorkspaceProperties{ // NotebookServerEndpoint: to.Ptr("endpoint"), // Status: to.Ptr("Online"), // }, // }}, // } }
Output:
type NotebookWorkspacesClientBeginCreateOrUpdateOptions ¶
type NotebookWorkspacesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NotebookWorkspacesClient.BeginCreateOrUpdate method.
type NotebookWorkspacesClientBeginDeleteOptions ¶
type NotebookWorkspacesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginDeleteOptions contains the optional parameters for the NotebookWorkspacesClient.BeginDelete method.
type NotebookWorkspacesClientBeginRegenerateAuthTokenOptions ¶
type NotebookWorkspacesClientBeginRegenerateAuthTokenOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginRegenerateAuthTokenOptions contains the optional parameters for the NotebookWorkspacesClient.BeginRegenerateAuthToken method.
type NotebookWorkspacesClientBeginStartOptions ¶
type NotebookWorkspacesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginStartOptions contains the optional parameters for the NotebookWorkspacesClient.BeginStart method.
type NotebookWorkspacesClientCreateOrUpdateResponse ¶
type NotebookWorkspacesClientCreateOrUpdateResponse struct { // A notebook workspace resource NotebookWorkspace }
NotebookWorkspacesClientCreateOrUpdateResponse contains the response from method NotebookWorkspacesClient.BeginCreateOrUpdate.
type NotebookWorkspacesClientDeleteResponse ¶
type NotebookWorkspacesClientDeleteResponse struct { }
NotebookWorkspacesClientDeleteResponse contains the response from method NotebookWorkspacesClient.BeginDelete.
type NotebookWorkspacesClientGetOptions ¶
type NotebookWorkspacesClientGetOptions struct { }
NotebookWorkspacesClientGetOptions contains the optional parameters for the NotebookWorkspacesClient.Get method.
type NotebookWorkspacesClientGetResponse ¶
type NotebookWorkspacesClientGetResponse struct { // A notebook workspace resource NotebookWorkspace }
NotebookWorkspacesClientGetResponse contains the response from method NotebookWorkspacesClient.Get.
type NotebookWorkspacesClientListByDatabaseAccountOptions ¶
type NotebookWorkspacesClientListByDatabaseAccountOptions struct { }
NotebookWorkspacesClientListByDatabaseAccountOptions contains the optional parameters for the NotebookWorkspacesClient.NewListByDatabaseAccountPager method.
type NotebookWorkspacesClientListByDatabaseAccountResponse ¶
type NotebookWorkspacesClientListByDatabaseAccountResponse struct { // A list of notebook workspace resources NotebookWorkspaceListResult }
NotebookWorkspacesClientListByDatabaseAccountResponse contains the response from method NotebookWorkspacesClient.NewListByDatabaseAccountPager.
type NotebookWorkspacesClientListConnectionInfoOptions ¶
type NotebookWorkspacesClientListConnectionInfoOptions struct { }
NotebookWorkspacesClientListConnectionInfoOptions contains the optional parameters for the NotebookWorkspacesClient.ListConnectionInfo method.
type NotebookWorkspacesClientListConnectionInfoResponse ¶
type NotebookWorkspacesClientListConnectionInfoResponse struct { // The connection info for the given notebook workspace NotebookWorkspaceConnectionInfoResult }
NotebookWorkspacesClientListConnectionInfoResponse contains the response from method NotebookWorkspacesClient.ListConnectionInfo.
type NotebookWorkspacesClientRegenerateAuthTokenResponse ¶
type NotebookWorkspacesClientRegenerateAuthTokenResponse struct { }
NotebookWorkspacesClientRegenerateAuthTokenResponse contains the response from method NotebookWorkspacesClient.BeginRegenerateAuthToken.
type NotebookWorkspacesClientStartResponse ¶
type NotebookWorkspacesClientStartResponse struct { }
NotebookWorkspacesClientStartResponse contains the response from method NotebookWorkspacesClient.BeginStart.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay // Operation name: {provider}/{resource}/{operation} Name *string }
Operation - REST API operation
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // Description of operation Description *string // Operation type: Read, write, delete, etc. Operation *string // Service provider: Microsoft.ResourceProvider Provider *string // Resource on which the operation is performed: Profile, endpoint, etc. Resource *string }
OperationDisplay - The object that represents the operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string // List of operations supported by the Resource Provider. Value []*Operation }
OperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationType ¶
type OperationType string
OperationType - Enum to indicate the operation type of the event.
const ( OperationTypeCreate OperationType = "Create" OperationTypeDelete OperationType = "Delete" OperationTypeRecreate OperationType = "Recreate" OperationTypeReplace OperationType = "Replace" OperationTypeSystemOperation OperationType = "SystemOperation" )
func PossibleOperationTypeValues ¶
func PossibleOperationTypeValues() []OperationType
PossibleOperationTypeValues returns the possible values for the OperationType const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Cosmos DB Resource Provider operations.
Generated from API version 2023-11-15
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBOperationsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armcosmos.OperationListResult{ // Value: []*armcosmos.Operation{ // { // Name: to.Ptr("operationName"), // Display: &armcosmos.OperationDisplay{ // Description: to.Ptr("description"), // Operation: to.Ptr("operationName"), // Provider: to.Ptr("providerName"), // Resource: to.Ptr("resourceName"), // }, // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the // next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OptionsResource ¶
type OptionsResource struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
OptionsResource - Cosmos DB options resource object
func (OptionsResource) MarshalJSON ¶
func (o OptionsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OptionsResource.
func (*OptionsResource) UnmarshalJSON ¶
func (o *OptionsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OptionsResource.
type PartitionKeyRangeIDClient ¶
type PartitionKeyRangeIDClient struct {
// contains filtered or unexported fields
}
PartitionKeyRangeIDClient contains the methods for the PartitionKeyRangeID group. Don't use this type directly, use NewPartitionKeyRangeIDClient() instead.
func NewPartitionKeyRangeIDClient ¶
func NewPartitionKeyRangeIDClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PartitionKeyRangeIDClient, error)
NewPartitionKeyRangeIDClient creates a new instance of PartitionKeyRangeIDClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PartitionKeyRangeIDClient) NewListMetricsPager ¶
func (client *PartitionKeyRangeIDClient) NewListMetricsPager(resourceGroupName string, accountName string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string, options *PartitionKeyRangeIDClientListMetricsOptions) *runtime.Pager[PartitionKeyRangeIDClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- partitionKeyRangeID - Partition Key Range Id for which to get data.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - PartitionKeyRangeIDClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPKeyRangeIdGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPartitionKeyRangeIDClient().NewListMetricsPager("rg1", "ddb1", "databaseRid", "collectionRid", "0", "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PartitionMetricListResult = armcosmos.PartitionMetricListResult{ // Value: []*armcosmos.PartitionMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Max RUs Per Second"), // Value: to.Ptr("Max RUs Per Second"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T23:58:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:54:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:55:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:56:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:57:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT1M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // PartitionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PartitionKeyRangeID: to.Ptr("0"), // }}, // } }
Output:
type PartitionKeyRangeIDClientListMetricsOptions ¶
type PartitionKeyRangeIDClientListMetricsOptions struct { }
PartitionKeyRangeIDClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDClient.NewListMetricsPager method.
type PartitionKeyRangeIDClientListMetricsResponse ¶
type PartitionKeyRangeIDClientListMetricsResponse struct { // The response to a list partition metrics request. PartitionMetricListResult }
PartitionKeyRangeIDClientListMetricsResponse contains the response from method PartitionKeyRangeIDClient.NewListMetricsPager.
type PartitionKeyRangeIDRegionClient ¶
type PartitionKeyRangeIDRegionClient struct {
// contains filtered or unexported fields
}
PartitionKeyRangeIDRegionClient contains the methods for the PartitionKeyRangeIDRegion group. Don't use this type directly, use NewPartitionKeyRangeIDRegionClient() instead.
func NewPartitionKeyRangeIDRegionClient ¶
func NewPartitionKeyRangeIDRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PartitionKeyRangeIDRegionClient, error)
NewPartitionKeyRangeIDRegionClient creates a new instance of PartitionKeyRangeIDRegionClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PartitionKeyRangeIDRegionClient) NewListMetricsPager ¶
func (client *PartitionKeyRangeIDRegionClient) NewListMetricsPager(resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string, options *PartitionKeyRangeIDRegionClientListMetricsOptions) *runtime.Pager[PartitionKeyRangeIDRegionClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given partition key range id and region.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- region - Cosmos DB region, with spaces between words and each word capitalized.
- databaseRid - Cosmos DB database rid.
- collectionRid - Cosmos DB collection rid.
- partitionKeyRangeID - Partition Key Range Id for which to get data.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - PartitionKeyRangeIDRegionClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDRegionClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPartitionKeyRangeIDRegionClient().NewListMetricsPager("rg1", "ddb1", "West US", "databaseRid", "collectionRid", "0", "$filter=(name.value eq 'Max RUs Per Second') and timeGrain eq duration'PT1M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T23:58:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PartitionMetricListResult = armcosmos.PartitionMetricListResult{ // Value: []*armcosmos.PartitionMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Max RUs Per Second"), // Value: to.Ptr("Max RUs Per Second"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T23:58:55.278Z"); return t}()), // MetricValues: []*armcosmos.MetricValue{ // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:54:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:55:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:56:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:57:55.278Z"); return t}()), // }, // { // Maximum: to.Ptr[float64](5), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:58:55.278Z"); return t}()), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT1M"), // Unit: to.Ptr(armcosmos.UnitTypeCount), // PartitionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // PartitionKeyRangeID: to.Ptr("0"), // }}, // } }
Output:
type PartitionKeyRangeIDRegionClientListMetricsOptions ¶
type PartitionKeyRangeIDRegionClientListMetricsOptions struct { }
PartitionKeyRangeIDRegionClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDRegionClient.NewListMetricsPager method.
type PartitionKeyRangeIDRegionClientListMetricsResponse ¶
type PartitionKeyRangeIDRegionClientListMetricsResponse struct { // The response to a list partition metrics request. PartitionMetricListResult }
PartitionKeyRangeIDRegionClientListMetricsResponse contains the response from method PartitionKeyRangeIDRegionClient.NewListMetricsPager.
type PartitionKind ¶
type PartitionKind string
PartitionKind - Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
const ( PartitionKindHash PartitionKind = "Hash" PartitionKindMultiHash PartitionKind = "MultiHash" PartitionKindRange PartitionKind = "Range" )
func PossiblePartitionKindValues ¶
func PossiblePartitionKindValues() []PartitionKind
PossiblePartitionKindValues returns the possible values for the PartitionKind const type.
type PartitionMetric ¶
type PartitionMetric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The partition id (GUID identifier) of the metric values. PartitionID *string // READ-ONLY; The partition key range id (integer identifier) of the metric values. PartitionKeyRangeID *string // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string // READ-ONLY; The unit of the metric. Unit *UnitType }
PartitionMetric - The metric values for a single partition.
func (PartitionMetric) MarshalJSON ¶
func (p PartitionMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartitionMetric.
func (*PartitionMetric) UnmarshalJSON ¶
func (p *PartitionMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetric.
type PartitionMetricListResult ¶
type PartitionMetricListResult struct { // READ-ONLY; The list of partition-level metrics for the account. Value []*PartitionMetric }
PartitionMetricListResult - The response to a list partition metrics request.
func (PartitionMetricListResult) MarshalJSON ¶
func (p PartitionMetricListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartitionMetricListResult.
func (*PartitionMetricListResult) UnmarshalJSON ¶
func (p *PartitionMetricListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartitionMetricListResult.
type PartitionUsage ¶
type PartitionUsage struct { // READ-ONLY; Current value for this metric CurrentValue *int64 // READ-ONLY; Maximum value for this metric Limit *int64 // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The partition id (GUID identifier) of the usages. PartitionID *string // READ-ONLY; The partition key range id (integer identifier) of the usages. PartitionKeyRangeID *string // READ-ONLY; The quota period used to summarize the usage values. QuotaPeriod *string // READ-ONLY; The unit of the metric. Unit *UnitType }
PartitionUsage - The partition level usage data for a usage request.
func (PartitionUsage) MarshalJSON ¶
func (p PartitionUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartitionUsage.
func (*PartitionUsage) UnmarshalJSON ¶
func (p *PartitionUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsage.
type PartitionUsagesResult ¶
type PartitionUsagesResult struct { // READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric Value []*PartitionUsage }
PartitionUsagesResult - The response to a list partition level usage request.
func (PartitionUsagesResult) MarshalJSON ¶
func (p PartitionUsagesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartitionUsagesResult.
func (*PartitionUsagesResult) UnmarshalJSON ¶
func (p *PartitionUsagesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartitionUsagesResult.
type PercentileClient ¶
type PercentileClient struct {
// contains filtered or unexported fields
}
PercentileClient contains the methods for the Percentile group. Don't use this type directly, use NewPercentileClient() instead.
func NewPercentileClient ¶
func NewPercentileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileClient, error)
NewPercentileClient creates a new instance of PercentileClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PercentileClient) NewListMetricsPager ¶
func (client *PercentileClient) NewListMetricsPager(resourceGroupName string, accountName string, filter string, options *PercentileClientListMetricsOptions) *runtime.Pager[PercentileClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - PercentileClientListMetricsOptions contains the optional parameters for the PercentileClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPercentileGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPercentileClient().NewListMetricsPager("rg1", "ddb1", "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PercentileMetricListResult = armcosmos.PercentileMetricListResult{ // Value: []*armcosmos.PercentileMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // Value: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.PercentileMetricValue{ // { // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // P10: to.Ptr[float64](1.11), // P25: to.Ptr[float64](2.5), // P50: to.Ptr[float64](4.34), // P75: to.Ptr[float64](5.2), // P90: to.Ptr[float64](6.77), // P95: to.Ptr[float64](7.1), // P99: to.Ptr[float64](8.3), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeMilliseconds), // }, // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-West US"), // Value: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-West US"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.PercentileMetricValue{ // { // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // P10: to.Ptr[float64](1.11), // P25: to.Ptr[float64](2.5), // P50: to.Ptr[float64](4.34), // P75: to.Ptr[float64](5.2), // P90: to.Ptr[float64](6.77), // P95: to.Ptr[float64](7.1), // P99: to.Ptr[float64](8.3), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeMilliseconds), // }}, // } }
Output:
type PercentileClientListMetricsOptions ¶
type PercentileClientListMetricsOptions struct { }
PercentileClientListMetricsOptions contains the optional parameters for the PercentileClient.NewListMetricsPager method.
type PercentileClientListMetricsResponse ¶
type PercentileClientListMetricsResponse struct { // The response to a list percentile metrics request. PercentileMetricListResult }
PercentileClientListMetricsResponse contains the response from method PercentileClient.NewListMetricsPager.
type PercentileMetric ¶
type PercentileMetric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time // READ-ONLY; The percentile metric values for the specified time window and timestep. MetricValues []*PercentileMetricValue // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string // READ-ONLY; The unit of the metric. Unit *UnitType }
PercentileMetric - Percentile Metric data
func (PercentileMetric) MarshalJSON ¶
func (p PercentileMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PercentileMetric.
func (*PercentileMetric) UnmarshalJSON ¶
func (p *PercentileMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetric.
type PercentileMetricListResult ¶
type PercentileMetricListResult struct { // READ-ONLY; The list of percentile metrics for the account. Value []*PercentileMetric }
PercentileMetricListResult - The response to a list percentile metrics request.
func (PercentileMetricListResult) MarshalJSON ¶
func (p PercentileMetricListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PercentileMetricListResult.
func (*PercentileMetricListResult) UnmarshalJSON ¶
func (p *PercentileMetricListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricListResult.
type PercentileMetricValue ¶
type PercentileMetricValue struct { // READ-ONLY; The average value of the metric. Average *float64 // READ-ONLY; The number of values for the metric. Count *int32 // READ-ONLY; The max value of the metric. Maximum *float64 // READ-ONLY; The min value of the metric. Minimum *float64 // READ-ONLY; The 10th percentile value for the metric. P10 *float64 // READ-ONLY; The 25th percentile value for the metric. P25 *float64 // READ-ONLY; The 50th percentile value for the metric. P50 *float64 // READ-ONLY; The 75th percentile value for the metric. P75 *float64 // READ-ONLY; The 90th percentile value for the metric. P90 *float64 // READ-ONLY; The 95th percentile value for the metric. P95 *float64 // READ-ONLY; The 99th percentile value for the metric. P99 *float64 // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time // READ-ONLY; The total value of the metric. Total *float64 }
PercentileMetricValue - Represents percentile metrics values.
func (PercentileMetricValue) MarshalJSON ¶
func (p PercentileMetricValue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PercentileMetricValue.
func (*PercentileMetricValue) UnmarshalJSON ¶
func (p *PercentileMetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PercentileMetricValue.
type PercentileSourceTargetClient ¶
type PercentileSourceTargetClient struct {
// contains filtered or unexported fields
}
PercentileSourceTargetClient contains the methods for the PercentileSourceTarget group. Don't use this type directly, use NewPercentileSourceTargetClient() instead.
func NewPercentileSourceTargetClient ¶
func NewPercentileSourceTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileSourceTargetClient, error)
NewPercentileSourceTargetClient creates a new instance of PercentileSourceTargetClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PercentileSourceTargetClient) NewListMetricsPager ¶
func (client *PercentileSourceTargetClient) NewListMetricsPager(resourceGroupName string, accountName string, sourceRegion string, targetRegion string, filter string, options *PercentileSourceTargetClientListMetricsOptions) *runtime.Pager[PercentileSourceTargetClientListMetricsResponse]
NewListMetricsPager - 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
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- sourceRegion - Source region from which data is written. Cosmos DB region, with spaces between words and each word capitalized.
- targetRegion - Target region to which data is written. Cosmos DB region, with spaces between words and each word capitalized.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - PercentileSourceTargetClientListMetricsOptions contains the optional parameters for the PercentileSourceTargetClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPercentileSourceTargetClient().NewListMetricsPager("rg1", "ddb1", "West Central US", "East US", "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PercentileMetricListResult = armcosmos.PercentileMetricListResult{ // Value: []*armcosmos.PercentileMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // Value: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.PercentileMetricValue{ // { // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // P10: to.Ptr[float64](1.11), // P25: to.Ptr[float64](2.5), // P50: to.Ptr[float64](4.34), // P75: to.Ptr[float64](5.2), // P90: to.Ptr[float64](6.77), // P95: to.Ptr[float64](7.1), // P99: to.Ptr[float64](8.3), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeMilliseconds), // }}, // } }
Output:
type PercentileSourceTargetClientListMetricsOptions ¶
type PercentileSourceTargetClientListMetricsOptions struct { }
PercentileSourceTargetClientListMetricsOptions contains the optional parameters for the PercentileSourceTargetClient.NewListMetricsPager method.
type PercentileSourceTargetClientListMetricsResponse ¶
type PercentileSourceTargetClientListMetricsResponse struct { // The response to a list percentile metrics request. PercentileMetricListResult }
PercentileSourceTargetClientListMetricsResponse contains the response from method PercentileSourceTargetClient.NewListMetricsPager.
type PercentileTargetClient ¶
type PercentileTargetClient struct {
// contains filtered or unexported fields
}
PercentileTargetClient contains the methods for the PercentileTarget group. Don't use this type directly, use NewPercentileTargetClient() instead.
func NewPercentileTargetClient ¶
func NewPercentileTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PercentileTargetClient, error)
NewPercentileTargetClient creates a new instance of PercentileTargetClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PercentileTargetClient) NewListMetricsPager ¶
func (client *PercentileTargetClient) NewListMetricsPager(resourceGroupName string, accountName string, targetRegion string, filter string, options *PercentileTargetClientListMetricsOptions) *runtime.Pager[PercentileTargetClientListMetricsResponse]
NewListMetricsPager - Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- targetRegion - Target region to which data is written. Cosmos DB region, with spaces between words and each word capitalized.
- filter - An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
- options - PercentileTargetClientListMetricsOptions contains the optional parameters for the PercentileTargetClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPercentileTargetGetMetrics.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPercentileTargetClient().NewListMetricsPager("rg1", "ddb1", "East US", "$filter=(name.value eq 'Probabilistic Bounded Staleness') and timeGrain eq duration'PT5M' and startTime eq '2017-11-19T23:53:55.2780000Z' and endTime eq '2017-11-20T00:13:55.2780000Z", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PercentileMetricListResult = armcosmos.PercentileMetricListResult{ // Value: []*armcosmos.PercentileMetric{ // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // Value: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-East US"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.PercentileMetricValue{ // { // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // P10: to.Ptr[float64](1.11), // P25: to.Ptr[float64](2.5), // P50: to.Ptr[float64](4.34), // P75: to.Ptr[float64](5.2), // P90: to.Ptr[float64](6.77), // P95: to.Ptr[float64](7.1), // P99: to.Ptr[float64](8.3), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeMilliseconds), // }, // { // Name: &armcosmos.MetricName{ // LocalizedValue: to.Ptr("Probabilistic Bounded Staleness-S-West Central US-T-West US"), // Value: to.Ptr("Probabilistic Bounded Staleness-S-West US-T-East US"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-20T00:13:55.278Z"); return t}()), // MetricValues: []*armcosmos.PercentileMetricValue{ // { // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // P10: to.Ptr[float64](1.11), // P25: to.Ptr[float64](2.5), // P50: to.Ptr[float64](4.34), // P75: to.Ptr[float64](5.2), // P90: to.Ptr[float64](6.77), // P95: to.Ptr[float64](7.1), // P99: to.Ptr[float64](8.3), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-19T23:53:55.278Z"); return t}()), // TimeGrain: to.Ptr("PT5M"), // Unit: to.Ptr(armcosmos.UnitTypeMilliseconds), // }}, // } }
Output:
type PercentileTargetClientListMetricsOptions ¶
type PercentileTargetClientListMetricsOptions struct { }
PercentileTargetClientListMetricsOptions contains the optional parameters for the PercentileTargetClient.NewListMetricsPager method.
type PercentileTargetClientListMetricsResponse ¶
type PercentileTargetClientListMetricsResponse struct { // The response to a list percentile metrics request. PercentileMetricListResult }
PercentileTargetClientListMetricsResponse contains the response from method PercentileTargetClient.NewListMetricsPager.
type PeriodicModeBackupPolicy ¶
type PeriodicModeBackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState // Configuration values for periodic mode backup PeriodicModeProperties *PeriodicModeProperties }
PeriodicModeBackupPolicy - The object representing periodic mode backup policy.
func (*PeriodicModeBackupPolicy) GetBackupPolicy ¶
func (p *PeriodicModeBackupPolicy) GetBackupPolicy() *BackupPolicy
GetBackupPolicy implements the BackupPolicyClassification interface for type PeriodicModeBackupPolicy.
func (PeriodicModeBackupPolicy) MarshalJSON ¶
func (p PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeriodicModeBackupPolicy.
func (*PeriodicModeBackupPolicy) UnmarshalJSON ¶
func (p *PeriodicModeBackupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeBackupPolicy.
type PeriodicModeProperties ¶
type PeriodicModeProperties struct { // An integer representing the interval in minutes between two backups BackupIntervalInMinutes *int32 // An integer representing the time (in hours) that each backup is retained BackupRetentionIntervalInHours *int32 // Enum to indicate type of backup residency BackupStorageRedundancy *BackupStorageRedundancy }
PeriodicModeProperties - Configuration values for periodic mode backup
func (PeriodicModeProperties) MarshalJSON ¶
func (p PeriodicModeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeriodicModeProperties.
func (*PeriodicModeProperties) UnmarshalJSON ¶
func (p *PeriodicModeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeriodicModeProperties.
type Permission ¶
type Permission struct { // An array of data actions that are allowed. DataActions []*string // An array of data actions that are denied. NotDataActions []*string }
Permission - The set of data plane operations permitted through this Role Definition.
func (Permission) MarshalJSON ¶
func (p Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Permission.
func (*Permission) UnmarshalJSON ¶
func (p *Permission) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Permission.
type PrimaryAggregationType ¶
type PrimaryAggregationType string
PrimaryAggregationType - The primary aggregation type of the metric.
const ( PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" PrimaryAggregationTypeLast PrimaryAggregationType = "Last" PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" PrimaryAggregationTypeNone PrimaryAggregationType = "None" PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" )
func PossiblePrimaryAggregationTypeValues ¶
func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType
PossiblePrimaryAggregationTypeValues returns the possible values for the PrimaryAggregationType const type.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - A private endpoint connection
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections Value []*PrivateEndpointConnection }
PrivateEndpointConnectionListResult - A list of private endpoint connections
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Group id of the private endpoint. GroupID *string // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty // Connection State of the Private Endpoint Connection. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty // Provisioning state of the private endpoint. ProvisioningState *string }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", "privateEndpointConnectionName", armcosmos.PrivateEndpointConnection{ Properties: &armcosmos.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr("Approved"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armcosmos.PrivateEndpointConnection{ // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // GroupID: to.Ptr("Sql"), // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "rg1", "ddb1", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg1", "ddb1", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armcosmos.PrivateEndpointConnection{ // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // GroupID: to.Ptr("Sql"), // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) NewListByDatabaseAccountPager ¶
func (client *PrivateEndpointConnectionsClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, options *PrivateEndpointConnectionsClientListByDatabaseAccountOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByDatabaseAccountResponse]
NewListByDatabaseAccountPager - List all private endpoint connections on a Cosmos DB account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - PrivateEndpointConnectionsClientListByDatabaseAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateEndpointConnectionListGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResult = armcosmos.PrivateEndpointConnectionListResult{ // Value: []*armcosmos.PrivateEndpointConnection{ // { // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // GroupID: to.Ptr("Sql"), // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }, // { // Name: to.Ptr("privateEndpointConnectionName"), // Type: to.Ptr("Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName2"), // Properties: &armcosmos.PrivateEndpointConnectionProperties{ // GroupID: to.Ptr("Sql"), // PrivateEndpoint: &armcosmos.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2"), // }, // PrivateLinkServiceConnectionState: &armcosmos.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶
type PrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByDatabaseAccountOptions ¶
type PrivateEndpointConnectionsClientListByDatabaseAccountOptions struct { }
PrivateEndpointConnectionsClientListByDatabaseAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager method.
type PrivateEndpointConnectionsClientListByDatabaseAccountResponse ¶
type PrivateEndpointConnectionsClientListByDatabaseAccountResponse struct { // A list of private endpoint connections PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListByDatabaseAccountResponse contains the response from method PrivateEndpointConnectionsClient.NewListByDatabaseAccountPager.
type PrivateEndpointProperty ¶
type PrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string }
PrivateEndpointProperty - Private endpoint which the connection belongs to.
func (PrivateEndpointProperty) MarshalJSON ¶
func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.
func (*PrivateEndpointProperty) UnmarshalJSON ¶
func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string // READ-ONLY; The private link resource required zone names. RequiredZoneNames []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) Get ¶
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, accountName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Gets the private link resources that need to be created for a Cosmos DB account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- groupName - The name of the private link resource.
- options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateLinkResourceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "rg1", "ddb1", "sql", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResource = armcosmos.PrivateLinkResource{ // Name: to.Ptr("sql"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql"), // Properties: &armcosmos.PrivateLinkResourceProperties{ // GroupID: to.Ptr("sql"), // RequiredMembers: []*string{ // to.Ptr("ddb1"), // to.Ptr("ddb1-westus")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.documents.azure.net")}, // }, // }
Output:
func (*PrivateLinkResourcesClient) NewListByDatabaseAccountPager ¶
func (client *PrivateLinkResourcesClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, options *PrivateLinkResourcesClientListByDatabaseAccountOptions) *runtime.Pager[PrivateLinkResourcesClientListByDatabaseAccountResponse]
NewListByDatabaseAccountPager - Gets the private link resources that need to be created for a Cosmos DB account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - PrivateLinkResourcesClientListByDatabaseAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByDatabaseAccountPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBPrivateLinkResourceListGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armcosmos.PrivateLinkResourceListResult{ // Value: []*armcosmos.PrivateLinkResource{ // { // Name: to.Ptr("sql"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql"), // Properties: &armcosmos.PrivateLinkResourceProperties{ // GroupID: to.Ptr("sql"), // RequiredMembers: []*string{ // to.Ptr("ddb1"), // to.Ptr("ddb1-westus")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.documents.azure.net")}, // }, // }}, // } }
Output:
type PrivateLinkResourcesClientGetOptions ¶
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶
type PrivateLinkResourcesClientGetResponse struct { // A private link resource PrivateLinkResource }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByDatabaseAccountOptions ¶
type PrivateLinkResourcesClientListByDatabaseAccountOptions struct { }
PrivateLinkResourcesClientListByDatabaseAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByDatabaseAccountPager method.
type PrivateLinkResourcesClientListByDatabaseAccountResponse ¶
type PrivateLinkResourcesClientListByDatabaseAccountResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByDatabaseAccountResponse contains the response from method PrivateLinkResourcesClient.NewListByDatabaseAccountPager.
type PrivateLinkServiceConnectionStateProperty ¶
type PrivateLinkServiceConnectionStateProperty struct { // The private link service connection description. Description *string // The private link service connection status. Status *string // READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect) ActionsRequired *string }
PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection.
func (PrivateLinkServiceConnectionStateProperty) MarshalJSON ¶
func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.
func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶
func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty.
type Privilege ¶ added in v2.1.0
type Privilege struct { // An array of actions that are allowed. Actions []*string // An Azure Cosmos DB Mongo DB Resource. Resource *PrivilegeResource }
Privilege - The set of data plane operations permitted through this Role Definition.
func (Privilege) MarshalJSON ¶ added in v2.1.0
MarshalJSON implements the json.Marshaller interface for type Privilege.
func (*Privilege) UnmarshalJSON ¶ added in v2.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Privilege.
type PrivilegeResource ¶ added in v2.1.0
type PrivilegeResource struct { // The collection name the role is applied. Collection *string // The database name the role is applied. Db *string }
PrivilegeResource - An Azure Cosmos DB Mongo DB Resource.
func (PrivilegeResource) MarshalJSON ¶ added in v2.1.0
func (p PrivilegeResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivilegeResource.
func (*PrivilegeResource) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivilegeResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivilegeResource.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Whether requests from Public Network are allowed
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" )
func PossiblePublicNetworkAccessValues ¶
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type RegionForOnlineOffline ¶
type RegionForOnlineOffline struct { // REQUIRED; Cosmos DB region, with spaces between words and each word capitalized. Region *string }
RegionForOnlineOffline - Cosmos DB region to online or offline.
func (RegionForOnlineOffline) MarshalJSON ¶
func (r RegionForOnlineOffline) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegionForOnlineOffline.
func (*RegionForOnlineOffline) UnmarshalJSON ¶
func (r *RegionForOnlineOffline) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegionForOnlineOffline.
type RegionalServiceResource ¶
type RegionalServiceResource struct { // READ-ONLY; The location name. Location *string // READ-ONLY; The regional service name. Name *string // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
RegionalServiceResource - Resource for a regional service location.
func (RegionalServiceResource) MarshalJSON ¶
func (r RegionalServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegionalServiceResource.
func (*RegionalServiceResource) UnmarshalJSON ¶
func (r *RegionalServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegionalServiceResource.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - 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.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned,UserAssigned" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type ResourceRestoreParameters ¶ added in v2.7.0
type ResourceRestoreParameters struct { // The id of the restorable database account from which the restore has to be initiated. For example: // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} RestoreSource *string // Time to which the account has to be restored (ISO-8601 format). RestoreTimestampInUTC *time.Time }
ResourceRestoreParameters - Parameters to indicate the information about the restore.
func (ResourceRestoreParameters) MarshalJSON ¶ added in v2.7.0
func (r ResourceRestoreParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceRestoreParameters.
func (*ResourceRestoreParameters) UnmarshalJSON ¶ added in v2.7.0
func (r *ResourceRestoreParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRestoreParameters.
type RestorableDatabaseAccountGetResult ¶
type RestorableDatabaseAccountGetResult struct { // The location of the resource group to which the resource belongs. Location *string // The properties of a restorable database account. Properties *RestorableDatabaseAccountProperties // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableDatabaseAccountGetResult - A Azure Cosmos DB restorable database account.
func (RestorableDatabaseAccountGetResult) MarshalJSON ¶
func (r RestorableDatabaseAccountGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDatabaseAccountGetResult.
func (*RestorableDatabaseAccountGetResult) UnmarshalJSON ¶
func (r *RestorableDatabaseAccountGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDatabaseAccountGetResult.
type RestorableDatabaseAccountProperties ¶
type RestorableDatabaseAccountProperties struct { // The name of the global database account AccountName *string // The creation time of the restorable database account (ISO-8601 format). CreationTime *time.Time // The time at which the restorable database account has been deleted (ISO-8601 format). DeletionTime *time.Time // The least recent time at which the database account can be restored to (ISO-8601 format). OldestRestorableTime *time.Time // READ-ONLY; The API type of the restorable database account. APIType *APIType // READ-ONLY; List of regions where the of the database account can be restored from. RestorableLocations []*RestorableLocationResource }
RestorableDatabaseAccountProperties - The properties of a restorable database account.
func (RestorableDatabaseAccountProperties) MarshalJSON ¶
func (r RestorableDatabaseAccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDatabaseAccountProperties.
func (*RestorableDatabaseAccountProperties) UnmarshalJSON ¶
func (r *RestorableDatabaseAccountProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDatabaseAccountProperties.
type RestorableDatabaseAccountsClient ¶
type RestorableDatabaseAccountsClient struct {
// contains filtered or unexported fields
}
RestorableDatabaseAccountsClient contains the methods for the RestorableDatabaseAccounts group. Don't use this type directly, use NewRestorableDatabaseAccountsClient() instead.
func NewRestorableDatabaseAccountsClient ¶
func NewRestorableDatabaseAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDatabaseAccountsClient, error)
NewRestorableDatabaseAccountsClient creates a new instance of RestorableDatabaseAccountsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableDatabaseAccountsClient) GetByLocation ¶
func (client *RestorableDatabaseAccountsClient) GetByLocation(ctx context.Context, location string, instanceID string, options *RestorableDatabaseAccountsClientGetByLocationOptions) (RestorableDatabaseAccountsClientGetByLocationResponse, error)
GetByLocation - Retrieves the properties of an existing Azure Cosmos DB restorable database account. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' permission. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableDatabaseAccountsClientGetByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.GetByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableDatabaseAccountGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRestorableDatabaseAccountsClient().GetByLocation(ctx, "West US", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorableDatabaseAccountGetResult = armcosmos.RestorableDatabaseAccountGetResult{ // Name: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Location: to.Ptr("West US"), // Properties: &armcosmos.RestorableDatabaseAccountProperties{ // AccountName: to.Ptr("ddb1"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-01T22:05:09.000Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:35.000Z"); return t}()), // LocationName: to.Ptr("South Central US"), // RegionalDatabaseAccountInstanceID: to.Ptr("d7a01f78-606f-45c6-9dac-0df32f433bb5"), // }, // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // LocationName: to.Ptr("West US"), // RegionalDatabaseAccountInstanceID: to.Ptr("fdb43d84-1572-4697-b6e7-2bcda0c51b2c"), // }}, // }, // }
Output:
func (*RestorableDatabaseAccountsClient) NewListByLocationPager ¶
func (client *RestorableDatabaseAccountsClient) NewListByLocationPager(location string, options *RestorableDatabaseAccountsClientListByLocationOptions) *runtime.Pager[RestorableDatabaseAccountsClientListByLocationResponse]
NewListByLocationPager - Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- options - RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableDatabaseAccountList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableDatabaseAccountsClient().NewListByLocationPager("West US", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableDatabaseAccountsListResult = armcosmos.RestorableDatabaseAccountsListResult{ // Value: []*armcosmos.RestorableDatabaseAccountGetResult{ // { // Name: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Location: to.Ptr("West US"), // Properties: &armcosmos.RestorableDatabaseAccountProperties{ // AccountName: to.Ptr("ddb1"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:35.000Z"); return t}()), // LocationName: to.Ptr("South Central US"), // RegionalDatabaseAccountInstanceID: to.Ptr("d7a01f78-606f-45c6-9dac-0df32f433bb5"), // }, // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // LocationName: to.Ptr("West US"), // RegionalDatabaseAccountInstanceID: to.Ptr("fdb43d84-1572-4697-b6e7-2bcda0c51b2c"), // }}, // }, // }, // { // Name: to.Ptr("4f9e6ace-ac7a-446c-98bc-194c502a06b4"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/4f9e6ace-ac7a-446c-98bc-194c502a06b4"), // Location: to.Ptr("West US"), // Properties: &armcosmos.RestorableDatabaseAccountProperties{ // AccountName: to.Ptr("ddb2"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18.000Z"); return t}()), // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18.000Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:35.000Z"); return t}()), // LocationName: to.Ptr("South Central US"), // RegionalDatabaseAccountInstanceID: to.Ptr("d7a01f78-606f-45c6-9dac-0df32f433bb5"), // }, // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // LocationName: to.Ptr("West US"), // RegionalDatabaseAccountInstanceID: to.Ptr("fdb43d84-1572-4697-b6e7-2bcda0c51b2c"), // }}, // }, // }}, // } }
Output:
func (*RestorableDatabaseAccountsClient) NewListPager ¶
func (client *RestorableDatabaseAccountsClient) NewListPager(options *RestorableDatabaseAccountsClientListOptions) *runtime.Pager[RestorableDatabaseAccountsClientListResponse]
NewListPager - Lists all the restorable Azure Cosmos DB database accounts available under the subscription. This call requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' permission.
Generated from API version 2023-11-15
- options - RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableDatabaseAccountsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableDatabaseAccountsListResult = armcosmos.RestorableDatabaseAccountsListResult{ // Value: []*armcosmos.RestorableDatabaseAccountGetResult{ // { // Name: to.Ptr("d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d"), // Location: to.Ptr("West US"), // Properties: &armcosmos.RestorableDatabaseAccountProperties{ // AccountName: to.Ptr("ddb1"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-11T21:56:15.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-12T22:05:09.000Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:35.000Z"); return t}()), // LocationName: to.Ptr("South Central US"), // RegionalDatabaseAccountInstanceID: to.Ptr("d7a01f78-606f-45c6-9dac-0df32f433bb5"), // }, // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // LocationName: to.Ptr("West US"), // RegionalDatabaseAccountInstanceID: to.Ptr("fdb43d84-1572-4697-b6e7-2bcda0c51b2c"), // }}, // }, // }, // { // Name: to.Ptr("4f9e6ace-ac7a-446c-98bc-194c502a06b4"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDB/locations/West US/restorableDatabaseAccounts/4f9e6ace-ac7a-446c-98bc-194c502a06b4"), // Location: to.Ptr("East US"), // Properties: &armcosmos.RestorableDatabaseAccountProperties{ // AccountName: to.Ptr("ddb2"), // APIType: to.Ptr(armcosmos.APITypeSQL), // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18.000Z"); return t}()), // OldestRestorableTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T08:05:18.000Z"); return t}()), // RestorableLocations: []*armcosmos.RestorableLocationResource{ // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:35.000Z"); return t}()), // LocationName: to.Ptr("South Central US"), // RegionalDatabaseAccountInstanceID: to.Ptr("d7a01f78-606f-45c6-9dac-0df32f433bb5"), // }, // { // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-30T21:13:10.000Z"); return t}()), // LocationName: to.Ptr("West US"), // RegionalDatabaseAccountInstanceID: to.Ptr("fdb43d84-1572-4697-b6e7-2bcda0c51b2c"), // }}, // }, // }}, // } }
Output:
type RestorableDatabaseAccountsClientGetByLocationOptions ¶
type RestorableDatabaseAccountsClientGetByLocationOptions struct { }
RestorableDatabaseAccountsClientGetByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.GetByLocation method.
type RestorableDatabaseAccountsClientGetByLocationResponse ¶
type RestorableDatabaseAccountsClientGetByLocationResponse struct { // A Azure Cosmos DB restorable database account. RestorableDatabaseAccountGetResult }
RestorableDatabaseAccountsClientGetByLocationResponse contains the response from method RestorableDatabaseAccountsClient.GetByLocation.
type RestorableDatabaseAccountsClientListByLocationOptions ¶
type RestorableDatabaseAccountsClientListByLocationOptions struct { }
RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListByLocationPager method.
type RestorableDatabaseAccountsClientListByLocationResponse ¶
type RestorableDatabaseAccountsClientListByLocationResponse struct { // The List operation response, that contains the restorable database accounts and their properties. RestorableDatabaseAccountsListResult }
RestorableDatabaseAccountsClientListByLocationResponse contains the response from method RestorableDatabaseAccountsClient.NewListByLocationPager.
type RestorableDatabaseAccountsClientListOptions ¶
type RestorableDatabaseAccountsClientListOptions struct { }
RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.NewListPager method.
type RestorableDatabaseAccountsClientListResponse ¶
type RestorableDatabaseAccountsClientListResponse struct { // The List operation response, that contains the restorable database accounts and their properties. RestorableDatabaseAccountsListResult }
RestorableDatabaseAccountsClientListResponse contains the response from method RestorableDatabaseAccountsClient.NewListPager.
type RestorableDatabaseAccountsListResult ¶
type RestorableDatabaseAccountsListResult struct { // READ-ONLY; List of restorable database accounts and their properties. Value []*RestorableDatabaseAccountGetResult }
RestorableDatabaseAccountsListResult - The List operation response, that contains the restorable database accounts and their properties.
func (RestorableDatabaseAccountsListResult) MarshalJSON ¶
func (r RestorableDatabaseAccountsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDatabaseAccountsListResult.
func (*RestorableDatabaseAccountsListResult) UnmarshalJSON ¶
func (r *RestorableDatabaseAccountsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDatabaseAccountsListResult.
type RestorableGremlinDatabaseGetResult ¶ added in v2.2.0
type RestorableGremlinDatabaseGetResult struct { // The properties of a Gremlin database event. Properties *RestorableGremlinDatabaseProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableGremlinDatabaseGetResult - An Azure Cosmos DB Gremlin database event
func (RestorableGremlinDatabaseGetResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinDatabaseGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinDatabaseGetResult.
func (*RestorableGremlinDatabaseGetResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinDatabaseGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinDatabaseGetResult.
type RestorableGremlinDatabaseProperties ¶ added in v2.2.0
type RestorableGremlinDatabaseProperties struct { // The resource of an Azure Cosmos DB Gremlin database event Resource *RestorableGremlinDatabasePropertiesResource }
RestorableGremlinDatabaseProperties - The properties of an Azure Cosmos DB Gremlin database event
func (RestorableGremlinDatabaseProperties) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinDatabaseProperties.
func (*RestorableGremlinDatabaseProperties) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinDatabaseProperties.
type RestorableGremlinDatabasePropertiesResource ¶ added in v2.2.0
type RestorableGremlinDatabasePropertiesResource struct { // READ-ONLY; A state of this database to identify if this database is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this database can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this database event happened. EventTimestamp *string // READ-ONLY; The operation type of this database event. OperationType *OperationType // READ-ONLY; The name of this Gremlin database. OwnerID *string // READ-ONLY; The resource ID of this Gremlin database. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableGremlinDatabasePropertiesResource - The resource of an Azure Cosmos DB Gremlin database event
func (RestorableGremlinDatabasePropertiesResource) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinDatabasePropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinDatabasePropertiesResource.
func (*RestorableGremlinDatabasePropertiesResource) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinDatabasePropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinDatabasePropertiesResource.
type RestorableGremlinDatabasesClient ¶ added in v2.2.0
type RestorableGremlinDatabasesClient struct {
// contains filtered or unexported fields
}
RestorableGremlinDatabasesClient contains the methods for the RestorableGremlinDatabases group. Don't use this type directly, use NewRestorableGremlinDatabasesClient() instead.
func NewRestorableGremlinDatabasesClient ¶ added in v2.2.0
func NewRestorableGremlinDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinDatabasesClient, error)
NewRestorableGremlinDatabasesClient creates a new instance of RestorableGremlinDatabasesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableGremlinDatabasesClient) NewListPager ¶ added in v2.2.0
func (client *RestorableGremlinDatabasesClient) NewListPager(location string, instanceID string, options *RestorableGremlinDatabasesClientListOptions) *runtime.Pager[RestorableGremlinDatabasesClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableGremlinDatabasesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableGremlinDatabasesListResult = armcosmos.RestorableGremlinDatabasesListResult{ // Value: []*armcosmos.RestorableGremlinDatabaseGetResult{ // { // Name: to.Ptr("59c21367-b98b-4a8e-abb7-b6f46600decc"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableGremlinDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc"), // Properties: &armcosmos.RestorableGremlinDatabaseProperties{ // Resource: &armcosmos.RestorableGremlinDatabasePropertiesResource{ // Rid: to.Ptr("DLB14gAAAA=="), // CanUndelete: to.Ptr("invalid"), // EventTimestamp: to.Ptr("2020-09-02T19:45:03Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("PD5DALigDgw="), // }, // }, // }, // { // Name: to.Ptr("8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Properties: &armcosmos.RestorableGremlinDatabaseProperties{ // Resource: &armcosmos.RestorableGremlinDatabasePropertiesResource{ // Rid: to.Ptr("ESXNLAAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Database already exists. Only deleted resources can be restored within same account."), // EventTimestamp: to.Ptr("2020-09-02T19:53:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("PD5DALigDgw="), // }, // }, // }}, // } }
Output:
type RestorableGremlinDatabasesClientListOptions ¶ added in v2.2.0
type RestorableGremlinDatabasesClientListOptions struct { }
RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.NewListPager method.
type RestorableGremlinDatabasesClientListResponse ¶ added in v2.2.0
type RestorableGremlinDatabasesClientListResponse struct { // The List operation response, that contains the Gremlin database events and their properties. RestorableGremlinDatabasesListResult }
RestorableGremlinDatabasesClientListResponse contains the response from method RestorableGremlinDatabasesClient.NewListPager.
type RestorableGremlinDatabasesListResult ¶ added in v2.2.0
type RestorableGremlinDatabasesListResult struct { // READ-ONLY; List of Gremlin database events and their properties. Value []*RestorableGremlinDatabaseGetResult }
RestorableGremlinDatabasesListResult - The List operation response, that contains the Gremlin database events and their properties.
func (RestorableGremlinDatabasesListResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinDatabasesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinDatabasesListResult.
func (*RestorableGremlinDatabasesListResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinDatabasesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinDatabasesListResult.
type RestorableGremlinGraphGetResult ¶ added in v2.2.0
type RestorableGremlinGraphGetResult struct { // The properties of a Gremlin graph event. Properties *RestorableGremlinGraphProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableGremlinGraphGetResult - An Azure Cosmos DB Gremlin graph event
func (RestorableGremlinGraphGetResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinGraphGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinGraphGetResult.
func (*RestorableGremlinGraphGetResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinGraphGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinGraphGetResult.
type RestorableGremlinGraphProperties ¶ added in v2.2.0
type RestorableGremlinGraphProperties struct { // The resource of an Azure Cosmos DB Gremlin graph event Resource *RestorableGremlinGraphPropertiesResource }
RestorableGremlinGraphProperties - The properties of an Azure Cosmos DB Gremlin graph event
func (RestorableGremlinGraphProperties) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinGraphProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinGraphProperties.
func (*RestorableGremlinGraphProperties) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinGraphProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinGraphProperties.
type RestorableGremlinGraphPropertiesResource ¶ added in v2.2.0
type RestorableGremlinGraphPropertiesResource struct { // READ-ONLY; A state of this graph to identify if this graph is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this graph can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this graph event happened. EventTimestamp *string // READ-ONLY; The operation type of this graph event. OperationType *OperationType // READ-ONLY; The name of this Gremlin graph. OwnerID *string // READ-ONLY; The resource ID of this Gremlin graph. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableGremlinGraphPropertiesResource - The resource of an Azure Cosmos DB Gremlin graph event
func (RestorableGremlinGraphPropertiesResource) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinGraphPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinGraphPropertiesResource.
func (*RestorableGremlinGraphPropertiesResource) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinGraphPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinGraphPropertiesResource.
type RestorableGremlinGraphsClient ¶ added in v2.2.0
type RestorableGremlinGraphsClient struct {
// contains filtered or unexported fields
}
RestorableGremlinGraphsClient contains the methods for the RestorableGremlinGraphs group. Don't use this type directly, use NewRestorableGremlinGraphsClient() instead.
func NewRestorableGremlinGraphsClient ¶ added in v2.2.0
func NewRestorableGremlinGraphsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinGraphsClient, error)
NewRestorableGremlinGraphsClient creates a new instance of RestorableGremlinGraphsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableGremlinGraphsClient) NewListPager ¶ added in v2.2.0
func (client *RestorableGremlinGraphsClient) NewListPager(location string, instanceID string, options *RestorableGremlinGraphsClientListOptions) *runtime.Pager[RestorableGremlinGraphsClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinGraphList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableGremlinGraphsClient().NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableGremlinGraphsClientListOptions{RestorableGremlinDatabaseRid: to.Ptr("PD5DALigDgw="), StartTime: nil, EndTime: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableGremlinGraphsListResult = armcosmos.RestorableGremlinGraphsListResult{ // Value: []*armcosmos.RestorableGremlinGraphGetResult{ // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGraphs"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableGraphs/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableGremlinGraphProperties{ // Resource: &armcosmos.RestorableGremlinGraphPropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("invalid"), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Graph1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }, // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGraphs"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableGraphs/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableGremlinGraphProperties{ // Resource: &armcosmos.RestorableGremlinGraphPropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Individual shared database collections restore is not supported. Please restore shared database to restore its collections that share the throughput."), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Graph1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }}, // } }
Output:
type RestorableGremlinGraphsClientListOptions ¶ added in v2.2.0
type RestorableGremlinGraphsClientListOptions struct { // Restorable Gremlin graphs event feed end time. EndTime *string // The resource ID of the Gremlin database. RestorableGremlinDatabaseRid *string // Restorable Gremlin graphs event feed start time. StartTime *string }
RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.NewListPager method.
type RestorableGremlinGraphsClientListResponse ¶ added in v2.2.0
type RestorableGremlinGraphsClientListResponse struct { // The List operation response, that contains the Gremlin graph events and their properties. RestorableGremlinGraphsListResult }
RestorableGremlinGraphsClientListResponse contains the response from method RestorableGremlinGraphsClient.NewListPager.
type RestorableGremlinGraphsListResult ¶ added in v2.2.0
type RestorableGremlinGraphsListResult struct { // READ-ONLY; List of Gremlin graph events and their properties. Value []*RestorableGremlinGraphGetResult }
RestorableGremlinGraphsListResult - The List operation response, that contains the Gremlin graph events and their properties.
func (RestorableGremlinGraphsListResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinGraphsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinGraphsListResult.
func (*RestorableGremlinGraphsListResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinGraphsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinGraphsListResult.
type RestorableGremlinResourcesClient ¶ added in v2.2.0
type RestorableGremlinResourcesClient struct {
// contains filtered or unexported fields
}
RestorableGremlinResourcesClient contains the methods for the RestorableGremlinResources group. Don't use this type directly, use NewRestorableGremlinResourcesClient() instead.
func NewRestorableGremlinResourcesClient ¶ added in v2.2.0
func NewRestorableGremlinResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinResourcesClient, error)
NewRestorableGremlinResourcesClient creates a new instance of RestorableGremlinResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableGremlinResourcesClient) NewListPager ¶ added in v2.2.0
func (client *RestorableGremlinResourcesClient) NewListPager(location string, instanceID string, options *RestorableGremlinResourcesClientListOptions) *runtime.Pager[RestorableGremlinResourcesClientListResponse]
NewListPager - Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinResourceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableGremlinResourcesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableGremlinResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("06/01/2022 4:56"), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableGremlinResourcesListResult = armcosmos.RestorableGremlinResourcesListResult{ // Value: []*armcosmos.RestorableGremlinResourcesGetResult{ // { // Name: to.Ptr("Database1"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"), // DatabaseName: to.Ptr("Database1"), // GraphNames: []*string{ // to.Ptr("Graph1")}, // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database1"), // }, // { // Name: to.Ptr("Database2"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"), // DatabaseName: to.Ptr("Database2"), // GraphNames: []*string{ // to.Ptr("Graph1"), // to.Ptr("Graph2")}, // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database2"), // }, // { // Name: to.Ptr("Database3"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"), // DatabaseName: to.Ptr("Database3"), // GraphNames: []*string{ // }, // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database3"), // }}, // } }
Output:
type RestorableGremlinResourcesClientListOptions ¶ added in v2.2.0
type RestorableGremlinResourcesClientListOptions struct { // The location where the restorable resources are located. RestoreLocation *string // The timestamp when the restorable resources existed. RestoreTimestampInUTC *string }
RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.NewListPager method.
type RestorableGremlinResourcesClientListResponse ¶ added in v2.2.0
type RestorableGremlinResourcesClientListResponse struct { // The List operation response, that contains the restorable Gremlin resources. RestorableGremlinResourcesListResult }
RestorableGremlinResourcesClientListResponse contains the response from method RestorableGremlinResourcesClient.NewListPager.
type RestorableGremlinResourcesGetResult ¶ added in v2.2.0
type RestorableGremlinResourcesGetResult struct { // The name of the gremlin database available for restore. DatabaseName *string // The names of the graphs available for restore. GraphNames []*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableGremlinResourcesGetResult - Specific Databases to restore.
func (RestorableGremlinResourcesGetResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinResourcesGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinResourcesGetResult.
func (*RestorableGremlinResourcesGetResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinResourcesGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinResourcesGetResult.
type RestorableGremlinResourcesListResult ¶ added in v2.2.0
type RestorableGremlinResourcesListResult struct { // READ-ONLY; List of restorable Gremlin resources, including the gremlin database and graph names. Value []*RestorableGremlinResourcesGetResult }
RestorableGremlinResourcesListResult - The List operation response, that contains the restorable Gremlin resources.
func (RestorableGremlinResourcesListResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableGremlinResourcesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableGremlinResourcesListResult.
func (*RestorableGremlinResourcesListResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableGremlinResourcesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableGremlinResourcesListResult.
type RestorableLocationResource ¶
type RestorableLocationResource struct { // READ-ONLY; The creation time of the regional restorable database account (ISO-8601 format). CreationTime *time.Time // READ-ONLY; The time at which the regional restorable database account has been deleted (ISO-8601 format). DeletionTime *time.Time // READ-ONLY; The location of the regional restorable account. LocationName *string // READ-ONLY; The instance id of the regional restorable account. RegionalDatabaseAccountInstanceID *string }
RestorableLocationResource - Properties of the regional restorable account.
func (RestorableLocationResource) MarshalJSON ¶
func (r RestorableLocationResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableLocationResource.
func (*RestorableLocationResource) UnmarshalJSON ¶
func (r *RestorableLocationResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableLocationResource.
type RestorableMongodbCollectionGetResult ¶
type RestorableMongodbCollectionGetResult struct { // The properties of a MongoDB collection event. Properties *RestorableMongodbCollectionProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableMongodbCollectionGetResult - An Azure Cosmos DB MongoDB collection event
func (RestorableMongodbCollectionGetResult) MarshalJSON ¶
func (r RestorableMongodbCollectionGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbCollectionGetResult.
func (*RestorableMongodbCollectionGetResult) UnmarshalJSON ¶
func (r *RestorableMongodbCollectionGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbCollectionGetResult.
type RestorableMongodbCollectionProperties ¶
type RestorableMongodbCollectionProperties struct { // The resource of an Azure Cosmos DB MongoDB collection event Resource *RestorableMongodbCollectionPropertiesResource }
RestorableMongodbCollectionProperties - The properties of an Azure Cosmos DB MongoDB collection event
func (RestorableMongodbCollectionProperties) MarshalJSON ¶
func (r RestorableMongodbCollectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbCollectionProperties.
func (*RestorableMongodbCollectionProperties) UnmarshalJSON ¶
func (r *RestorableMongodbCollectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbCollectionProperties.
type RestorableMongodbCollectionPropertiesResource ¶
type RestorableMongodbCollectionPropertiesResource struct { // READ-ONLY; A state of this collection to identify if this container is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this collection can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this collection event happened. EventTimestamp *string // READ-ONLY; The operation type of this collection event. OperationType *OperationType // READ-ONLY; The name of this MongoDB collection. OwnerID *string // READ-ONLY; The resource ID of this MongoDB collection. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableMongodbCollectionPropertiesResource - The resource of an Azure Cosmos DB MongoDB collection event
func (RestorableMongodbCollectionPropertiesResource) MarshalJSON ¶
func (r RestorableMongodbCollectionPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbCollectionPropertiesResource.
func (*RestorableMongodbCollectionPropertiesResource) UnmarshalJSON ¶
func (r *RestorableMongodbCollectionPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbCollectionPropertiesResource.
type RestorableMongodbCollectionsClient ¶
type RestorableMongodbCollectionsClient struct {
// contains filtered or unexported fields
}
RestorableMongodbCollectionsClient contains the methods for the RestorableMongodbCollections group. Don't use this type directly, use NewRestorableMongodbCollectionsClient() instead.
func NewRestorableMongodbCollectionsClient ¶
func NewRestorableMongodbCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbCollectionsClient, error)
NewRestorableMongodbCollectionsClient creates a new instance of RestorableMongodbCollectionsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableMongodbCollectionsClient) NewListPager ¶
func (client *RestorableMongodbCollectionsClient) NewListPager(location string, instanceID string, options *RestorableMongodbCollectionsClientListOptions) *runtime.Pager[RestorableMongodbCollectionsClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableMongodbCollectionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableMongodbCollectionsClient().NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableMongodbCollectionsClientListOptions{RestorableMongodbDatabaseRid: to.Ptr("PD5DALigDgw="), StartTime: nil, EndTime: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableMongodbCollectionsListResult = armcosmos.RestorableMongodbCollectionsListResult{ // Value: []*armcosmos.RestorableMongodbCollectionGetResult{ // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbCollections"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableMongodbCollections/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableMongodbCollectionProperties{ // Resource: &armcosmos.RestorableMongodbCollectionPropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("invalid"), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Collection1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }, // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbCollections"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableMongodbCollections/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableMongodbCollectionProperties{ // Resource: &armcosmos.RestorableMongodbCollectionPropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Individual shared database collections restore is not supported. Please restore shared database to restore its collections that share the throughput."), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Collection1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }}, // } }
Output:
type RestorableMongodbCollectionsClientListOptions ¶
type RestorableMongodbCollectionsClientListOptions struct { // Restorable MongoDB collections event feed end time. EndTime *string // The resource ID of the MongoDB database. RestorableMongodbDatabaseRid *string // Restorable MongoDB collections event feed start time. StartTime *string }
RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.NewListPager method.
type RestorableMongodbCollectionsClientListResponse ¶
type RestorableMongodbCollectionsClientListResponse struct { // The List operation response, that contains the MongoDB collection events and their properties. RestorableMongodbCollectionsListResult }
RestorableMongodbCollectionsClientListResponse contains the response from method RestorableMongodbCollectionsClient.NewListPager.
type RestorableMongodbCollectionsListResult ¶
type RestorableMongodbCollectionsListResult struct { // READ-ONLY; List of MongoDB collection events and their properties. Value []*RestorableMongodbCollectionGetResult }
RestorableMongodbCollectionsListResult - The List operation response, that contains the MongoDB collection events and their properties.
func (RestorableMongodbCollectionsListResult) MarshalJSON ¶
func (r RestorableMongodbCollectionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbCollectionsListResult.
func (*RestorableMongodbCollectionsListResult) UnmarshalJSON ¶
func (r *RestorableMongodbCollectionsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbCollectionsListResult.
type RestorableMongodbDatabaseGetResult ¶
type RestorableMongodbDatabaseGetResult struct { // The properties of a MongoDB database event. Properties *RestorableMongodbDatabaseProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableMongodbDatabaseGetResult - An Azure Cosmos DB MongoDB database event
func (RestorableMongodbDatabaseGetResult) MarshalJSON ¶
func (r RestorableMongodbDatabaseGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbDatabaseGetResult.
func (*RestorableMongodbDatabaseGetResult) UnmarshalJSON ¶
func (r *RestorableMongodbDatabaseGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbDatabaseGetResult.
type RestorableMongodbDatabaseProperties ¶
type RestorableMongodbDatabaseProperties struct { // The resource of an Azure Cosmos DB MongoDB database event Resource *RestorableMongodbDatabasePropertiesResource }
RestorableMongodbDatabaseProperties - The properties of an Azure Cosmos DB MongoDB database event
func (RestorableMongodbDatabaseProperties) MarshalJSON ¶
func (r RestorableMongodbDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbDatabaseProperties.
func (*RestorableMongodbDatabaseProperties) UnmarshalJSON ¶
func (r *RestorableMongodbDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbDatabaseProperties.
type RestorableMongodbDatabasePropertiesResource ¶
type RestorableMongodbDatabasePropertiesResource struct { // READ-ONLY; A state of this database to identify if this database is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this database can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this database event happened. EventTimestamp *string // READ-ONLY; The operation type of this database event. OperationType *OperationType // READ-ONLY; The name of this MongoDB database. OwnerID *string // READ-ONLY; The resource ID of this MongoDB database. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableMongodbDatabasePropertiesResource - The resource of an Azure Cosmos DB MongoDB database event
func (RestorableMongodbDatabasePropertiesResource) MarshalJSON ¶
func (r RestorableMongodbDatabasePropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbDatabasePropertiesResource.
func (*RestorableMongodbDatabasePropertiesResource) UnmarshalJSON ¶
func (r *RestorableMongodbDatabasePropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbDatabasePropertiesResource.
type RestorableMongodbDatabasesClient ¶
type RestorableMongodbDatabasesClient struct {
// contains filtered or unexported fields
}
RestorableMongodbDatabasesClient contains the methods for the RestorableMongodbDatabases group. Don't use this type directly, use NewRestorableMongodbDatabasesClient() instead.
func NewRestorableMongodbDatabasesClient ¶
func NewRestorableMongodbDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbDatabasesClient, error)
NewRestorableMongodbDatabasesClient creates a new instance of RestorableMongodbDatabasesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableMongodbDatabasesClient) NewListPager ¶
func (client *RestorableMongodbDatabasesClient) NewListPager(location string, instanceID string, options *RestorableMongodbDatabasesClientListOptions) *runtime.Pager[RestorableMongodbDatabasesClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableMongodbDatabasesClientListOptions contains the optional parameters for the RestorableMongodbDatabasesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableMongodbDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableMongodbDatabasesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableMongodbDatabasesListResult = armcosmos.RestorableMongodbDatabasesListResult{ // Value: []*armcosmos.RestorableMongodbDatabaseGetResult{ // { // Name: to.Ptr("59c21367-b98b-4a8e-abb7-b6f46600decc"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc"), // Properties: &armcosmos.RestorableMongodbDatabaseProperties{ // Resource: &armcosmos.RestorableMongodbDatabasePropertiesResource{ // Rid: to.Ptr("DLB14gAAAA=="), // CanUndelete: to.Ptr("invalid"), // EventTimestamp: to.Ptr("2020-09-02T19:45:03Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("PD5DALigDgw="), // }, // }, // }, // { // Name: to.Ptr("8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Properties: &armcosmos.RestorableMongodbDatabaseProperties{ // Resource: &armcosmos.RestorableMongodbDatabasePropertiesResource{ // Rid: to.Ptr("ESXNLAAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Database already exists. Only deleted resources can be restored within same account."), // EventTimestamp: to.Ptr("2020-09-02T19:53:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("PD5DALigDgw="), // }, // }, // }}, // } }
Output:
type RestorableMongodbDatabasesClientListOptions ¶
type RestorableMongodbDatabasesClientListOptions struct { }
RestorableMongodbDatabasesClientListOptions contains the optional parameters for the RestorableMongodbDatabasesClient.NewListPager method.
type RestorableMongodbDatabasesClientListResponse ¶
type RestorableMongodbDatabasesClientListResponse struct { // The List operation response, that contains the MongoDB database events and their properties. RestorableMongodbDatabasesListResult }
RestorableMongodbDatabasesClientListResponse contains the response from method RestorableMongodbDatabasesClient.NewListPager.
type RestorableMongodbDatabasesListResult ¶
type RestorableMongodbDatabasesListResult struct { // READ-ONLY; List of MongoDB database events and their properties. Value []*RestorableMongodbDatabaseGetResult }
RestorableMongodbDatabasesListResult - The List operation response, that contains the MongoDB database events and their properties.
func (RestorableMongodbDatabasesListResult) MarshalJSON ¶
func (r RestorableMongodbDatabasesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbDatabasesListResult.
func (*RestorableMongodbDatabasesListResult) UnmarshalJSON ¶
func (r *RestorableMongodbDatabasesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbDatabasesListResult.
type RestorableMongodbResourcesClient ¶
type RestorableMongodbResourcesClient struct {
// contains filtered or unexported fields
}
RestorableMongodbResourcesClient contains the methods for the RestorableMongodbResources group. Don't use this type directly, use NewRestorableMongodbResourcesClient() instead.
func NewRestorableMongodbResourcesClient ¶
func NewRestorableMongodbResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableMongodbResourcesClient, error)
NewRestorableMongodbResourcesClient creates a new instance of RestorableMongodbResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableMongodbResourcesClient) NewListPager ¶
func (client *RestorableMongodbResourcesClient) NewListPager(location string, instanceID string, options *RestorableMongodbResourcesClientListOptions) *runtime.Pager[RestorableMongodbResourcesClientListResponse]
NewListPager - Return a list of database and collection combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableMongodbResourcesClientListOptions contains the optional parameters for the RestorableMongodbResourcesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableMongodbResourceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableMongodbResourcesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableMongodbResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("06/01/2022 4:56"), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableMongodbResourcesListResult = armcosmos.RestorableMongodbResourcesListResult{ // Value: []*armcosmos.RestorableMongodbResourcesGetResult{ // { // Name: to.Ptr("Database1"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablemongodbresources"), // CollectionNames: []*string{ // to.Ptr("Collection1")}, // DatabaseName: to.Ptr("Database1"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablemongodbresources/Database1"), // }, // { // Name: to.Ptr("Database2"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablemongodbresources"), // CollectionNames: []*string{ // to.Ptr("Collection1"), // to.Ptr("Collection2")}, // DatabaseName: to.Ptr("Database2"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablemongodbresources/Database2"), // }, // { // Name: to.Ptr("Database3"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablemongodbresources"), // CollectionNames: []*string{ // }, // DatabaseName: to.Ptr("Database3"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablemongodbresources/Database3"), // }}, // } }
Output:
type RestorableMongodbResourcesClientListOptions ¶
type RestorableMongodbResourcesClientListOptions struct { // The location where the restorable resources are located. RestoreLocation *string // The timestamp when the restorable resources existed. RestoreTimestampInUTC *string }
RestorableMongodbResourcesClientListOptions contains the optional parameters for the RestorableMongodbResourcesClient.NewListPager method.
type RestorableMongodbResourcesClientListResponse ¶
type RestorableMongodbResourcesClientListResponse struct { // The List operation response, that contains the restorable MongoDB resources. RestorableMongodbResourcesListResult }
RestorableMongodbResourcesClientListResponse contains the response from method RestorableMongodbResourcesClient.NewListPager.
type RestorableMongodbResourcesGetResult ¶
type RestorableMongodbResourcesGetResult struct { // The names of the collections available for restore. CollectionNames []*string // The name of the database available for restore. DatabaseName *string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableMongodbResourcesGetResult - Specific Databases to restore.
func (RestorableMongodbResourcesGetResult) MarshalJSON ¶
func (r RestorableMongodbResourcesGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbResourcesGetResult.
func (*RestorableMongodbResourcesGetResult) UnmarshalJSON ¶
func (r *RestorableMongodbResourcesGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbResourcesGetResult.
type RestorableMongodbResourcesListResult ¶
type RestorableMongodbResourcesListResult struct { // READ-ONLY; List of restorable MongoDB resources, including the database and collection names. Value []*RestorableMongodbResourcesGetResult }
RestorableMongodbResourcesListResult - The List operation response, that contains the restorable MongoDB resources.
func (RestorableMongodbResourcesListResult) MarshalJSON ¶
func (r RestorableMongodbResourcesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableMongodbResourcesListResult.
func (*RestorableMongodbResourcesListResult) UnmarshalJSON ¶
func (r *RestorableMongodbResourcesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableMongodbResourcesListResult.
type RestorableSQLContainerGetResult ¶
type RestorableSQLContainerGetResult struct { // The properties of a SQL container event. Properties *RestorableSQLContainerProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableSQLContainerGetResult - An Azure Cosmos DB SQL container event
func (RestorableSQLContainerGetResult) MarshalJSON ¶
func (r RestorableSQLContainerGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLContainerGetResult.
func (*RestorableSQLContainerGetResult) UnmarshalJSON ¶
func (r *RestorableSQLContainerGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLContainerGetResult.
type RestorableSQLContainerProperties ¶
type RestorableSQLContainerProperties struct { // The resource of an Azure Cosmos DB SQL container event Resource *RestorableSQLContainerPropertiesResource }
RestorableSQLContainerProperties - The properties of an Azure Cosmos DB SQL container event
func (RestorableSQLContainerProperties) MarshalJSON ¶
func (r RestorableSQLContainerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLContainerProperties.
func (*RestorableSQLContainerProperties) UnmarshalJSON ¶
func (r *RestorableSQLContainerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLContainerProperties.
type RestorableSQLContainerPropertiesResource ¶
type RestorableSQLContainerPropertiesResource struct { // Cosmos DB SQL container resource object Container *RestorableSQLContainerPropertiesResourceContainer // READ-ONLY; A state of this container to identify if this container is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this container can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The when this container event happened. EventTimestamp *string // READ-ONLY; The operation type of this container event. OperationType *OperationType // READ-ONLY; The name of this SQL container. OwnerID *string // READ-ONLY; The resource ID of this SQL container. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableSQLContainerPropertiesResource - The resource of an Azure Cosmos DB SQL container event
func (RestorableSQLContainerPropertiesResource) MarshalJSON ¶
func (r RestorableSQLContainerPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLContainerPropertiesResource.
func (*RestorableSQLContainerPropertiesResource) UnmarshalJSON ¶
func (r *RestorableSQLContainerPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLContainerPropertiesResource.
type RestorableSQLContainerPropertiesResourceContainer ¶
type RestorableSQLContainerPropertiesResourceContainer struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string // Analytical TTL. AnalyticalStorageTTL *int64 // The client encryption policy for the container. ClientEncryptionPolicy *ClientEncryptionPolicy // List of computed properties ComputedProperties []*ComputedProperty // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Default time to live DefaultTTL *int32 // 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 // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that specifies the addressable path of the container resource. Self *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
RestorableSQLContainerPropertiesResourceContainer - Cosmos DB SQL container resource object
func (RestorableSQLContainerPropertiesResourceContainer) MarshalJSON ¶
func (r RestorableSQLContainerPropertiesResourceContainer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLContainerPropertiesResourceContainer.
func (*RestorableSQLContainerPropertiesResourceContainer) UnmarshalJSON ¶
func (r *RestorableSQLContainerPropertiesResourceContainer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLContainerPropertiesResourceContainer.
type RestorableSQLContainersClient ¶
type RestorableSQLContainersClient struct {
// contains filtered or unexported fields
}
RestorableSQLContainersClient contains the methods for the RestorableSQLContainers group. Don't use this type directly, use NewRestorableSQLContainersClient() instead.
func NewRestorableSQLContainersClient ¶
func NewRestorableSQLContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLContainersClient, error)
NewRestorableSQLContainersClient creates a new instance of RestorableSQLContainersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableSQLContainersClient) NewListPager ¶
func (client *RestorableSQLContainersClient) NewListPager(location string, instanceID string, options *RestorableSQLContainersClientListOptions) *runtime.Pager[RestorableSQLContainersClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableSqlContainerList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableSQLContainersClient().NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableSQLContainersClientListOptions{RestorableSQLDatabaseRid: to.Ptr("3fu-hg=="), StartTime: nil, EndTime: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableSQLContainersListResult = armcosmos.RestorableSQLContainersListResult{ // Value: []*armcosmos.RestorableSQLContainerGetResult{ // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableSQLContainerProperties{ // Resource: &armcosmos.RestorableSQLContainerPropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("invalid"), // Container: &armcosmos.RestorableSQLContainerPropertiesResourceContainer{ // Etag: to.Ptr("\"00003e00-0000-0700-0000-5f85338a0000\""), // Rid: to.Ptr("V18LoLrv-qA="), // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/_ts"), // ConflictResolutionProcedure: to.Ptr(""), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // ID: to.Ptr("Container1"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // { // Path: to.Ptr("/\"_etag\"/?"), // }}, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // }, // { // Path: to.Ptr("/\"_ts\"/?"), // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // Self: to.Ptr("dbs/V18LoA==/colls/V18LoLrv-qA=/"), // }, // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Container1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }, // { // Name: to.Ptr("e85298a1-c631-4726-825e-a7ca092e9098"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098"), // Properties: &armcosmos.RestorableSQLContainerProperties{ // Resource: &armcosmos.RestorableSQLContainerPropertiesResource{ // Rid: to.Ptr("PrArcgAAAA=="), // CanUndelete: to.Ptr("invalid"), // Container: &armcosmos.RestorableSQLContainerPropertiesResourceContainer{ // Etag: to.Ptr("\"00004400-0000-0700-0000-5f85351f0000\""), // Rid: to.Ptr("V18LoLrv-qA="), // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/_ts"), // ConflictResolutionProcedure: to.Ptr(""), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](12345), // ID: to.Ptr("Container1"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // { // Path: to.Ptr("/\"_etag\"/?"), // }}, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // }, // { // Path: to.Ptr("/\"_ts\"/?"), // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // Self: to.Ptr("dbs/V18LoA==/colls/V18LoLrv-qA=/"), // }, // EventTimestamp: to.Ptr("2020-10-13T05:03:27Z"), // OperationType: to.Ptr(armcosmos.OperationTypeReplace), // OwnerID: to.Ptr("Container1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }}, // } }
Output:
type RestorableSQLContainersClientListOptions ¶
type RestorableSQLContainersClientListOptions struct { // Restorable Sql containers event feed end time. EndTime *string // The resource ID of the SQL database. RestorableSQLDatabaseRid *string // Restorable Sql containers event feed start time. StartTime *string }
RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.NewListPager method.
type RestorableSQLContainersClientListResponse ¶
type RestorableSQLContainersClientListResponse struct { // The List operation response, that contains the SQL container events and their properties. RestorableSQLContainersListResult }
RestorableSQLContainersClientListResponse contains the response from method RestorableSQLContainersClient.NewListPager.
type RestorableSQLContainersListResult ¶
type RestorableSQLContainersListResult struct { // READ-ONLY; List of SQL container events and their properties. Value []*RestorableSQLContainerGetResult }
RestorableSQLContainersListResult - The List operation response, that contains the SQL container events and their properties.
func (RestorableSQLContainersListResult) MarshalJSON ¶
func (r RestorableSQLContainersListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLContainersListResult.
func (*RestorableSQLContainersListResult) UnmarshalJSON ¶
func (r *RestorableSQLContainersListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLContainersListResult.
type RestorableSQLDatabaseGetResult ¶
type RestorableSQLDatabaseGetResult struct { // The properties of a SQL database event. Properties *RestorableSQLDatabaseProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableSQLDatabaseGetResult - An Azure Cosmos DB SQL database event
func (RestorableSQLDatabaseGetResult) MarshalJSON ¶
func (r RestorableSQLDatabaseGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLDatabaseGetResult.
func (*RestorableSQLDatabaseGetResult) UnmarshalJSON ¶
func (r *RestorableSQLDatabaseGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLDatabaseGetResult.
type RestorableSQLDatabaseProperties ¶
type RestorableSQLDatabaseProperties struct { // The resource of an Azure Cosmos DB SQL database event Resource *RestorableSQLDatabasePropertiesResource }
RestorableSQLDatabaseProperties - The properties of an Azure Cosmos DB SQL database event
func (RestorableSQLDatabaseProperties) MarshalJSON ¶
func (r RestorableSQLDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLDatabaseProperties.
func (*RestorableSQLDatabaseProperties) UnmarshalJSON ¶
func (r *RestorableSQLDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLDatabaseProperties.
type RestorableSQLDatabasePropertiesResource ¶
type RestorableSQLDatabasePropertiesResource struct { // Cosmos DB SQL database resource object Database *RestorableSQLDatabasePropertiesResourceDatabase // READ-ONLY; A state of this database to identify if this database is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this database can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this database event happened. EventTimestamp *string // READ-ONLY; The operation type of this database event. OperationType *OperationType // READ-ONLY; The name of the SQL database. OwnerID *string // READ-ONLY; The resource ID of the SQL database. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableSQLDatabasePropertiesResource - The resource of an Azure Cosmos DB SQL database event
func (RestorableSQLDatabasePropertiesResource) MarshalJSON ¶
func (r RestorableSQLDatabasePropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLDatabasePropertiesResource.
func (*RestorableSQLDatabasePropertiesResource) UnmarshalJSON ¶
func (r *RestorableSQLDatabasePropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLDatabasePropertiesResource.
type RestorableSQLDatabasePropertiesResourceDatabase ¶
type RestorableSQLDatabasePropertiesResourceDatabase struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // READ-ONLY; A system generated property that specified the addressable path of the collections resource. Colls *string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that specifies the addressable path of the database resource. Self *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 // READ-ONLY; A system generated property that specifies the addressable path of the users resource. Users *string }
RestorableSQLDatabasePropertiesResourceDatabase - Cosmos DB SQL database resource object
func (RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON ¶
func (r RestorableSQLDatabasePropertiesResourceDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLDatabasePropertiesResourceDatabase.
func (*RestorableSQLDatabasePropertiesResourceDatabase) UnmarshalJSON ¶
func (r *RestorableSQLDatabasePropertiesResourceDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLDatabasePropertiesResourceDatabase.
type RestorableSQLDatabasesClient ¶
type RestorableSQLDatabasesClient struct {
// contains filtered or unexported fields
}
RestorableSQLDatabasesClient contains the methods for the RestorableSQLDatabases group. Don't use this type directly, use NewRestorableSQLDatabasesClient() instead.
func NewRestorableSQLDatabasesClient ¶
func NewRestorableSQLDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLDatabasesClient, error)
NewRestorableSQLDatabasesClient creates a new instance of RestorableSQLDatabasesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableSQLDatabasesClient) NewListPager ¶
func (client *RestorableSQLDatabasesClient) NewListPager(location string, instanceID string, options *RestorableSQLDatabasesClientListOptions) *runtime.Pager[RestorableSQLDatabasesClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableSQLDatabasesClientListOptions contains the optional parameters for the RestorableSQLDatabasesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableSqlDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableSQLDatabasesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableSQLDatabasesListResult = armcosmos.RestorableSQLDatabasesListResult{ // Value: []*armcosmos.RestorableSQLDatabaseGetResult{ // { // Name: to.Ptr("59c21367-b98b-4a8e-abb7-b6f46600decc"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc"), // Properties: &armcosmos.RestorableSQLDatabaseProperties{ // Resource: &armcosmos.RestorableSQLDatabasePropertiesResource{ // Rid: to.Ptr("DLB14gAAAA=="), // CanUndelete: to.Ptr("invalid"), // Database: &armcosmos.RestorableSQLDatabasePropertiesResourceDatabase{ // Etag: to.Ptr("\"0000c20a-0000-0700-0000-5f4ff63f0000\""), // Rid: to.Ptr("3fu-hg=="), // ID: to.Ptr("Database1"), // Colls: to.Ptr("colls/"), // Self: to.Ptr("dbs/3fu-hg==/"), // Users: to.Ptr("users/"), // }, // EventTimestamp: to.Ptr("2020-09-02T19:45:03Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("3fu-hg=="), // }, // }, // }, // { // Name: to.Ptr("8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257"), // Properties: &armcosmos.RestorableSQLDatabaseProperties{ // Resource: &armcosmos.RestorableSQLDatabasePropertiesResource{ // Rid: to.Ptr("ESXNLAAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Database already exists. Only deleted resources can be restored within same account."), // Database: &armcosmos.RestorableSQLDatabasePropertiesResourceDatabase{ // Etag: to.Ptr("\"0000c20a-0000-0700-0000-5f4ff63f0000\""), // Rid: to.Ptr("3fu-hg=="), // Ts: to.Ptr[float32](1599075903), // ID: to.Ptr("Database1"), // Colls: to.Ptr("colls/"), // Self: to.Ptr("dbs/3fu-hg==/"), // Users: to.Ptr("users/"), // }, // EventTimestamp: to.Ptr("2020-09-02T19:53:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Database1"), // OwnerResourceID: to.Ptr("3fu-hg=="), // }, // }, // }, // { // Name: to.Ptr("2c07991b-9c7c-4e85-be68-b18c1f2ff326"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlDatabases/2c07991b-9c7c-4e85-be68-b18c1f2ff326"), // Properties: &armcosmos.RestorableSQLDatabaseProperties{ // Resource: &armcosmos.RestorableSQLDatabasePropertiesResource{ // Rid: to.Ptr("aXFqUQAAAA=="), // CanUndelete: to.Ptr("invalid"), // Database: &armcosmos.RestorableSQLDatabasePropertiesResourceDatabase{ // Etag: to.Ptr("\"0000ca0a-0000-0700-0000-5f4ff82b0000\""), // Rid: to.Ptr("0SziSg=="), // ID: to.Ptr("Database2"), // Colls: to.Ptr("colls/"), // Self: to.Ptr("dbs/0SziSg==/"), // Users: to.Ptr("users/"), // }, // EventTimestamp: to.Ptr("2020-09-02T19:53:15Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Database2"), // OwnerResourceID: to.Ptr("0SziSg=="), // }, // }, // }}, // } }
Output:
type RestorableSQLDatabasesClientListOptions ¶
type RestorableSQLDatabasesClientListOptions struct { }
RestorableSQLDatabasesClientListOptions contains the optional parameters for the RestorableSQLDatabasesClient.NewListPager method.
type RestorableSQLDatabasesClientListResponse ¶
type RestorableSQLDatabasesClientListResponse struct { // The List operation response, that contains the SQL database events and their properties. RestorableSQLDatabasesListResult }
RestorableSQLDatabasesClientListResponse contains the response from method RestorableSQLDatabasesClient.NewListPager.
type RestorableSQLDatabasesListResult ¶
type RestorableSQLDatabasesListResult struct { // READ-ONLY; List of SQL database events and their properties. Value []*RestorableSQLDatabaseGetResult }
RestorableSQLDatabasesListResult - The List operation response, that contains the SQL database events and their properties.
func (RestorableSQLDatabasesListResult) MarshalJSON ¶
func (r RestorableSQLDatabasesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLDatabasesListResult.
func (*RestorableSQLDatabasesListResult) UnmarshalJSON ¶
func (r *RestorableSQLDatabasesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLDatabasesListResult.
type RestorableSQLResourcesClient ¶
type RestorableSQLResourcesClient struct {
// contains filtered or unexported fields
}
RestorableSQLResourcesClient contains the methods for the RestorableSQLResources group. Don't use this type directly, use NewRestorableSQLResourcesClient() instead.
func NewRestorableSQLResourcesClient ¶
func NewRestorableSQLResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableSQLResourcesClient, error)
NewRestorableSQLResourcesClient creates a new instance of RestorableSQLResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableSQLResourcesClient) NewListPager ¶
func (client *RestorableSQLResourcesClient) NewListPager(location string, instanceID string, options *RestorableSQLResourcesClientListOptions) *runtime.Pager[RestorableSQLResourcesClientListResponse]
NewListPager - Return a list of database and container combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableSQLResourcesClientListOptions contains the optional parameters for the RestorableSQLResourcesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableSqlResourceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableSQLResourcesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableSQLResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("06/01/2022 4:56"), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableSQLResourcesListResult = armcosmos.RestorableSQLResourcesListResult{ // Value: []*armcosmos.RestorableSQLResourcesGetResult{ // { // Name: to.Ptr("Database1"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources"), // CollectionNames: []*string{ // to.Ptr("Container1")}, // DatabaseName: to.Ptr("Database1"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database1"), // }, // { // Name: to.Ptr("Database2"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources"), // CollectionNames: []*string{ // to.Ptr("Container1"), // to.Ptr("Container2")}, // DatabaseName: to.Ptr("Database2"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database2"), // }, // { // Name: to.Ptr("Database3"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources"), // CollectionNames: []*string{ // }, // DatabaseName: to.Ptr("Database3"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database3"), // }}, // } }
Output:
type RestorableSQLResourcesClientListOptions ¶
type RestorableSQLResourcesClientListOptions struct { // The location where the restorable resources are located. RestoreLocation *string // The timestamp when the restorable resources existed. RestoreTimestampInUTC *string }
RestorableSQLResourcesClientListOptions contains the optional parameters for the RestorableSQLResourcesClient.NewListPager method.
type RestorableSQLResourcesClientListResponse ¶
type RestorableSQLResourcesClientListResponse struct { // The List operation response, that contains the restorable SQL resources. RestorableSQLResourcesListResult }
RestorableSQLResourcesClientListResponse contains the response from method RestorableSQLResourcesClient.NewListPager.
type RestorableSQLResourcesGetResult ¶
type RestorableSQLResourcesGetResult struct { // The names of the collections available for restore. CollectionNames []*string // The name of the database available for restore. DatabaseName *string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableSQLResourcesGetResult - Specific Databases to restore.
func (RestorableSQLResourcesGetResult) MarshalJSON ¶
func (r RestorableSQLResourcesGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLResourcesGetResult.
func (*RestorableSQLResourcesGetResult) UnmarshalJSON ¶
func (r *RestorableSQLResourcesGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLResourcesGetResult.
type RestorableSQLResourcesListResult ¶
type RestorableSQLResourcesListResult struct { // READ-ONLY; List of restorable SQL resources, including the database and collection names. Value []*RestorableSQLResourcesGetResult }
RestorableSQLResourcesListResult - The List operation response, that contains the restorable SQL resources.
func (RestorableSQLResourcesListResult) MarshalJSON ¶
func (r RestorableSQLResourcesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableSQLResourcesListResult.
func (*RestorableSQLResourcesListResult) UnmarshalJSON ¶
func (r *RestorableSQLResourcesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableSQLResourcesListResult.
type RestorableTableGetResult ¶ added in v2.2.0
type RestorableTableGetResult struct { // The properties of a Table event. Properties *RestorableTableProperties // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableTableGetResult - An Azure Cosmos DB Table event
func (RestorableTableGetResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableTableGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTableGetResult.
func (*RestorableTableGetResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTableGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTableGetResult.
type RestorableTableProperties ¶ added in v2.2.0
type RestorableTableProperties struct { // The resource of an Azure Cosmos DB Table event Resource *RestorableTablePropertiesResource }
RestorableTableProperties - The properties of an Azure Cosmos DB Table event
func (RestorableTableProperties) MarshalJSON ¶ added in v2.2.0
func (r RestorableTableProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTableProperties.
func (*RestorableTableProperties) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTableProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTableProperties.
type RestorableTablePropertiesResource ¶ added in v2.2.0
type RestorableTablePropertiesResource struct { // READ-ONLY; A state of this table to identify if this table is restorable in same account. CanUndelete *string // READ-ONLY; The reason why this table can not be restored in same account. CanUndeleteReason *string // READ-ONLY; The time when this table event happened. EventTimestamp *string // READ-ONLY; The operation type of this table event. OperationType *OperationType // READ-ONLY; The name of this Table. OwnerID *string // READ-ONLY; The resource ID of this Table. OwnerResourceID *string // READ-ONLY; A system generated property. A unique identifier. Rid *string }
RestorableTablePropertiesResource - The resource of an Azure Cosmos DB Table event
func (RestorableTablePropertiesResource) MarshalJSON ¶ added in v2.2.0
func (r RestorableTablePropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTablePropertiesResource.
func (*RestorableTablePropertiesResource) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTablePropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTablePropertiesResource.
type RestorableTableResourcesClient ¶ added in v2.2.0
type RestorableTableResourcesClient struct {
// contains filtered or unexported fields
}
RestorableTableResourcesClient contains the methods for the RestorableTableResources group. Don't use this type directly, use NewRestorableTableResourcesClient() instead.
func NewRestorableTableResourcesClient ¶ added in v2.2.0
func NewRestorableTableResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTableResourcesClient, error)
NewRestorableTableResourcesClient creates a new instance of RestorableTableResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableTableResourcesClient) NewListPager ¶ added in v2.2.0
func (client *RestorableTableResourcesClient) NewListPager(location string, instanceID string, options *RestorableTableResourcesClientListOptions) *runtime.Pager[RestorableTableResourcesClientListResponse]
NewListPager - Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission.
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableTableResourceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableTableResourcesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableTableResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("06/01/2022 4:56"), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableTableResourcesListResult = armcosmos.RestorableTableResourcesListResult{ // Value: []*armcosmos.RestorableTableResourcesGetResult{ // { // Name: to.Ptr("table1"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorabletableresources/table1"), // }, // { // Name: to.Ptr("table2"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources"), // ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorabletableresources/table2"), // }}, // } }
Output:
type RestorableTableResourcesClientListOptions ¶ added in v2.2.0
type RestorableTableResourcesClientListOptions struct { // The location where the restorable resources are located. RestoreLocation *string // The timestamp when the restorable resources existed. RestoreTimestampInUTC *string }
RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.NewListPager method.
type RestorableTableResourcesClientListResponse ¶ added in v2.2.0
type RestorableTableResourcesClientListResponse struct { // List of restorable table names. RestorableTableResourcesListResult }
RestorableTableResourcesClientListResponse contains the response from method RestorableTableResourcesClient.NewListPager.
type RestorableTableResourcesGetResult ¶ added in v2.2.0
type RestorableTableResourcesGetResult struct { // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the Table. Name *string // READ-ONLY; The type of Azure resource. Type *string }
RestorableTableResourcesGetResult - Specific Databases to restore.
func (RestorableTableResourcesGetResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableTableResourcesGetResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTableResourcesGetResult.
func (*RestorableTableResourcesGetResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTableResourcesGetResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTableResourcesGetResult.
type RestorableTableResourcesListResult ¶ added in v2.2.0
type RestorableTableResourcesListResult struct { // READ-ONLY; List of restorable table names. Value []*RestorableTableResourcesGetResult }
RestorableTableResourcesListResult - List of restorable table names.
func (RestorableTableResourcesListResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableTableResourcesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTableResourcesListResult.
func (*RestorableTableResourcesListResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTableResourcesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTableResourcesListResult.
type RestorableTablesClient ¶ added in v2.2.0
type RestorableTablesClient struct {
// contains filtered or unexported fields
}
RestorableTablesClient contains the methods for the RestorableTables group. Don't use this type directly, use NewRestorableTablesClient() instead.
func NewRestorableTablesClient ¶ added in v2.2.0
func NewRestorableTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTablesClient, error)
NewRestorableTablesClient creates a new instance of RestorableTablesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableTablesClient) NewListPager ¶ added in v2.2.0
func (client *RestorableTablesClient) NewListPager(location string, instanceID string, options *RestorableTablesClientListOptions) *runtime.Pager[RestorableTablesClientListResponse]
NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission
Generated from API version 2023-11-15
- location - Cosmos DB region, with spaces between words and each word capitalized.
- instanceID - The instanceId GUID of a restorable database account.
- options - RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableTableList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableTablesClient().NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableTablesClientListOptions{StartTime: nil, EndTime: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableTablesListResult = armcosmos.RestorableTablesListResult{ // Value: []*armcosmos.RestorableTableGetResult{ // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableTables/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableTableProperties{ // Resource: &armcosmos.RestorableTablePropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("invalid"), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeCreate), // OwnerID: to.Ptr("Table1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }, // { // Name: to.Ptr("79609a98-3394-41f8-911f-cfab0c075c86"), // Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables"), // ID: to.Ptr("/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableTables/79609a98-3394-41f8-911f-cfab0c075c86"), // Properties: &armcosmos.RestorableTableProperties{ // Resource: &armcosmos.RestorableTablePropertiesResource{ // Rid: to.Ptr("zAyAPQAAAA=="), // CanUndelete: to.Ptr("notRestorable"), // CanUndeleteReason: to.Ptr("Collection with same name already exist as live collection."), // EventTimestamp: to.Ptr("2020-10-13T04:56:42Z"), // OperationType: to.Ptr(armcosmos.OperationTypeDelete), // OwnerID: to.Ptr("Table1"), // OwnerResourceID: to.Ptr("V18LoLrv-qA="), // }, // }, // }}, // } }
Output:
type RestorableTablesClientListOptions ¶ added in v2.2.0
type RestorableTablesClientListOptions struct { // Restorable Tables event feed end time. EndTime *string // Restorable Tables event feed start time. StartTime *string }
RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.NewListPager method.
type RestorableTablesClientListResponse ¶ added in v2.2.0
type RestorableTablesClientListResponse struct { // The List operation response, that contains the Table events and their properties. RestorableTablesListResult }
RestorableTablesClientListResponse contains the response from method RestorableTablesClient.NewListPager.
type RestorableTablesListResult ¶ added in v2.2.0
type RestorableTablesListResult struct { // READ-ONLY; List of Table events and their properties. Value []*RestorableTableGetResult }
RestorableTablesListResult - The List operation response, that contains the Table events and their properties.
func (RestorableTablesListResult) MarshalJSON ¶ added in v2.2.0
func (r RestorableTablesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableTablesListResult.
func (*RestorableTablesListResult) UnmarshalJSON ¶ added in v2.2.0
func (r *RestorableTablesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTablesListResult.
type RestoreMode ¶
type RestoreMode string
RestoreMode - Describes the mode of the restore.
const (
RestoreModePointInTime RestoreMode = "PointInTime"
)
func PossibleRestoreModeValues ¶
func PossibleRestoreModeValues() []RestoreMode
PossibleRestoreModeValues returns the possible values for the RestoreMode const type.
type RestoreParameters ¶
type RestoreParameters struct { // List of specific databases available for restore. DatabasesToRestore []*DatabaseRestoreResource // List of specific gremlin databases available for restore. GremlinDatabasesToRestore []*GremlinDatabaseRestoreResource // Describes the mode of the restore. RestoreMode *RestoreMode // The id of the restorable database account from which the restore has to be initiated. For example: // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} RestoreSource *string // Time to which the account has to be restored (ISO-8601 format). RestoreTimestampInUTC *time.Time // List of specific tables available for restore. TablesToRestore []*string }
RestoreParameters - Parameters to indicate the information about the restore.
func (RestoreParameters) MarshalJSON ¶
func (r RestoreParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestoreParameters.
func (*RestoreParameters) UnmarshalJSON ¶
func (r *RestoreParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestoreParameters.
type RestoreParametersBase ¶ added in v2.7.0
type RestoreParametersBase struct { // The id of the restorable database account from which the restore has to be initiated. For example: // /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} RestoreSource *string // Time to which the account has to be restored (ISO-8601 format). RestoreTimestampInUTC *time.Time }
RestoreParametersBase - Parameters to indicate the information about the restore.
func (RestoreParametersBase) MarshalJSON ¶ added in v2.7.0
func (r RestoreParametersBase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestoreParametersBase.
func (*RestoreParametersBase) UnmarshalJSON ¶ added in v2.7.0
func (r *RestoreParametersBase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestoreParametersBase.
type Role ¶ added in v2.1.0
type Role struct { // The database name the role is applied. Db *string // The role name. Role *string }
Role - The set of roles permitted through this Role Definition.
func (Role) MarshalJSON ¶ added in v2.1.0
MarshalJSON implements the json.Marshaller interface for type Role.
func (*Role) UnmarshalJSON ¶ added in v2.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Role.
type RoleDefinitionType ¶
type RoleDefinitionType string
RoleDefinitionType - Indicates whether the Role Definition was built-in or user created.
const ( RoleDefinitionTypeBuiltInRole RoleDefinitionType = "BuiltInRole" RoleDefinitionTypeCustomRole RoleDefinitionType = "CustomRole" )
func PossibleRoleDefinitionTypeValues ¶
func PossibleRoleDefinitionTypeValues() []RoleDefinitionType
PossibleRoleDefinitionTypeValues returns the possible values for the RoleDefinitionType const type.
type SQLContainerCreateUpdateParameters ¶
type SQLContainerCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB container. Properties *SQLContainerCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLContainerCreateUpdateParameters - Parameters to create and update Cosmos DB container.
func (SQLContainerCreateUpdateParameters) MarshalJSON ¶
func (s SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerCreateUpdateParameters.
func (*SQLContainerCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLContainerCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerCreateUpdateParameters.
type SQLContainerCreateUpdateProperties ¶
type SQLContainerCreateUpdateProperties struct { // REQUIRED; 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 }
SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
func (SQLContainerCreateUpdateProperties) MarshalJSON ¶
func (s SQLContainerCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerCreateUpdateProperties.
func (*SQLContainerCreateUpdateProperties) UnmarshalJSON ¶
func (s *SQLContainerCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerCreateUpdateProperties.
type SQLContainerGetProperties ¶
type SQLContainerGetProperties struct { Options *SQLContainerGetPropertiesOptions Resource *SQLContainerGetPropertiesResource }
SQLContainerGetProperties - The properties of an Azure Cosmos DB container
func (SQLContainerGetProperties) MarshalJSON ¶
func (s SQLContainerGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerGetProperties.
func (*SQLContainerGetProperties) UnmarshalJSON ¶
func (s *SQLContainerGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerGetProperties.
type SQLContainerGetPropertiesOptions ¶
type SQLContainerGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (SQLContainerGetPropertiesOptions) MarshalJSON ¶
func (s SQLContainerGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerGetPropertiesOptions.
func (*SQLContainerGetPropertiesOptions) UnmarshalJSON ¶
func (s *SQLContainerGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerGetPropertiesOptions.
type SQLContainerGetPropertiesResource ¶
type SQLContainerGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string // Analytical TTL. AnalyticalStorageTTL *int64 // The client encryption policy for the container. ClientEncryptionPolicy *ClientEncryptionPolicy // List of computed properties ComputedProperties []*ComputedProperty // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Default time to live DefaultTTL *int32 // 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 // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (SQLContainerGetPropertiesResource) MarshalJSON ¶
func (s SQLContainerGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerGetPropertiesResource.
func (*SQLContainerGetPropertiesResource) UnmarshalJSON ¶
func (s *SQLContainerGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerGetPropertiesResource.
type SQLContainerGetResults ¶
type SQLContainerGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB container Properties *SQLContainerGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLContainerGetResults - An Azure Cosmos DB container.
func (SQLContainerGetResults) MarshalJSON ¶
func (s SQLContainerGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerGetResults.
func (*SQLContainerGetResults) UnmarshalJSON ¶
func (s *SQLContainerGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerGetResults.
type SQLContainerListResult ¶
type SQLContainerListResult struct { // READ-ONLY; List of containers and their properties. Value []*SQLContainerGetResults }
SQLContainerListResult - The List operation response, that contains the containers and their properties.
func (SQLContainerListResult) MarshalJSON ¶
func (s SQLContainerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerListResult.
func (*SQLContainerListResult) UnmarshalJSON ¶
func (s *SQLContainerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerListResult.
type SQLContainerResource ¶
type SQLContainerResource struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string // Analytical TTL. AnalyticalStorageTTL *int64 // The client encryption policy for the container. ClientEncryptionPolicy *ClientEncryptionPolicy // List of computed properties ComputedProperties []*ComputedProperty // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Default time to live DefaultTTL *int32 // 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 // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy }
SQLContainerResource - Cosmos DB SQL container resource object
func (SQLContainerResource) MarshalJSON ¶
func (s SQLContainerResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerResource.
func (*SQLContainerResource) UnmarshalJSON ¶
func (s *SQLContainerResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLContainerResource.
type SQLDatabaseCreateUpdateParameters ¶
type SQLDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB SQL database. Properties *SQLDatabaseCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLDatabaseCreateUpdateParameters - Parameters to create and update Cosmos DB SQL database.
func (SQLDatabaseCreateUpdateParameters) MarshalJSON ¶
func (s SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseCreateUpdateParameters.
func (*SQLDatabaseCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseCreateUpdateParameters.
type SQLDatabaseCreateUpdateProperties ¶
type SQLDatabaseCreateUpdateProperties struct { // REQUIRED; 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 }
SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
func (SQLDatabaseCreateUpdateProperties) MarshalJSON ¶
func (s SQLDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseCreateUpdateProperties.
func (*SQLDatabaseCreateUpdateProperties) UnmarshalJSON ¶
func (s *SQLDatabaseCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseCreateUpdateProperties.
type SQLDatabaseGetProperties ¶
type SQLDatabaseGetProperties struct { Options *SQLDatabaseGetPropertiesOptions Resource *SQLDatabaseGetPropertiesResource }
SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
func (SQLDatabaseGetProperties) MarshalJSON ¶
func (s SQLDatabaseGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseGetProperties.
func (*SQLDatabaseGetProperties) UnmarshalJSON ¶
func (s *SQLDatabaseGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseGetProperties.
type SQLDatabaseGetPropertiesOptions ¶
type SQLDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (SQLDatabaseGetPropertiesOptions) MarshalJSON ¶
func (s SQLDatabaseGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseGetPropertiesOptions.
func (*SQLDatabaseGetPropertiesOptions) UnmarshalJSON ¶
func (s *SQLDatabaseGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseGetPropertiesOptions.
type SQLDatabaseGetPropertiesResource ¶
type SQLDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string // A system generated property that specified the addressable path of the collections resource. Colls *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // A system generated property that specifies the addressable path of the users resource. Users *string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (SQLDatabaseGetPropertiesResource) MarshalJSON ¶
func (s SQLDatabaseGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseGetPropertiesResource.
func (*SQLDatabaseGetPropertiesResource) UnmarshalJSON ¶
func (s *SQLDatabaseGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseGetPropertiesResource.
type SQLDatabaseGetResults ¶
type SQLDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB SQL database Properties *SQLDatabaseGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLDatabaseGetResults - An Azure Cosmos DB SQL database.
func (SQLDatabaseGetResults) MarshalJSON ¶
func (s SQLDatabaseGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseGetResults.
func (*SQLDatabaseGetResults) UnmarshalJSON ¶
func (s *SQLDatabaseGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseGetResults.
type SQLDatabaseListResult ¶
type SQLDatabaseListResult struct { // READ-ONLY; List of SQL databases and their properties. Value []*SQLDatabaseGetResults }
SQLDatabaseListResult - The List operation response, that contains the SQL databases and their properties.
func (SQLDatabaseListResult) MarshalJSON ¶
func (s SQLDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseListResult.
func (*SQLDatabaseListResult) UnmarshalJSON ¶
func (s *SQLDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseListResult.
type SQLDatabaseResource ¶
type SQLDatabaseResource struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters }
SQLDatabaseResource - Cosmos DB SQL database resource object
func (SQLDatabaseResource) MarshalJSON ¶
func (s SQLDatabaseResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDatabaseResource.
func (*SQLDatabaseResource) UnmarshalJSON ¶
func (s *SQLDatabaseResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDatabaseResource.
type SQLDedicatedGatewayRegionalServiceResource ¶
type SQLDedicatedGatewayRegionalServiceResource struct { // READ-ONLY; The location name. Location *string // READ-ONLY; The regional service name. Name *string // READ-ONLY; The regional endpoint for SqlDedicatedGateway. SQLDedicatedGatewayEndpoint *string // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
SQLDedicatedGatewayRegionalServiceResource - Resource for a regional service location.
func (SQLDedicatedGatewayRegionalServiceResource) MarshalJSON ¶
func (s SQLDedicatedGatewayRegionalServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayRegionalServiceResource.
func (*SQLDedicatedGatewayRegionalServiceResource) UnmarshalJSON ¶
func (s *SQLDedicatedGatewayRegionalServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayRegionalServiceResource.
type SQLDedicatedGatewayServiceResource ¶
type SQLDedicatedGatewayServiceResource struct { // Properties for SqlDedicatedGatewayServiceResource. Properties *SQLDedicatedGatewayServiceResourceProperties }
SQLDedicatedGatewayServiceResource - Describes the service response property for SqlDedicatedGateway.
func (SQLDedicatedGatewayServiceResource) MarshalJSON ¶
func (s SQLDedicatedGatewayServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayServiceResource.
func (*SQLDedicatedGatewayServiceResource) UnmarshalJSON ¶
func (s *SQLDedicatedGatewayServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayServiceResource.
type SQLDedicatedGatewayServiceResourceProperties ¶
type SQLDedicatedGatewayServiceResourceProperties struct { // REQUIRED; ServiceType for the service. ServiceType *ServiceType // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // SqlDedicatedGateway endpoint for the service. SQLDedicatedGatewayEndpoint *string // READ-ONLY; Time of the last state change (ISO-8601 format). CreationTime *time.Time // READ-ONLY; An array that contains all of the locations for the service. Locations []*SQLDedicatedGatewayRegionalServiceResource // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
SQLDedicatedGatewayServiceResourceProperties - Properties for SqlDedicatedGatewayServiceResource.
func (*SQLDedicatedGatewayServiceResourceProperties) GetServiceResourceProperties ¶
func (s *SQLDedicatedGatewayServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type SQLDedicatedGatewayServiceResourceProperties.
func (SQLDedicatedGatewayServiceResourceProperties) MarshalJSON ¶
func (s SQLDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayServiceResourceProperties.
func (*SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON ¶
func (s *SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayServiceResourceProperties.
type SQLResourcesClient ¶
type SQLResourcesClient struct {
// contains filtered or unexported fields
}
SQLResourcesClient contains the methods for the SQLResources group. Don't use this type directly, use NewSQLResourcesClient() instead.
func NewSQLResourcesClient ¶
func NewSQLResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLResourcesClient, error)
NewSQLResourcesClient creates a new instance of SQLResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SQLResourcesClient) BeginCreateUpdateClientEncryptionKey ¶ added in v2.2.0
func (client *SQLResourcesClient) BeginCreateUpdateClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, createUpdateClientEncryptionKeyParameters ClientEncryptionKeyCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateClientEncryptionKeyResponse], error)
BeginCreateUpdateClientEncryptionKey - Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- clientEncryptionKeyName - Cosmos DB ClientEncryptionKey name.
- createUpdateClientEncryptionKeyParameters - The parameters to provide for the client encryption key.
- options - SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateClientEncryptionKey method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", armcosmos.ClientEncryptionKeyCreateUpdateParameters{ Properties: &armcosmos.ClientEncryptionKeyCreateUpdateProperties{ Resource: &armcosmos.ClientEncryptionKeyResource{ EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), ID: to.Ptr("cekName"), KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ Name: to.Ptr("customerManagedKey"), Type: to.Ptr("AzureKeyVault"), Algorithm: to.Ptr("RSA-OAEP"), Value: to.Ptr("AzureKeyVault Key URL"), }, WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ // Name: to.Ptr("cekName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // ID: to.Ptr("cekName"), // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ // Name: to.Ptr("customerManagedKey"), // Type: to.Ptr("AzureKeyVault"), // Algorithm: to.Ptr("RSA-OAEP"), // Value: to.Ptr("AzureKeyVault Key URL"), // }, // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), // Ts: to.Ptr[float32](1626425552), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLContainer ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters SQLContainerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLContainerOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLContainerResponse], error)
BeginCreateUpdateSQLContainer - Create or update an Azure Cosmos DB SQL container If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- createUpdateSQLContainerParameters - The parameters to provide for the current SQL container.
- options - SQLResourcesClientBeginCreateUpdateSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLContainer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLContainer(ctx, "rg1", "ddb1", "databaseName", "containerName", armcosmos.SQLContainerCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.SQLContainerCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.SQLContainerResource{ ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ { Path: to.Ptr("/path"), ClientEncryptionKeyID: to.Ptr("keyId"), EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), EncryptionType: to.Ptr("Deterministic"), }}, PolicyFormatVersion: to.Ptr[int32](2), }, ComputedProperties: []*armcosmos.ComputedProperty{ { Name: to.Ptr("cp_lowerName"), Query: to.Ptr("SELECT VALUE LOWER(c.name) FROM c"), }}, ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ ConflictResolutionPath: to.Ptr("/path"), Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), }, DefaultTTL: to.Ptr[int32](100), ID: to.Ptr("containerName"), IndexingPolicy: &armcosmos.IndexingPolicy{ Automatic: to.Ptr(true), ExcludedPaths: []*armcosmos.ExcludedPath{}, IncludedPaths: []*armcosmos.IncludedPath{ { Path: to.Ptr("/*"), Indexes: []*armcosmos.Indexes{ { DataType: to.Ptr(armcosmos.DataTypeString), Kind: to.Ptr(armcosmos.IndexKindRange), Precision: to.Ptr[int32](-1), }, { DataType: to.Ptr(armcosmos.DataTypeNumber), Kind: to.Ptr(armcosmos.IndexKindRange), Precision: to.Ptr[int32](-1), }}, }}, IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), }, PartitionKey: &armcosmos.ContainerPartitionKey{ Kind: to.Ptr(armcosmos.PartitionKindHash), Paths: []*string{ to.Ptr("/AccountNumber")}, }, UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ UniqueKeys: []*armcosmos.UniqueKey{ { Paths: []*string{ to.Ptr("/testPath")}, }}, }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLContainerGetResults = armcosmos.SQLContainerGetResults{ // Name: to.Ptr("containerName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/containerName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLContainerGetProperties{ // Resource: &armcosmos.SQLContainerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ // { // Path: to.Ptr("/path"), // ClientEncryptionKeyID: to.Ptr("keyId"), // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // EncryptionType: to.Ptr("Deterministic"), // }}, // PolicyFormatVersion: to.Ptr[int32](1), // }, // ComputedProperties: []*armcosmos.ComputedProperty{ // { // Name: to.Ptr("cp_lowerName"), // Query: to.Ptr("SELECT VALUE LOWER(c.name) FROM c"), // }}, // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("containerName"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLDatabase ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters SQLDatabaseCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLDatabaseResponse], error)
BeginCreateUpdateSQLDatabase - Create or update an Azure Cosmos DB SQL database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- createUpdateSQLDatabaseParameters - The parameters to provide for the current SQL database.
- options - SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLDatabase(ctx, "rg1", "ddb1", "databaseName", armcosmos.SQLDatabaseCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.SQLDatabaseCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.SQLDatabaseResource{ ID: to.Ptr("databaseName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLDatabaseGetResults = armcosmos.SQLDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLDatabaseGetProperties{ // Resource: &armcosmos.SQLDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLRoleAssignment ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, createUpdateSQLRoleAssignmentParameters SQLRoleAssignmentCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse], error)
BeginCreateUpdateSQLRoleAssignment - Creates or updates an Azure Cosmos DB SQL Role Assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleAssignmentID - The GUID for the Role Assignment.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- createUpdateSQLRoleAssignmentParameters - The properties required to create or update a Role Assignment.
- options - SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleAssignmentCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLRoleAssignment(ctx, "myRoleAssignmentId", "myResourceGroupName", "myAccountName", armcosmos.SQLRoleAssignmentCreateUpdateParameters{ Properties: &armcosmos.SQLRoleAssignmentResource{ PrincipalID: to.Ptr("myPrincipalId"), RoleDefinitionID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), Scope: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLRoleAssignmentGetResults = armcosmos.SQLRoleAssignmentGetResults{ // Name: to.Ptr("myRoleAssignmentId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleAssignments/myRoleAssignmentId"), // Properties: &armcosmos.SQLRoleAssignmentResource{ // PrincipalID: to.Ptr("myPrincipalId"), // RoleDefinitionID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Scope: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases"), // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLRoleDefinition ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, createUpdateSQLRoleDefinitionParameters SQLRoleDefinitionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse], error)
BeginCreateUpdateSQLRoleDefinition - Creates or updates an Azure Cosmos DB SQL Role Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleDefinitionID - The GUID for the Role Definition.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- createUpdateSQLRoleDefinitionParameters - The properties required to create or update a Role Definition.
- options - SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleDefinitionCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLRoleDefinition(ctx, "myRoleDefinitionId", "myResourceGroupName", "myAccountName", armcosmos.SQLRoleDefinitionCreateUpdateParameters{ Properties: &armcosmos.SQLRoleDefinitionResource{ Type: to.Ptr(armcosmos.RoleDefinitionTypeCustomRole), AssignableScopes: []*string{ to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales"), to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases")}, Permissions: []*armcosmos.Permission{ { DataActions: []*string{ to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/create"), to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read")}, NotDataActions: []*string{}, }}, RoleName: to.Ptr("myRoleName"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLRoleDefinitionGetResults = armcosmos.SQLRoleDefinitionGetResults{ // Name: to.Ptr("myRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Properties: &armcosmos.SQLRoleDefinitionResource{ // Type: to.Ptr(armcosmos.RoleDefinitionTypeCustomRole), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales"), // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases")}, // Permissions: []*armcosmos.Permission{ // { // DataActions: []*string{ // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/create"), // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read")}, // }}, // RoleName: to.Ptr("myRoleName"), // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLStoredProcedure ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters SQLStoredProcedureCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLStoredProcedureResponse], error)
BeginCreateUpdateSQLStoredProcedure - Create or update an Azure Cosmos DB SQL storedProcedure If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- storedProcedureName - Cosmos DB storedProcedure name.
- createUpdateSQLStoredProcedureParameters - The parameters to provide for the current SQL storedProcedure.
- options - SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlStoredProcedureCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLStoredProcedure(ctx, "rg1", "ddb1", "databaseName", "containerName", "storedProcedureName", armcosmos.SQLStoredProcedureCreateUpdateParameters{ Properties: &armcosmos.SQLStoredProcedureCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.SQLStoredProcedureResource{ Body: to.Ptr("body"), ID: to.Ptr("storedProcedureName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLStoredProcedureGetResults = armcosmos.SQLStoredProcedureGetResults{ // Name: to.Ptr("storedProcedureName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlStoredProcedures"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlStoredProcedures/storedProcedureName"), // Properties: &armcosmos.SQLStoredProcedureGetProperties{ // Resource: &armcosmos.SQLStoredProcedureGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("storedProcedureName"), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLTrigger ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters SQLTriggerCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLTriggerOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLTriggerResponse], error)
BeginCreateUpdateSQLTrigger - Create or update an Azure Cosmos DB SQL trigger If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- triggerName - Cosmos DB trigger name.
- createUpdateSQLTriggerParameters - The parameters to provide for the current SQL trigger.
- options - SQLResourcesClientBeginCreateUpdateSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLTrigger method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlTriggerCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLTrigger(ctx, "rg1", "ddb1", "databaseName", "containerName", "triggerName", armcosmos.SQLTriggerCreateUpdateParameters{ Properties: &armcosmos.SQLTriggerCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.SQLTriggerResource{ Body: to.Ptr("body"), ID: to.Ptr("triggerName"), TriggerOperation: to.Ptr(armcosmos.TriggerOperation("triggerOperation")), TriggerType: to.Ptr(armcosmos.TriggerType("triggerType")), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLTriggerGetResults = armcosmos.SQLTriggerGetResults{ // Name: to.Ptr("triggerName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlTriggers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlTriggers/triggerName"), // Properties: &armcosmos.SQLTriggerGetProperties{ // Resource: &armcosmos.SQLTriggerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("triggerName"), // TriggerOperation: to.Ptr(armcosmos.TriggerOperation("triggerOperation")), // TriggerType: to.Ptr(armcosmos.TriggerType("triggerType")), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginCreateUpdateSQLUserDefinedFunction ¶
func (client *SQLResourcesClient) BeginCreateUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters SQLUserDefinedFunctionCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse], error)
BeginCreateUpdateSQLUserDefinedFunction - Create or update an Azure Cosmos DB SQL userDefinedFunction If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- userDefinedFunctionName - Cosmos DB userDefinedFunction name.
- createUpdateSQLUserDefinedFunctionParameters - The parameters to provide for the current SQL userDefinedFunction.
- options - SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlUserDefinedFunctionCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginCreateUpdateSQLUserDefinedFunction(ctx, "rg1", "ddb1", "databaseName", "containerName", "userDefinedFunctionName", armcosmos.SQLUserDefinedFunctionCreateUpdateParameters{ Properties: &armcosmos.SQLUserDefinedFunctionCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.SQLUserDefinedFunctionResource{ Body: to.Ptr("body"), ID: to.Ptr("userDefinedFunctionName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLUserDefinedFunctionGetResults = armcosmos.SQLUserDefinedFunctionGetResults{ // Name: to.Ptr("userDefinedFunctionName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlUserDefinedFunctions"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlUserDefinedFunctions/userDefinedFunctionName"), // Properties: &armcosmos.SQLUserDefinedFunctionGetProperties{ // Resource: &armcosmos.SQLUserDefinedFunctionGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("userDefinedFunctionName"), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginDeleteSQLContainer ¶
func (client *SQLResourcesClient) BeginDeleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginDeleteSQLContainerOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLContainerResponse], error)
BeginDeleteSQLContainer - Deletes an existing Azure Cosmos DB SQL container. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientBeginDeleteSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLContainer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLContainer(ctx, "rg1", "ddb1", "databaseName", "containerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLDatabase ¶
func (client *SQLResourcesClient) BeginDeleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginDeleteSQLDatabaseOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLDatabaseResponse], error)
BeginDeleteSQLDatabase - Deletes an existing Azure Cosmos DB SQL database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientBeginDeleteSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLRoleAssignment ¶
func (client *SQLResourcesClient) BeginDeleteSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLRoleAssignmentResponse], error)
BeginDeleteSQLRoleAssignment - Deletes an existing Azure Cosmos DB SQL Role Assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleAssignmentID - The GUID for the Role Assignment.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleAssignment method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleAssignmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLRoleAssignment(ctx, "myRoleAssignmentId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLRoleDefinition ¶
func (client *SQLResourcesClient) BeginDeleteSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, options *SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLRoleDefinitionResponse], error)
BeginDeleteSQLRoleDefinition - Deletes an existing Azure Cosmos DB SQL Role Definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleDefinitionID - The GUID for the Role Definition.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleDefinitionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLRoleDefinition(ctx, "myRoleDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLStoredProcedure ¶
func (client *SQLResourcesClient) BeginDeleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, options *SQLResourcesClientBeginDeleteSQLStoredProcedureOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLStoredProcedureResponse], error)
BeginDeleteSQLStoredProcedure - Deletes an existing Azure Cosmos DB SQL storedProcedure. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- storedProcedureName - Cosmos DB storedProcedure name.
- options - SQLResourcesClientBeginDeleteSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLStoredProcedure method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlStoredProcedureDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLStoredProcedure(ctx, "rg1", "ddb1", "databaseName", "containerName", "storedProcedureName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLTrigger ¶
func (client *SQLResourcesClient) BeginDeleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, options *SQLResourcesClientBeginDeleteSQLTriggerOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLTriggerResponse], error)
BeginDeleteSQLTrigger - Deletes an existing Azure Cosmos DB SQL trigger. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- triggerName - Cosmos DB trigger name.
- options - SQLResourcesClientBeginDeleteSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLTrigger method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlTriggerDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLTrigger(ctx, "rg1", "ddb1", "databaseName", "containerName", "triggerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginDeleteSQLUserDefinedFunction ¶
func (client *SQLResourcesClient) BeginDeleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, options *SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions) (*runtime.Poller[SQLResourcesClientDeleteSQLUserDefinedFunctionResponse], error)
BeginDeleteSQLUserDefinedFunction - Deletes an existing Azure Cosmos DB SQL userDefinedFunction. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- userDefinedFunctionName - Cosmos DB userDefinedFunction name.
- options - SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLUserDefinedFunction method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlUserDefinedFunctionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginDeleteSQLUserDefinedFunction(ctx, "rg1", "ddb1", "databaseName", "containerName", "userDefinedFunctionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*SQLResourcesClient) BeginMigrateSQLContainerToAutoscale ¶
func (client *SQLResourcesClient) BeginMigrateSQLContainerToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions) (*runtime.Poller[SQLResourcesClientMigrateSQLContainerToAutoscaleResponse], error)
BeginMigrateSQLContainerToAutoscale - Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginMigrateSQLContainerToAutoscale(ctx, "rg1", "ddb1", "databaseName", "containerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginMigrateSQLContainerToManualThroughput ¶
func (client *SQLResourcesClient) BeginMigrateSQLContainerToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions) (*runtime.Poller[SQLResourcesClientMigrateSQLContainerToManualThroughputResponse], error)
BeginMigrateSQLContainerToManualThroughput - Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginMigrateSQLContainerToManualThroughput(ctx, "rg1", "ddb1", "databaseName", "containerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginMigrateSQLDatabaseToAutoscale ¶
func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToAutoscale(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions) (*runtime.Poller[SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse], error)
BeginMigrateSQLDatabaseToAutoscale - Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginMigrateSQLDatabaseToAutoscale(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginMigrateSQLDatabaseToManualThroughput ¶
func (client *SQLResourcesClient) BeginMigrateSQLDatabaseToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions) (*runtime.Poller[SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse], error)
BeginMigrateSQLDatabaseToManualThroughput - Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginMigrateSQLDatabaseToManualThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginRetrieveContinuousBackupInformation ¶
func (client *SQLResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, location ContinuousBackupRestoreLocation, options *SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*runtime.Poller[SQLResourcesClientRetrieveContinuousBackupInformationResponse], error)
BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a container resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- location - The name of the continuous backup restore location.
- options - SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the SQLResourcesClient.BeginRetrieveContinuousBackupInformation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerBackupInformation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginRetrieveContinuousBackupInformation(ctx, "rgName", "ddb1", "databaseName", "containerName", armcosmos.ContinuousBackupRestoreLocation{ Location: to.Ptr("North Europe"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupInformation = armcosmos.BackupInformation{ // ContinuousBackupInformation: &armcosmos.ContinuousBackupInformation{ // LatestRestorableTimestamp: to.Ptr("2021-02-05T02:40:50Z"), // }, // }
Output:
func (*SQLResourcesClient) BeginUpdateSQLContainerThroughput ¶
func (client *SQLResourcesClient) BeginUpdateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLContainerThroughputOptions) (*runtime.Poller[SQLResourcesClientUpdateSQLContainerThroughputResponse], error)
BeginUpdateSQLContainerThroughput - Update RUs per second of an Azure Cosmos DB SQL container If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- updateThroughputParameters - The parameters to provide for the RUs per second of the current SQL container.
- options - SQLResourcesClientBeginUpdateSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLContainerThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginUpdateSQLContainerThroughput(ctx, "rg1", "ddb1", "databaseName", "containerName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) BeginUpdateSQLDatabaseThroughput ¶
func (client *SQLResourcesClient) BeginUpdateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions) (*runtime.Poller[SQLResourcesClientUpdateSQLDatabaseThroughputResponse], error)
BeginUpdateSQLDatabaseThroughput - Update RUs per second of an Azure Cosmos DB SQL database If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- updateThroughputParameters - The parameters to provide for the RUs per second of the current SQL database.
- options - SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLResourcesClient().BeginUpdateSQLDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) GetClientEncryptionKey ¶ added in v2.2.0
func (client *SQLResourcesClient) GetClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, options *SQLResourcesClientGetClientEncryptionKeyOptions) (SQLResourcesClientGetClientEncryptionKeyResponse, error)
GetClientEncryptionKey - Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- clientEncryptionKeyName - Cosmos DB ClientEncryptionKey name.
- options - SQLResourcesClientGetClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.GetClientEncryptionKey method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlClientEncryptionKeyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetClientEncryptionKey(ctx, "rgName", "accountName", "databaseName", "cekName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClientEncryptionKeyGetResults = armcosmos.ClientEncryptionKeyGetResults{ // Name: to.Ptr("cekName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName"), // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // ID: to.Ptr("cekName"), // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ // Name: to.Ptr("customerManagedKey"), // Type: to.Ptr("AzureKeyVault"), // Algorithm: to.Ptr("RSA-OAEP"), // Value: to.Ptr("AzureKeyVault Key URL"), // }, // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), // Rid: to.Ptr("tNc4AAAAAAAQkjzWAgAAAA=="), // Ts: to.Ptr[float32](1626425552), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLContainer ¶
func (client *SQLResourcesClient) GetSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientGetSQLContainerOptions) (SQLResourcesClientGetSQLContainerResponse, error)
GetSQLContainer - Gets the SQL container under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientGetSQLContainerOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLContainer(ctx, "rgName", "ddb1", "databaseName", "containerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLContainerGetResults = armcosmos.SQLContainerGetResults{ // Name: to.Ptr("containerName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/containerName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLContainerGetProperties{ // Options: &armcosmos.SQLContainerGetPropertiesOptions{ // Throughput: to.Ptr[int32](400), // }, // Resource: &armcosmos.SQLContainerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ // { // Path: to.Ptr("/path"), // ClientEncryptionKeyID: to.Ptr("keyId"), // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // EncryptionType: to.Ptr("Deterministic"), // }}, // PolicyFormatVersion: to.Ptr[int32](1), // }, // ComputedProperties: []*armcosmos.ComputedProperty{ // { // Name: to.Ptr("cp_lowerName"), // Query: to.Ptr("SELECT VALUE LOWER(c.name) FROM c"), // }}, // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("containerName"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLContainerThroughput ¶
func (client *SQLResourcesClient) GetSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientGetSQLContainerThroughputOptions) (SQLResourcesClientGetSQLContainerThroughputResponse, error)
GetSQLContainerThroughput - Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientGetSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainerThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLContainerThroughput(ctx, "rg1", "ddb1", "databaseName", "containerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLDatabase ¶
func (client *SQLResourcesClient) GetSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientGetSQLDatabaseOptions) (SQLResourcesClientGetSQLDatabaseResponse, error)
GetSQLDatabase - Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientGetSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLDatabaseGetResults = armcosmos.SQLDatabaseGetResults{ // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLDatabaseGetProperties{ // Resource: &armcosmos.SQLDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // Colls: to.Ptr("colls/"), // Users: to.Ptr("users/"), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLDatabaseThroughput ¶
func (client *SQLResourcesClient) GetSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientGetSQLDatabaseThroughputOptions) (SQLResourcesClientGetSQLDatabaseThroughputResponse, error)
GetSQLDatabaseThroughput - Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientGetSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabaseThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLRoleAssignment ¶
func (client *SQLResourcesClient) GetSQLRoleAssignment(ctx context.Context, roleAssignmentID string, resourceGroupName string, accountName string, options *SQLResourcesClientGetSQLRoleAssignmentOptions) (SQLResourcesClientGetSQLRoleAssignmentResponse, error)
GetSQLRoleAssignment - Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment with the given Id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleAssignmentID - The GUID for the Role Assignment.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientGetSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleAssignment method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleAssignmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLRoleAssignment(ctx, "myRoleAssignmentId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLRoleAssignmentGetResults = armcosmos.SQLRoleAssignmentGetResults{ // Name: to.Ptr("myRoleAssignmentId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleAssignments/myRoleAssignmentId"), // Properties: &armcosmos.SQLRoleAssignmentResource{ // PrincipalID: to.Ptr("myPrincipalId"), // RoleDefinitionID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Scope: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases"), // }, // }
Output:
func (*SQLResourcesClient) GetSQLRoleDefinition ¶
func (client *SQLResourcesClient) GetSQLRoleDefinition(ctx context.Context, roleDefinitionID string, resourceGroupName string, accountName string, options *SQLResourcesClientGetSQLRoleDefinitionOptions) (SQLResourcesClientGetSQLRoleDefinitionResponse, error)
GetSQLRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- roleDefinitionID - The GUID for the Role Definition.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientGetSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleDefinition method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleDefinitionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLRoleDefinition(ctx, "myRoleDefinitionId", "myResourceGroupName", "myAccountName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLRoleDefinitionGetResults = armcosmos.SQLRoleDefinitionGetResults{ // Name: to.Ptr("myRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Properties: &armcosmos.SQLRoleDefinitionResource{ // Type: to.Ptr(armcosmos.RoleDefinitionTypeCustomRole), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales"), // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases")}, // Permissions: []*armcosmos.Permission{ // { // DataActions: []*string{ // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/create"), // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read")}, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("myRoleName"), // }, // }
Output:
func (*SQLResourcesClient) GetSQLStoredProcedure ¶
func (client *SQLResourcesClient) GetSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, options *SQLResourcesClientGetSQLStoredProcedureOptions) (SQLResourcesClientGetSQLStoredProcedureResponse, error)
GetSQLStoredProcedure - Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- storedProcedureName - Cosmos DB storedProcedure name.
- options - SQLResourcesClientGetSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.GetSQLStoredProcedure method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlStoredProcedureGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLStoredProcedure(ctx, "rgName", "ddb1", "databaseName", "containerName", "storedProcedureName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLStoredProcedureGetResults = armcosmos.SQLStoredProcedureGetResults{ // Name: to.Ptr("storedProcedureName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlStoredProcedures"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlStoredProcedures/storedProcedureName"), // Properties: &armcosmos.SQLStoredProcedureGetProperties{ // Resource: &armcosmos.SQLStoredProcedureGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("storedProcedureName"), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLTrigger ¶
func (client *SQLResourcesClient) GetSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, options *SQLResourcesClientGetSQLTriggerOptions) (SQLResourcesClientGetSQLTriggerResponse, error)
GetSQLTrigger - Gets the SQL trigger under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- triggerName - Cosmos DB trigger name.
- options - SQLResourcesClientGetSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.GetSQLTrigger method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlTriggerGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLTrigger(ctx, "rgName", "ddb1", "databaseName", "containerName", "triggerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLTriggerGetResults = armcosmos.SQLTriggerGetResults{ // Name: to.Ptr("triggerName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlTriggers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlTriggers/triggerName"), // Properties: &armcosmos.SQLTriggerGetProperties{ // Resource: &armcosmos.SQLTriggerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("triggerName"), // TriggerOperation: to.Ptr(armcosmos.TriggerOperation("triggerOperation")), // TriggerType: to.Ptr(armcosmos.TriggerType("triggerType")), // }, // }, // }
Output:
func (*SQLResourcesClient) GetSQLUserDefinedFunction ¶
func (client *SQLResourcesClient) GetSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, options *SQLResourcesClientGetSQLUserDefinedFunctionOptions) (SQLResourcesClientGetSQLUserDefinedFunctionResponse, error)
GetSQLUserDefinedFunction - Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- userDefinedFunctionName - Cosmos DB userDefinedFunction name.
- options - SQLResourcesClientGetSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.GetSQLUserDefinedFunction method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlUserDefinedFunctionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLResourcesClient().GetSQLUserDefinedFunction(ctx, "rgName", "ddb1", "databaseName", "containerName", "userDefinedFunctionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLUserDefinedFunctionGetResults = armcosmos.SQLUserDefinedFunctionGetResults{ // Name: to.Ptr("userDefinedFunctionName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlUserDefinedFunctions"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlUserDefinedFunctions/userDefinedFunctionName"), // Properties: &armcosmos.SQLUserDefinedFunctionGetProperties{ // Resource: &armcosmos.SQLUserDefinedFunctionGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("userDefinedFunctionName"), // }, // }, // }
Output:
func (*SQLResourcesClient) NewListClientEncryptionKeysPager ¶ added in v2.2.0
func (client *SQLResourcesClient) NewListClientEncryptionKeysPager(resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientListClientEncryptionKeysOptions) *runtime.Pager[SQLResourcesClientListClientEncryptionKeysResponse]
NewListClientEncryptionKeysPager - Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientListClientEncryptionKeysOptions contains the optional parameters for the SQLResourcesClient.NewListClientEncryptionKeysPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlClientEncryptionKeysList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListClientEncryptionKeysPager("rgName", "accountName", "databaseName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClientEncryptionKeysListResult = armcosmos.ClientEncryptionKeysListResult{ // Value: []*armcosmos.ClientEncryptionKeyGetResults{ // { // Name: to.Ptr("cekName1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName1"), // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // ID: to.Ptr("cekName1"), // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ // Name: to.Ptr("customerManagedKey1"), // Type: to.Ptr("AzureKeyVault"), // Algorithm: to.Ptr("RSA-OAEP"), // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey1"), // }, // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), // Etag: to.Ptr("00000000-0000-0000-7a1f-bc0828e801d7"), // Rid: to.Ptr("nAMyAAAAAADPw1kKAgAAAA=="), // Ts: to.Ptr[float32](1626425552), // }, // }, // }, // { // Name: to.Ptr("cekName2"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/clientEncryptionKey"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlDatabases/databaseName/clientEncryptionKeys/cekName2"), // Properties: &armcosmos.ClientEncryptionKeyGetProperties{ // Resource: &armcosmos.ClientEncryptionKeyGetPropertiesResource{ // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // ID: to.Ptr("cekName2"), // KeyWrapMetadata: &armcosmos.KeyWrapMetadata{ // Name: to.Ptr("customerManagedKey2"), // Type: to.Ptr("AzureKeyVault"), // Algorithm: to.Ptr("RSA-OAEP"), // Value: to.Ptr("AzureKeyVault Key URL for customerManagedKey2"), // }, // WrappedDataEncryptionKey: []byte("U3dhZ2dlciByb2Nrcw=="), // Etag: to.Ptr("00000000-0000-0000-7a21-7788a38c01d7"), // Rid: to.Ptr("nAMyAAAAAAAWWfxHAgAAAA=="), // Ts: to.Ptr[float32](1626425631), // }, // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLContainersPager ¶
func (client *SQLResourcesClient) NewListSQLContainersPager(resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientListSQLContainersOptions) *runtime.Pager[SQLResourcesClientListSQLContainersResponse]
NewListSQLContainersPager - Lists the SQL container under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- options - SQLResourcesClientListSQLContainersOptions contains the optional parameters for the SQLResourcesClient.NewListSQLContainersPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlContainerList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLContainersPager("rgName", "ddb1", "databaseName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLContainerListResult = armcosmos.SQLContainerListResult{ // Value: []*armcosmos.SQLContainerGetResults{ // { // Name: to.Ptr("containerName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/containerName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLContainerGetProperties{ // Resource: &armcosmos.SQLContainerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ // { // Path: to.Ptr("/path"), // ClientEncryptionKeyID: to.Ptr("keyId"), // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // EncryptionType: to.Ptr("Deterministic"), // }}, // PolicyFormatVersion: to.Ptr[int32](1), // }, // ComputedProperties: []*armcosmos.ComputedProperty{ // { // Name: to.Ptr("cp_lowerName"), // Query: to.Ptr("SELECT VALUE LOWER(c.name) FROM c"), // }}, // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("testctn"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/AccountNumber")}, // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }, // { // Name: to.Ptr("containerName1"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLContainerGetProperties{ // Resource: &armcosmos.SQLContainerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDiw="), // Ts: to.Ptr[float32](1459200611), // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ // { // Path: to.Ptr("/path"), // ClientEncryptionKeyID: to.Ptr("keyId"), // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // EncryptionType: to.Ptr("Deterministic"), // }}, // PolicyFormatVersion: to.Ptr[int32](1), // }, // ComputedProperties: []*armcosmos.ComputedProperty{ // }, // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("testctn1"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindMultiHash), // Paths: []*string{ // to.Ptr("/AccountNumber"), // to.Ptr("/AccountLocation")}, // Version: to.Ptr[int32](2), // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }, // { // Name: to.Ptr("containerName2"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName2"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLContainerGetProperties{ // Resource: &armcosmos.SQLContainerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDhw="), // Ts: to.Ptr[float32](1459200611), // ClientEncryptionPolicy: &armcosmos.ClientEncryptionPolicy{ // IncludedPaths: []*armcosmos.ClientEncryptionIncludedPath{ // { // Path: to.Ptr("/path"), // ClientEncryptionKeyID: to.Ptr("keyId"), // EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"), // EncryptionType: to.Ptr("Deterministic"), // }}, // PolicyFormatVersion: to.Ptr[int32](1), // }, // ConflictResolutionPolicy: &armcosmos.ConflictResolutionPolicy{ // ConflictResolutionPath: to.Ptr("/path"), // Mode: to.Ptr(armcosmos.ConflictResolutionModeLastWriterWins), // }, // DefaultTTL: to.Ptr[int32](100), // ID: to.Ptr("testctn2"), // IndexingPolicy: &armcosmos.IndexingPolicy{ // Automatic: to.Ptr(true), // ExcludedPaths: []*armcosmos.ExcludedPath{ // }, // IncludedPaths: []*armcosmos.IncludedPath{ // { // Path: to.Ptr("/*"), // Indexes: []*armcosmos.Indexes{ // { // DataType: to.Ptr(armcosmos.DataTypeString), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }, // { // DataType: to.Ptr(armcosmos.DataTypeNumber), // Kind: to.Ptr(armcosmos.IndexKindRange), // Precision: to.Ptr[int32](-1), // }}, // }}, // IndexingMode: to.Ptr(armcosmos.IndexingModeConsistent), // }, // PartitionKey: &armcosmos.ContainerPartitionKey{ // Kind: to.Ptr(armcosmos.PartitionKindHash), // Paths: []*string{ // to.Ptr("/_partitionKey")}, // SystemKey: to.Ptr(true), // Version: to.Ptr[int32](2), // }, // UniqueKeyPolicy: &armcosmos.UniqueKeyPolicy{ // UniqueKeys: []*armcosmos.UniqueKey{ // { // Paths: []*string{ // to.Ptr("/testPath")}, // }}, // }, // }, // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLDatabasesPager ¶
func (client *SQLResourcesClient) NewListSQLDatabasesPager(resourceGroupName string, accountName string, options *SQLResourcesClientListSQLDatabasesOptions) *runtime.Pager[SQLResourcesClientListSQLDatabasesResponse]
NewListSQLDatabasesPager - Lists the SQL databases under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientListSQLDatabasesOptions contains the optional parameters for the SQLResourcesClient.NewListSQLDatabasesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLDatabasesPager("rgName", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLDatabaseListResult = armcosmos.SQLDatabaseListResult{ // Value: []*armcosmos.SQLDatabaseGetResults{ // { // Name: to.Ptr("databaseName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.SQLDatabaseGetProperties{ // Resource: &armcosmos.SQLDatabaseGetPropertiesResource{ // Etag: to.Ptr("\"00000a00-0000-0000-0000-56672f920000\""), // Rid: to.Ptr("CqNBAA=="), // Ts: to.Ptr[float32](1449602962), // ID: to.Ptr("databaseName"), // Colls: to.Ptr("colls/"), // Users: to.Ptr("users/"), // }, // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLRoleAssignmentsPager ¶
func (client *SQLResourcesClient) NewListSQLRoleAssignmentsPager(resourceGroupName string, accountName string, options *SQLResourcesClientListSQLRoleAssignmentsOptions) *runtime.Pager[SQLResourcesClientListSQLRoleAssignmentsResponse]
NewListSQLRoleAssignmentsPager - Retrieves the list of all Azure Cosmos DB SQL Role Assignments.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientListSQLRoleAssignmentsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleAssignmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleAssignmentList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLRoleAssignmentsPager("myResourceGroupName", "myAccountName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLRoleAssignmentListResult = armcosmos.SQLRoleAssignmentListResult{ // Value: []*armcosmos.SQLRoleAssignmentGetResults{ // { // Name: to.Ptr("myRoleAssignmentId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleAssignments/myRoleAssignmentId"), // Properties: &armcosmos.SQLRoleAssignmentResource{ // PrincipalID: to.Ptr("myPrincipalId"), // RoleDefinitionID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Scope: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases"), // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLRoleDefinitionsPager ¶
func (client *SQLResourcesClient) NewListSQLRoleDefinitionsPager(resourceGroupName string, accountName string, options *SQLResourcesClientListSQLRoleDefinitionsOptions) *runtime.Pager[SQLResourcesClientListSQLRoleDefinitionsResponse]
NewListSQLRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB SQL Role Definitions.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - SQLResourcesClientListSQLRoleDefinitionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlRoleDefinitionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLRoleDefinitionsPager("myResourceGroupName", "myAccountName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLRoleDefinitionListResult = armcosmos.SQLRoleDefinitionListResult{ // Value: []*armcosmos.SQLRoleDefinitionGetResults{ // { // Name: to.Ptr("myRoleDefinitionId"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions"), // ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/sqlRoleDefinitions/myRoleDefinitionId"), // Properties: &armcosmos.SQLRoleDefinitionResource{ // Type: to.Ptr(armcosmos.RoleDefinitionTypeCustomRole), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/sales"), // to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases")}, // Permissions: []*armcosmos.Permission{ // { // DataActions: []*string{ // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/create"), // to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read")}, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("myRoleName"), // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLStoredProceduresPager ¶
func (client *SQLResourcesClient) NewListSQLStoredProceduresPager(resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientListSQLStoredProceduresOptions) *runtime.Pager[SQLResourcesClientListSQLStoredProceduresResponse]
NewListSQLStoredProceduresPager - Lists the SQL storedProcedure under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientListSQLStoredProceduresOptions contains the optional parameters for the SQLResourcesClient.NewListSQLStoredProceduresPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlStoredProcedureList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLStoredProceduresPager("rgName", "ddb1", "databaseName", "containerName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLStoredProcedureListResult = armcosmos.SQLStoredProcedureListResult{ // Value: []*armcosmos.SQLStoredProcedureGetResults{ // { // Name: to.Ptr("testctn"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlStoredProcedures"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlStoredProcedures/storedProcedureName"), // Properties: &armcosmos.SQLStoredProcedureGetProperties{ // Resource: &armcosmos.SQLStoredProcedureGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("testctn"), // }, // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLTriggersPager ¶
func (client *SQLResourcesClient) NewListSQLTriggersPager(resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientListSQLTriggersOptions) *runtime.Pager[SQLResourcesClientListSQLTriggersResponse]
NewListSQLTriggersPager - Lists the SQL trigger under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientListSQLTriggersOptions contains the optional parameters for the SQLResourcesClient.NewListSQLTriggersPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlTriggerList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLTriggersPager("rgName", "ddb1", "databaseName", "containerName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLTriggerListResult = armcosmos.SQLTriggerListResult{ // Value: []*armcosmos.SQLTriggerGetResults{ // { // Name: to.Ptr("testctn"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlTriggers"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlTriggers/triggerName"), // Properties: &armcosmos.SQLTriggerGetProperties{ // Resource: &armcosmos.SQLTriggerGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("testctn"), // TriggerOperation: to.Ptr(armcosmos.TriggerOperation("triggerOperation")), // TriggerType: to.Ptr(armcosmos.TriggerType("triggerType")), // }, // }, // }}, // } }
Output:
func (*SQLResourcesClient) NewListSQLUserDefinedFunctionsPager ¶
func (client *SQLResourcesClient) NewListSQLUserDefinedFunctionsPager(resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientListSQLUserDefinedFunctionsOptions) *runtime.Pager[SQLResourcesClientListSQLUserDefinedFunctionsResponse]
NewListSQLUserDefinedFunctionsPager - Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- databaseName - Cosmos DB database name.
- containerName - Cosmos DB container name.
- options - SQLResourcesClientListSQLUserDefinedFunctionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLUserDefinedFunctionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlUserDefinedFunctionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLResourcesClient().NewListSQLUserDefinedFunctionsPager("rgName", "ddb1", "databaseName", "containerName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLUserDefinedFunctionListResult = armcosmos.SQLUserDefinedFunctionListResult{ // Value: []*armcosmos.SQLUserDefinedFunctionGetResults{ // { // Name: to.Ptr("testctn"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers/sqlUserDefinedFunctions"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlUserDefinedFunctions/userDefinedFunctionName"), // Properties: &armcosmos.SQLUserDefinedFunctionGetProperties{ // Resource: &armcosmos.SQLUserDefinedFunctionGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // Body: to.Ptr("body"), // ID: to.Ptr("testctn"), // }, // }, // }}, // } }
Output:
type SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions ¶ added in v2.2.0
type SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateClientEncryptionKey method.
type SQLResourcesClientBeginCreateUpdateSQLContainerOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLContainerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLContainer method.
type SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLDatabase method.
type SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment method.
type SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition method.
type SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure method.
type SQLResourcesClientBeginCreateUpdateSQLTriggerOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLTriggerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLTrigger method.
type SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions ¶
type SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction method.
type SQLResourcesClientBeginDeleteSQLContainerOptions ¶
type SQLResourcesClientBeginDeleteSQLContainerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLContainer method.
type SQLResourcesClientBeginDeleteSQLDatabaseOptions ¶
type SQLResourcesClientBeginDeleteSQLDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLDatabase method.
type SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions ¶
type SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleAssignment method.
type SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions ¶
type SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleDefinition method.
type SQLResourcesClientBeginDeleteSQLStoredProcedureOptions ¶
type SQLResourcesClientBeginDeleteSQLStoredProcedureOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLStoredProcedure method.
type SQLResourcesClientBeginDeleteSQLTriggerOptions ¶
type SQLResourcesClientBeginDeleteSQLTriggerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLTrigger method.
type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions ¶
type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLUserDefinedFunction method.
type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions ¶
type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToAutoscale method.
type SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions ¶
type SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput method.
type SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions ¶
type SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale method.
type SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions ¶
type SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput method.
type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶
type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the SQLResourcesClient.BeginRetrieveContinuousBackupInformation method.
type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions ¶
type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginUpdateSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLContainerThroughput method.
type SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions ¶
type SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLDatabaseThroughput method.
type SQLResourcesClientCreateUpdateClientEncryptionKeyResponse ¶ added in v2.2.0
type SQLResourcesClientCreateUpdateClientEncryptionKeyResponse struct { // Client Encryption Key. ClientEncryptionKeyGetResults }
SQLResourcesClientCreateUpdateClientEncryptionKeyResponse contains the response from method SQLResourcesClient.BeginCreateUpdateClientEncryptionKey.
type SQLResourcesClientCreateUpdateSQLContainerResponse ¶
type SQLResourcesClientCreateUpdateSQLContainerResponse struct { // An Azure Cosmos DB container. SQLContainerGetResults }
SQLResourcesClientCreateUpdateSQLContainerResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLContainer.
type SQLResourcesClientCreateUpdateSQLDatabaseResponse ¶
type SQLResourcesClientCreateUpdateSQLDatabaseResponse struct { // An Azure Cosmos DB SQL database. SQLDatabaseGetResults }
SQLResourcesClientCreateUpdateSQLDatabaseResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLDatabase.
type SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse ¶
type SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse struct { // An Azure Cosmos DB Role Assignment SQLRoleAssignmentGetResults }
SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment.
type SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse ¶
type SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse struct { // An Azure Cosmos DB SQL Role Definition. SQLRoleDefinitionGetResults }
SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition.
type SQLResourcesClientCreateUpdateSQLStoredProcedureResponse ¶
type SQLResourcesClientCreateUpdateSQLStoredProcedureResponse struct { // An Azure Cosmos DB storedProcedure. SQLStoredProcedureGetResults }
SQLResourcesClientCreateUpdateSQLStoredProcedureResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure.
type SQLResourcesClientCreateUpdateSQLTriggerResponse ¶
type SQLResourcesClientCreateUpdateSQLTriggerResponse struct { // An Azure Cosmos DB trigger. SQLTriggerGetResults }
SQLResourcesClientCreateUpdateSQLTriggerResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLTrigger.
type SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse ¶
type SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse struct { // An Azure Cosmos DB userDefinedFunction. SQLUserDefinedFunctionGetResults }
SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction.
type SQLResourcesClientDeleteSQLContainerResponse ¶
type SQLResourcesClientDeleteSQLContainerResponse struct { }
SQLResourcesClientDeleteSQLContainerResponse contains the response from method SQLResourcesClient.BeginDeleteSQLContainer.
type SQLResourcesClientDeleteSQLDatabaseResponse ¶
type SQLResourcesClientDeleteSQLDatabaseResponse struct { }
SQLResourcesClientDeleteSQLDatabaseResponse contains the response from method SQLResourcesClient.BeginDeleteSQLDatabase.
type SQLResourcesClientDeleteSQLRoleAssignmentResponse ¶
type SQLResourcesClientDeleteSQLRoleAssignmentResponse struct { }
SQLResourcesClientDeleteSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.BeginDeleteSQLRoleAssignment.
type SQLResourcesClientDeleteSQLRoleDefinitionResponse ¶
type SQLResourcesClientDeleteSQLRoleDefinitionResponse struct { }
SQLResourcesClientDeleteSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.BeginDeleteSQLRoleDefinition.
type SQLResourcesClientDeleteSQLStoredProcedureResponse ¶
type SQLResourcesClientDeleteSQLStoredProcedureResponse struct { }
SQLResourcesClientDeleteSQLStoredProcedureResponse contains the response from method SQLResourcesClient.BeginDeleteSQLStoredProcedure.
type SQLResourcesClientDeleteSQLTriggerResponse ¶
type SQLResourcesClientDeleteSQLTriggerResponse struct { }
SQLResourcesClientDeleteSQLTriggerResponse contains the response from method SQLResourcesClient.BeginDeleteSQLTrigger.
type SQLResourcesClientDeleteSQLUserDefinedFunctionResponse ¶
type SQLResourcesClientDeleteSQLUserDefinedFunctionResponse struct { }
SQLResourcesClientDeleteSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.BeginDeleteSQLUserDefinedFunction.
type SQLResourcesClientGetClientEncryptionKeyOptions ¶ added in v2.2.0
type SQLResourcesClientGetClientEncryptionKeyOptions struct { }
SQLResourcesClientGetClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.GetClientEncryptionKey method.
type SQLResourcesClientGetClientEncryptionKeyResponse ¶ added in v2.2.0
type SQLResourcesClientGetClientEncryptionKeyResponse struct { // Client Encryption Key. ClientEncryptionKeyGetResults }
SQLResourcesClientGetClientEncryptionKeyResponse contains the response from method SQLResourcesClient.GetClientEncryptionKey.
type SQLResourcesClientGetSQLContainerOptions ¶
type SQLResourcesClientGetSQLContainerOptions struct { }
SQLResourcesClientGetSQLContainerOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainer method.
type SQLResourcesClientGetSQLContainerResponse ¶
type SQLResourcesClientGetSQLContainerResponse struct { // An Azure Cosmos DB container. SQLContainerGetResults }
SQLResourcesClientGetSQLContainerResponse contains the response from method SQLResourcesClient.GetSQLContainer.
type SQLResourcesClientGetSQLContainerThroughputOptions ¶
type SQLResourcesClientGetSQLContainerThroughputOptions struct { }
SQLResourcesClientGetSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainerThroughput method.
type SQLResourcesClientGetSQLContainerThroughputResponse ¶
type SQLResourcesClientGetSQLContainerThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientGetSQLContainerThroughputResponse contains the response from method SQLResourcesClient.GetSQLContainerThroughput.
type SQLResourcesClientGetSQLDatabaseOptions ¶
type SQLResourcesClientGetSQLDatabaseOptions struct { }
SQLResourcesClientGetSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabase method.
type SQLResourcesClientGetSQLDatabaseResponse ¶
type SQLResourcesClientGetSQLDatabaseResponse struct { // An Azure Cosmos DB SQL database. SQLDatabaseGetResults }
SQLResourcesClientGetSQLDatabaseResponse contains the response from method SQLResourcesClient.GetSQLDatabase.
type SQLResourcesClientGetSQLDatabaseThroughputOptions ¶
type SQLResourcesClientGetSQLDatabaseThroughputOptions struct { }
SQLResourcesClientGetSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabaseThroughput method.
type SQLResourcesClientGetSQLDatabaseThroughputResponse ¶
type SQLResourcesClientGetSQLDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientGetSQLDatabaseThroughputResponse contains the response from method SQLResourcesClient.GetSQLDatabaseThroughput.
type SQLResourcesClientGetSQLRoleAssignmentOptions ¶
type SQLResourcesClientGetSQLRoleAssignmentOptions struct { }
SQLResourcesClientGetSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleAssignment method.
type SQLResourcesClientGetSQLRoleAssignmentResponse ¶
type SQLResourcesClientGetSQLRoleAssignmentResponse struct { // An Azure Cosmos DB Role Assignment SQLRoleAssignmentGetResults }
SQLResourcesClientGetSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.GetSQLRoleAssignment.
type SQLResourcesClientGetSQLRoleDefinitionOptions ¶
type SQLResourcesClientGetSQLRoleDefinitionOptions struct { }
SQLResourcesClientGetSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleDefinition method.
type SQLResourcesClientGetSQLRoleDefinitionResponse ¶
type SQLResourcesClientGetSQLRoleDefinitionResponse struct { // An Azure Cosmos DB SQL Role Definition. SQLRoleDefinitionGetResults }
SQLResourcesClientGetSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.GetSQLRoleDefinition.
type SQLResourcesClientGetSQLStoredProcedureOptions ¶
type SQLResourcesClientGetSQLStoredProcedureOptions struct { }
SQLResourcesClientGetSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.GetSQLStoredProcedure method.
type SQLResourcesClientGetSQLStoredProcedureResponse ¶
type SQLResourcesClientGetSQLStoredProcedureResponse struct { // An Azure Cosmos DB storedProcedure. SQLStoredProcedureGetResults }
SQLResourcesClientGetSQLStoredProcedureResponse contains the response from method SQLResourcesClient.GetSQLStoredProcedure.
type SQLResourcesClientGetSQLTriggerOptions ¶
type SQLResourcesClientGetSQLTriggerOptions struct { }
SQLResourcesClientGetSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.GetSQLTrigger method.
type SQLResourcesClientGetSQLTriggerResponse ¶
type SQLResourcesClientGetSQLTriggerResponse struct { // An Azure Cosmos DB trigger. SQLTriggerGetResults }
SQLResourcesClientGetSQLTriggerResponse contains the response from method SQLResourcesClient.GetSQLTrigger.
type SQLResourcesClientGetSQLUserDefinedFunctionOptions ¶
type SQLResourcesClientGetSQLUserDefinedFunctionOptions struct { }
SQLResourcesClientGetSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.GetSQLUserDefinedFunction method.
type SQLResourcesClientGetSQLUserDefinedFunctionResponse ¶
type SQLResourcesClientGetSQLUserDefinedFunctionResponse struct { // An Azure Cosmos DB userDefinedFunction. SQLUserDefinedFunctionGetResults }
SQLResourcesClientGetSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.GetSQLUserDefinedFunction.
type SQLResourcesClientListClientEncryptionKeysOptions ¶ added in v2.2.0
type SQLResourcesClientListClientEncryptionKeysOptions struct { }
SQLResourcesClientListClientEncryptionKeysOptions contains the optional parameters for the SQLResourcesClient.NewListClientEncryptionKeysPager method.
type SQLResourcesClientListClientEncryptionKeysResponse ¶ added in v2.2.0
type SQLResourcesClientListClientEncryptionKeysResponse struct { // The List operation response, that contains the client encryption keys and their properties. ClientEncryptionKeysListResult }
SQLResourcesClientListClientEncryptionKeysResponse contains the response from method SQLResourcesClient.NewListClientEncryptionKeysPager.
type SQLResourcesClientListSQLContainersOptions ¶
type SQLResourcesClientListSQLContainersOptions struct { }
SQLResourcesClientListSQLContainersOptions contains the optional parameters for the SQLResourcesClient.NewListSQLContainersPager method.
type SQLResourcesClientListSQLContainersResponse ¶
type SQLResourcesClientListSQLContainersResponse struct { // The List operation response, that contains the containers and their properties. SQLContainerListResult }
SQLResourcesClientListSQLContainersResponse contains the response from method SQLResourcesClient.NewListSQLContainersPager.
type SQLResourcesClientListSQLDatabasesOptions ¶
type SQLResourcesClientListSQLDatabasesOptions struct { }
SQLResourcesClientListSQLDatabasesOptions contains the optional parameters for the SQLResourcesClient.NewListSQLDatabasesPager method.
type SQLResourcesClientListSQLDatabasesResponse ¶
type SQLResourcesClientListSQLDatabasesResponse struct { // The List operation response, that contains the SQL databases and their properties. SQLDatabaseListResult }
SQLResourcesClientListSQLDatabasesResponse contains the response from method SQLResourcesClient.NewListSQLDatabasesPager.
type SQLResourcesClientListSQLRoleAssignmentsOptions ¶
type SQLResourcesClientListSQLRoleAssignmentsOptions struct { }
SQLResourcesClientListSQLRoleAssignmentsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleAssignmentsPager method.
type SQLResourcesClientListSQLRoleAssignmentsResponse ¶
type SQLResourcesClientListSQLRoleAssignmentsResponse struct { // The relevant Role Assignments. SQLRoleAssignmentListResult }
SQLResourcesClientListSQLRoleAssignmentsResponse contains the response from method SQLResourcesClient.NewListSQLRoleAssignmentsPager.
type SQLResourcesClientListSQLRoleDefinitionsOptions ¶
type SQLResourcesClientListSQLRoleDefinitionsOptions struct { }
SQLResourcesClientListSQLRoleDefinitionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLRoleDefinitionsPager method.
type SQLResourcesClientListSQLRoleDefinitionsResponse ¶
type SQLResourcesClientListSQLRoleDefinitionsResponse struct { // The relevant Role Definitions. SQLRoleDefinitionListResult }
SQLResourcesClientListSQLRoleDefinitionsResponse contains the response from method SQLResourcesClient.NewListSQLRoleDefinitionsPager.
type SQLResourcesClientListSQLStoredProceduresOptions ¶
type SQLResourcesClientListSQLStoredProceduresOptions struct { }
SQLResourcesClientListSQLStoredProceduresOptions contains the optional parameters for the SQLResourcesClient.NewListSQLStoredProceduresPager method.
type SQLResourcesClientListSQLStoredProceduresResponse ¶
type SQLResourcesClientListSQLStoredProceduresResponse struct { // The List operation response, that contains the storedProcedures and their properties. SQLStoredProcedureListResult }
SQLResourcesClientListSQLStoredProceduresResponse contains the response from method SQLResourcesClient.NewListSQLStoredProceduresPager.
type SQLResourcesClientListSQLTriggersOptions ¶
type SQLResourcesClientListSQLTriggersOptions struct { }
SQLResourcesClientListSQLTriggersOptions contains the optional parameters for the SQLResourcesClient.NewListSQLTriggersPager method.
type SQLResourcesClientListSQLTriggersResponse ¶
type SQLResourcesClientListSQLTriggersResponse struct { // The List operation response, that contains the triggers and their properties. SQLTriggerListResult }
SQLResourcesClientListSQLTriggersResponse contains the response from method SQLResourcesClient.NewListSQLTriggersPager.
type SQLResourcesClientListSQLUserDefinedFunctionsOptions ¶
type SQLResourcesClientListSQLUserDefinedFunctionsOptions struct { }
SQLResourcesClientListSQLUserDefinedFunctionsOptions contains the optional parameters for the SQLResourcesClient.NewListSQLUserDefinedFunctionsPager method.
type SQLResourcesClientListSQLUserDefinedFunctionsResponse ¶
type SQLResourcesClientListSQLUserDefinedFunctionsResponse struct { // The List operation response, that contains the userDefinedFunctions and their properties. SQLUserDefinedFunctionListResult }
SQLResourcesClientListSQLUserDefinedFunctionsResponse contains the response from method SQLResourcesClient.NewListSQLUserDefinedFunctionsPager.
type SQLResourcesClientMigrateSQLContainerToAutoscaleResponse ¶
type SQLResourcesClientMigrateSQLContainerToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientMigrateSQLContainerToAutoscaleResponse contains the response from method SQLResourcesClient.BeginMigrateSQLContainerToAutoscale.
type SQLResourcesClientMigrateSQLContainerToManualThroughputResponse ¶
type SQLResourcesClientMigrateSQLContainerToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientMigrateSQLContainerToManualThroughputResponse contains the response from method SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput.
type SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse ¶
type SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse contains the response from method SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale.
type SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse ¶
type SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse contains the response from method SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput.
type SQLResourcesClientRetrieveContinuousBackupInformationResponse ¶
type SQLResourcesClientRetrieveContinuousBackupInformationResponse struct { // Backup information of a resource. BackupInformation }
SQLResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method SQLResourcesClient.BeginRetrieveContinuousBackupInformation.
type SQLResourcesClientUpdateSQLContainerThroughputResponse ¶
type SQLResourcesClientUpdateSQLContainerThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientUpdateSQLContainerThroughputResponse contains the response from method SQLResourcesClient.BeginUpdateSQLContainerThroughput.
type SQLResourcesClientUpdateSQLDatabaseThroughputResponse ¶
type SQLResourcesClientUpdateSQLDatabaseThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
SQLResourcesClientUpdateSQLDatabaseThroughputResponse contains the response from method SQLResourcesClient.BeginUpdateSQLDatabaseThroughput.
type SQLRoleAssignmentCreateUpdateParameters ¶
type SQLRoleAssignmentCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB SQL Role Assignment. Properties *SQLRoleAssignmentResource }
SQLRoleAssignmentCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB SQL Role Assignment.
func (SQLRoleAssignmentCreateUpdateParameters) MarshalJSON ¶
func (s SQLRoleAssignmentCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleAssignmentCreateUpdateParameters.
func (*SQLRoleAssignmentCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLRoleAssignmentCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleAssignmentCreateUpdateParameters.
type SQLRoleAssignmentGetResults ¶
type SQLRoleAssignmentGetResults struct { // Properties related to the Role Assignment. Properties *SQLRoleAssignmentResource // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLRoleAssignmentGetResults - An Azure Cosmos DB Role Assignment
func (SQLRoleAssignmentGetResults) MarshalJSON ¶
func (s SQLRoleAssignmentGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleAssignmentGetResults.
func (*SQLRoleAssignmentGetResults) UnmarshalJSON ¶
func (s *SQLRoleAssignmentGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleAssignmentGetResults.
type SQLRoleAssignmentListResult ¶
type SQLRoleAssignmentListResult struct { // READ-ONLY; List of Role Assignments and their properties Value []*SQLRoleAssignmentGetResults }
SQLRoleAssignmentListResult - The relevant Role Assignments.
func (SQLRoleAssignmentListResult) MarshalJSON ¶
func (s SQLRoleAssignmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleAssignmentListResult.
func (*SQLRoleAssignmentListResult) UnmarshalJSON ¶
func (s *SQLRoleAssignmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleAssignmentListResult.
type SQLRoleAssignmentResource ¶
type SQLRoleAssignmentResource struct { // The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role // Assignment. Tenant ID for the principal is inferred using the tenant // associated with the subscription. PrincipalID *string // The unique identifier for the associated Role Definition. RoleDefinitionID *string // The data plane resource path for which access is being granted through this Role Assignment. Scope *string }
SQLRoleAssignmentResource - Azure Cosmos DB SQL Role Assignment resource object.
func (SQLRoleAssignmentResource) MarshalJSON ¶
func (s SQLRoleAssignmentResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleAssignmentResource.
func (*SQLRoleAssignmentResource) UnmarshalJSON ¶
func (s *SQLRoleAssignmentResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleAssignmentResource.
type SQLRoleDefinitionCreateUpdateParameters ¶
type SQLRoleDefinitionCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB SQL Role Definition. Properties *SQLRoleDefinitionResource }
SQLRoleDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB SQL Role Definition.
func (SQLRoleDefinitionCreateUpdateParameters) MarshalJSON ¶
func (s SQLRoleDefinitionCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleDefinitionCreateUpdateParameters.
func (*SQLRoleDefinitionCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLRoleDefinitionCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleDefinitionCreateUpdateParameters.
type SQLRoleDefinitionGetResults ¶
type SQLRoleDefinitionGetResults struct { // Properties related to the Role Definition. Properties *SQLRoleDefinitionResource // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLRoleDefinitionGetResults - An Azure Cosmos DB SQL Role Definition.
func (SQLRoleDefinitionGetResults) MarshalJSON ¶
func (s SQLRoleDefinitionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleDefinitionGetResults.
func (*SQLRoleDefinitionGetResults) UnmarshalJSON ¶
func (s *SQLRoleDefinitionGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleDefinitionGetResults.
type SQLRoleDefinitionListResult ¶
type SQLRoleDefinitionListResult struct { // READ-ONLY; List of Role Definitions and their properties. Value []*SQLRoleDefinitionGetResults }
SQLRoleDefinitionListResult - The relevant Role Definitions.
func (SQLRoleDefinitionListResult) MarshalJSON ¶
func (s SQLRoleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleDefinitionListResult.
func (*SQLRoleDefinitionListResult) UnmarshalJSON ¶
func (s *SQLRoleDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleDefinitionListResult.
type SQLRoleDefinitionResource ¶
type SQLRoleDefinitionResource struct { // A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will // allow application of this Role Definition on the entire database account or any // underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable // as assignable Scopes. Note that resources referenced in assignable Scopes need // not exist. AssignableScopes []*string // The set of operations allowed through this Role Definition. Permissions []*Permission // A user-friendly name for the Role Definition. Must be unique for the database account. RoleName *string // Indicates whether the Role Definition was built-in or user created. Type *RoleDefinitionType }
SQLRoleDefinitionResource - Azure Cosmos DB SQL Role Definition resource object.
func (SQLRoleDefinitionResource) MarshalJSON ¶
func (s SQLRoleDefinitionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLRoleDefinitionResource.
func (*SQLRoleDefinitionResource) UnmarshalJSON ¶
func (s *SQLRoleDefinitionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLRoleDefinitionResource.
type SQLStoredProcedureCreateUpdateParameters ¶
type SQLStoredProcedureCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB storedProcedure. Properties *SQLStoredProcedureCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLStoredProcedureCreateUpdateParameters - Parameters to create and update Cosmos DB storedProcedure.
func (SQLStoredProcedureCreateUpdateParameters) MarshalJSON ¶
func (s SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureCreateUpdateParameters.
func (*SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureCreateUpdateParameters.
type SQLStoredProcedureCreateUpdateProperties ¶
type SQLStoredProcedureCreateUpdateProperties struct { // REQUIRED; 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 }
SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure.
func (SQLStoredProcedureCreateUpdateProperties) MarshalJSON ¶
func (s SQLStoredProcedureCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureCreateUpdateProperties.
func (*SQLStoredProcedureCreateUpdateProperties) UnmarshalJSON ¶
func (s *SQLStoredProcedureCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureCreateUpdateProperties.
type SQLStoredProcedureGetProperties ¶
type SQLStoredProcedureGetProperties struct {
Resource *SQLStoredProcedureGetPropertiesResource
}
SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB StoredProcedure
func (SQLStoredProcedureGetProperties) MarshalJSON ¶
func (s SQLStoredProcedureGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureGetProperties.
func (*SQLStoredProcedureGetProperties) UnmarshalJSON ¶
func (s *SQLStoredProcedureGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureGetProperties.
type SQLStoredProcedureGetPropertiesResource ¶
type SQLStoredProcedureGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL storedProcedure ID *string // Body of the Stored Procedure Body *string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (SQLStoredProcedureGetPropertiesResource) MarshalJSON ¶
func (s SQLStoredProcedureGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureGetPropertiesResource.
func (*SQLStoredProcedureGetPropertiesResource) UnmarshalJSON ¶
func (s *SQLStoredProcedureGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureGetPropertiesResource.
type SQLStoredProcedureGetResults ¶
type SQLStoredProcedureGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB storedProcedure Properties *SQLStoredProcedureGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLStoredProcedureGetResults - An Azure Cosmos DB storedProcedure.
func (SQLStoredProcedureGetResults) MarshalJSON ¶
func (s SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureGetResults.
func (*SQLStoredProcedureGetResults) UnmarshalJSON ¶
func (s *SQLStoredProcedureGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureGetResults.
type SQLStoredProcedureListResult ¶
type SQLStoredProcedureListResult struct { // READ-ONLY; List of storedProcedures and their properties. Value []*SQLStoredProcedureGetResults }
SQLStoredProcedureListResult - The List operation response, that contains the storedProcedures and their properties.
func (SQLStoredProcedureListResult) MarshalJSON ¶
func (s SQLStoredProcedureListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureListResult.
func (*SQLStoredProcedureListResult) UnmarshalJSON ¶
func (s *SQLStoredProcedureListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureListResult.
type SQLStoredProcedureResource ¶
type SQLStoredProcedureResource struct { // REQUIRED; Name of the Cosmos DB SQL storedProcedure ID *string // Body of the Stored Procedure Body *string }
SQLStoredProcedureResource - Cosmos DB SQL storedProcedure resource object
func (SQLStoredProcedureResource) MarshalJSON ¶
func (s SQLStoredProcedureResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureResource.
func (*SQLStoredProcedureResource) UnmarshalJSON ¶
func (s *SQLStoredProcedureResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLStoredProcedureResource.
type SQLTriggerCreateUpdateParameters ¶
type SQLTriggerCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB trigger. Properties *SQLTriggerCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLTriggerCreateUpdateParameters - Parameters to create and update Cosmos DB trigger.
func (SQLTriggerCreateUpdateParameters) MarshalJSON ¶
func (s SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerCreateUpdateParameters.
func (*SQLTriggerCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLTriggerCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerCreateUpdateParameters.
type SQLTriggerCreateUpdateProperties ¶
type SQLTriggerCreateUpdateProperties struct { // REQUIRED; 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 }
SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger.
func (SQLTriggerCreateUpdateProperties) MarshalJSON ¶
func (s SQLTriggerCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerCreateUpdateProperties.
func (*SQLTriggerCreateUpdateProperties) UnmarshalJSON ¶
func (s *SQLTriggerCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerCreateUpdateProperties.
type SQLTriggerGetProperties ¶
type SQLTriggerGetProperties struct {
Resource *SQLTriggerGetPropertiesResource
}
SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger
func (SQLTriggerGetProperties) MarshalJSON ¶
func (s SQLTriggerGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerGetProperties.
func (*SQLTriggerGetProperties) UnmarshalJSON ¶
func (s *SQLTriggerGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerGetProperties.
type SQLTriggerGetPropertiesResource ¶
type SQLTriggerGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL trigger ID *string // Body of the Trigger Body *string // The operation the trigger is associated with TriggerOperation *TriggerOperation // Type of the Trigger TriggerType *TriggerType // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (SQLTriggerGetPropertiesResource) MarshalJSON ¶
func (s SQLTriggerGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerGetPropertiesResource.
func (*SQLTriggerGetPropertiesResource) UnmarshalJSON ¶
func (s *SQLTriggerGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerGetPropertiesResource.
type SQLTriggerGetResults ¶
type SQLTriggerGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB trigger Properties *SQLTriggerGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLTriggerGetResults - An Azure Cosmos DB trigger.
func (SQLTriggerGetResults) MarshalJSON ¶
func (s SQLTriggerGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerGetResults.
func (*SQLTriggerGetResults) UnmarshalJSON ¶
func (s *SQLTriggerGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerGetResults.
type SQLTriggerListResult ¶
type SQLTriggerListResult struct { // READ-ONLY; List of triggers and their properties. Value []*SQLTriggerGetResults }
SQLTriggerListResult - The List operation response, that contains the triggers and their properties.
func (SQLTriggerListResult) MarshalJSON ¶
func (s SQLTriggerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerListResult.
func (*SQLTriggerListResult) UnmarshalJSON ¶
func (s *SQLTriggerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerListResult.
type SQLTriggerResource ¶
type SQLTriggerResource struct { // REQUIRED; Name of the Cosmos DB SQL trigger ID *string // Body of the Trigger Body *string // The operation the trigger is associated with TriggerOperation *TriggerOperation // Type of the Trigger TriggerType *TriggerType }
SQLTriggerResource - Cosmos DB SQL trigger resource object
func (SQLTriggerResource) MarshalJSON ¶
func (s SQLTriggerResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerResource.
func (*SQLTriggerResource) UnmarshalJSON ¶
func (s *SQLTriggerResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLTriggerResource.
type SQLUserDefinedFunctionCreateUpdateParameters ¶
type SQLUserDefinedFunctionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB userDefinedFunction. Properties *SQLUserDefinedFunctionCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLUserDefinedFunctionCreateUpdateParameters - Parameters to create and update Cosmos DB userDefinedFunction.
func (SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON ¶
func (s SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionCreateUpdateParameters.
func (*SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionCreateUpdateParameters.
type SQLUserDefinedFunctionCreateUpdateProperties ¶
type SQLUserDefinedFunctionCreateUpdateProperties struct { // REQUIRED; 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 }
SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction.
func (SQLUserDefinedFunctionCreateUpdateProperties) MarshalJSON ¶
func (s SQLUserDefinedFunctionCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionCreateUpdateProperties.
func (*SQLUserDefinedFunctionCreateUpdateProperties) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionCreateUpdateProperties.
type SQLUserDefinedFunctionGetProperties ¶
type SQLUserDefinedFunctionGetProperties struct {
Resource *SQLUserDefinedFunctionGetPropertiesResource
}
SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction
func (SQLUserDefinedFunctionGetProperties) MarshalJSON ¶
func (s SQLUserDefinedFunctionGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionGetProperties.
func (*SQLUserDefinedFunctionGetProperties) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionGetProperties.
type SQLUserDefinedFunctionGetPropertiesResource ¶
type SQLUserDefinedFunctionGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL userDefinedFunction ID *string // Body of the User Defined Function Body *string // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (SQLUserDefinedFunctionGetPropertiesResource) MarshalJSON ¶
func (s SQLUserDefinedFunctionGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionGetPropertiesResource.
func (*SQLUserDefinedFunctionGetPropertiesResource) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionGetPropertiesResource.
type SQLUserDefinedFunctionGetResults ¶
type SQLUserDefinedFunctionGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB userDefinedFunction Properties *SQLUserDefinedFunctionGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
SQLUserDefinedFunctionGetResults - An Azure Cosmos DB userDefinedFunction.
func (SQLUserDefinedFunctionGetResults) MarshalJSON ¶
func (s SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionGetResults.
func (*SQLUserDefinedFunctionGetResults) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionGetResults.
type SQLUserDefinedFunctionListResult ¶
type SQLUserDefinedFunctionListResult struct { // READ-ONLY; List of userDefinedFunctions and their properties. Value []*SQLUserDefinedFunctionGetResults }
SQLUserDefinedFunctionListResult - The List operation response, that contains the userDefinedFunctions and their properties.
func (SQLUserDefinedFunctionListResult) MarshalJSON ¶
func (s SQLUserDefinedFunctionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionListResult.
func (*SQLUserDefinedFunctionListResult) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionListResult.
type SQLUserDefinedFunctionResource ¶
type SQLUserDefinedFunctionResource struct { // REQUIRED; Name of the Cosmos DB SQL userDefinedFunction ID *string // Body of the User Defined Function Body *string }
SQLUserDefinedFunctionResource - Cosmos DB SQL userDefinedFunction resource object
func (SQLUserDefinedFunctionResource) MarshalJSON ¶
func (s SQLUserDefinedFunctionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionResource.
func (*SQLUserDefinedFunctionResource) UnmarshalJSON ¶
func (s *SQLUserDefinedFunctionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLUserDefinedFunctionResource.
type SeedNode ¶
type SeedNode struct { // IP address of this seed node. IPAddress *string }
func (SeedNode) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SeedNode.
func (*SeedNode) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type SeedNode.
type ServerVersion ¶
type ServerVersion string
ServerVersion - Describes the ServerVersion of an a MongoDB account.
const ( ServerVersionFour0 ServerVersion = "4.0" ServerVersionFour2 ServerVersion = "4.2" ServerVersionThree2 ServerVersion = "3.2" ServerVersionThree6 ServerVersion = "3.6" )
func PossibleServerVersionValues ¶
func PossibleServerVersionValues() []ServerVersion
PossibleServerVersionValues returns the possible values for the ServerVersion const type.
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient contains the methods for the Service group. Don't use this type directly, use NewServiceClient() instead.
func NewServiceClient ¶
func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error)
NewServiceClient creates a new instance of ServiceClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServiceClient) BeginCreate ¶
func (client *ServiceClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, serviceName string, createUpdateParameters ServiceResourceCreateUpdateParameters, options *ServiceClientBeginCreateOptions) (*runtime.Poller[ServiceClientCreateResponse], error)
BeginCreate - Creates a service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- serviceName - Cosmos DB service name.
- createUpdateParameters - The Service resource parameters.
- options - ServiceClientBeginCreateOptions contains the optional parameters for the ServiceClient.BeginCreate method.
Example (DataTransferServiceCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDataTransferServiceCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "DataTransfer", armcosmos.ServiceResourceCreateUpdateParameters{ Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeDataTransfer), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("DataTransfer"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/DataTransfer"), // Properties: &armcosmos.DataTransferServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeDataTransfer), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.DataTransferRegionalServiceResource{ // { // Name: to.Ptr("DataTransfer-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // }}, // }, // }
Output:
Example (GraphApiComputeServiceCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGraphAPIComputeServiceCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "GraphAPICompute", armcosmos.ServiceResourceCreateUpdateParameters{ Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeGraphAPICompute), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("GraphAPICompute"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/GraphAPICompute"), // Properties: &armcosmos.GraphAPIComputeServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeGraphAPICompute), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // GraphAPIComputeEndpoint: to.Ptr("https://graphAPICompute.gremlin.cosmos.windows-int.net/"), // Locations: []*armcosmos.GraphAPIComputeRegionalServiceResource{ // { // Name: to.Ptr("GraphAPICompute-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // GraphAPIComputeEndpoint: to.Ptr("https://graphAPICompute-westus.gremlin.cosmos.windows-int.net/"), // }}, // }, // }
Output:
Example (MaterializedViewsBuilderServiceCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMaterializedViewsBuilderServiceCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "MaterializedViewsBuilder", armcosmos.ServiceResourceCreateUpdateParameters{ Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeMaterializedViewsBuilder), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("MaterializedViewsBuilder"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/MaterializedViewsBuilder"), // Properties: &armcosmos.MaterializedViewsBuilderServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeMaterializedViewsBuilder), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.MaterializedViewsBuilderRegionalServiceResource{ // { // Name: to.Ptr("MaterializedViewsBuilder-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // }}, // }, // }
Output:
Example (SqlDedicatedGatewayServiceCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDedicatedGatewayServiceCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginCreate(ctx, "rg1", "ddb1", "SqlDedicatedGateway", armcosmos.ServiceResourceCreateUpdateParameters{ Properties: &armcosmos.ServiceResourceCreateUpdateProperties{ InstanceCount: to.Ptr[int32](1), InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("SqlDedicatedGateway"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/SqlDedicatedGateway"), // Properties: &armcosmos.SQLDedicatedGatewayServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.SQLDedicatedGatewayRegionalServiceResource{ // { // Name: to.Ptr("SqlDedicatedGateway-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway-westus.sqlx.cosmos.windows-int.net/"), // }}, // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway.sqlx.cosmos.windows-int.net/"), // }, // }
Output:
func (*ServiceClient) BeginDelete ¶
func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*runtime.Poller[ServiceClientDeleteResponse], error)
BeginDelete - Deletes service with the given serviceName. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- serviceName - Cosmos DB service name.
- options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.
Example (DataTransferServiceDelete) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDataTransferServiceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginDelete(ctx, "rg1", "ddb1", "DataTransfer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (GraphApiComputeServiceDelete) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGraphAPIComputeServiceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginDelete(ctx, "rg1", "ddb1", "GraphAPICompute", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (MaterializedViewsBuilderServiceDelete) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMaterializedViewsBuilderServiceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginDelete(ctx, "rg1", "ddb1", "MaterializedViewsBuilder", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (SqlDedicatedGatewayServiceDelete) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDedicatedGatewayServiceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServiceClient().BeginDelete(ctx, "rg1", "ddb1", "SqlDedicatedGateway", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ServiceClient) Get ¶
func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error)
Get - Gets the status of service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- serviceName - Cosmos DB service name.
- options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.
Example (DataTransferServiceGet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBDataTransferServiceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "ddb1", "DataTransfer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("DataTransfer"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/DataTransfer"), // Properties: &armcosmos.DataTransferServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeDataTransfer), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.DataTransferRegionalServiceResource{ // { // Name: to.Ptr("DataTransfer-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // }}, // }, // }
Output:
Example (GraphApiComputeServiceGet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBGraphAPIComputeServiceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "ddb1", "GraphAPICompute", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("GraphAPICompute"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/GraphAPICompute"), // Properties: &armcosmos.GraphAPIComputeServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeGraphAPICompute), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // GraphAPIComputeEndpoint: to.Ptr("https://graphAPICompute.gremlin.cosmos.windows-int.net/"), // Locations: []*armcosmos.GraphAPIComputeRegionalServiceResource{ // { // Name: to.Ptr("GraphAPICompute-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // GraphAPIComputeEndpoint: to.Ptr("https://graphAPICompute-westus.gremlin.cosmos.windows-int.net/"), // }}, // }, // }
Output:
Example (MaterializedViewsBuilderServiceGet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBMaterializedViewsBuilderServiceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "ddb1", "MaterializedViewsBuilder", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("MaterializedViewsBuilder"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/MaterializedViewsBuilder"), // Properties: &armcosmos.MaterializedViewsBuilderServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeMaterializedViewsBuilder), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.MaterializedViewsBuilderRegionalServiceResource{ // { // Name: to.Ptr("MaterializedViewsBuilder-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // }}, // }, // }
Output:
Example (SqlDedicatedGatewayServiceGet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBSqlDedicatedGatewayServiceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "ddb1", "SqlDedicatedGateway", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armcosmos.ServiceResource{ // Name: to.Ptr("SqlDedicatedGateway"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/SqlDedicatedGateway"), // Properties: &armcosmos.SQLDedicatedGatewayServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.SQLDedicatedGatewayRegionalServiceResource{ // { // Name: to.Ptr("SqlDedicatedGateway-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway-westus.sqlx.cosmos.windows-int.net/"), // }}, // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway.sqlx.cosmos.windows-int.net/"), // }, // }
Output:
func (*ServiceClient) NewListPager ¶
func (client *ServiceClient) NewListPager(resourceGroupName string, accountName string, options *ServiceClientListOptions) *runtime.Pager[ServiceClientListResponse]
NewListPager - Gets the status of service.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBServicesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServiceClient().NewListPager("rg1", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServiceResourceListResult = armcosmos.ServiceResourceListResult{ // Value: []*armcosmos.ServiceResource{ // { // Name: to.Ptr("sqlDedicatedGateway"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/services"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/services/sqlDedicatedGateway"), // Properties: &armcosmos.SQLDedicatedGatewayServiceResourceProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-25T12:56:05.462Z"); return t}()), // InstanceCount: to.Ptr[int32](1), // InstanceSize: to.Ptr(armcosmos.ServiceSizeCosmosD4S), // ServiceType: to.Ptr(armcosmos.ServiceTypeSQLDedicatedGateway), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // Locations: []*armcosmos.SQLDedicatedGatewayRegionalServiceResource{ // { // Name: to.Ptr("sqlDedicatedGateway-westus2"), // Location: to.Ptr("West US 2"), // Status: to.Ptr(armcosmos.ServiceStatusRunning), // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway-westus.sqlx.cosmos.windows-int.net/"), // }}, // SQLDedicatedGatewayEndpoint: to.Ptr("https://sqlDedicatedGateway.sqlx.cosmos.windows-int.net/"), // }, // }}, // } }
Output:
type ServiceClientBeginCreateOptions ¶
type ServiceClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServiceClientBeginCreateOptions contains the optional parameters for the ServiceClient.BeginCreate method.
type ServiceClientBeginDeleteOptions ¶
type ServiceClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.
type ServiceClientCreateResponse ¶
type ServiceClientCreateResponse struct { // Properties for the database account. ServiceResource }
ServiceClientCreateResponse contains the response from method ServiceClient.BeginCreate.
type ServiceClientDeleteResponse ¶
type ServiceClientDeleteResponse struct { }
ServiceClientDeleteResponse contains the response from method ServiceClient.BeginDelete.
type ServiceClientGetOptions ¶
type ServiceClientGetOptions struct { }
ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.
type ServiceClientGetResponse ¶
type ServiceClientGetResponse struct { // Properties for the database account. ServiceResource }
ServiceClientGetResponse contains the response from method ServiceClient.Get.
type ServiceClientListOptions ¶
type ServiceClientListOptions struct { }
ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.
type ServiceClientListResponse ¶
type ServiceClientListResponse struct { // The List operation response, that contains the Service Resource and their properties. ServiceResourceListResult }
ServiceClientListResponse contains the response from method ServiceClient.NewListPager.
type ServiceResource ¶
type ServiceResource struct { // Services response resource. Properties ServiceResourcePropertiesClassification // READ-ONLY; The unique resource identifier of the database account. ID *string // READ-ONLY; The name of the database account. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ServiceResource - Properties for the database account.
func (ServiceResource) MarshalJSON ¶
func (s ServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResource.
func (*ServiceResource) UnmarshalJSON ¶
func (s *ServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.
type ServiceResourceCreateUpdateParameters ¶
type ServiceResourceCreateUpdateParameters struct { // Properties in ServiceResourceCreateUpdateParameters. Properties *ServiceResourceCreateUpdateProperties }
ServiceResourceCreateUpdateParameters - Parameters for Create or Update Request for ServiceResource
func (ServiceResourceCreateUpdateParameters) MarshalJSON ¶
func (s ServiceResourceCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceCreateUpdateParameters.
func (*ServiceResourceCreateUpdateParameters) UnmarshalJSON ¶
func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceCreateUpdateParameters.
type ServiceResourceCreateUpdateProperties ¶
type ServiceResourceCreateUpdateProperties struct { // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // ServiceType for the service. ServiceType *ServiceType }
ServiceResourceCreateUpdateProperties - Properties in ServiceResourceCreateUpdateParameters.
func (ServiceResourceCreateUpdateProperties) MarshalJSON ¶
func (s ServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceCreateUpdateProperties.
func (*ServiceResourceCreateUpdateProperties) UnmarshalJSON ¶
func (s *ServiceResourceCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceCreateUpdateProperties.
type ServiceResourceListResult ¶
type ServiceResourceListResult struct { // READ-ONLY; List of Service Resource and their properties. Value []*ServiceResource }
ServiceResourceListResult - The List operation response, that contains the Service Resource and their properties.
func (ServiceResourceListResult) MarshalJSON ¶
func (s ServiceResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceListResult.
func (*ServiceResourceListResult) UnmarshalJSON ¶
func (s *ServiceResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceListResult.
type ServiceResourceProperties ¶
type ServiceResourceProperties struct { // REQUIRED; ServiceType for the service. ServiceType *ServiceType // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // Instance count for the service. InstanceCount *int32 // Instance type for the service. InstanceSize *ServiceSize // READ-ONLY; Time of the last state change (ISO-8601 format). CreationTime *time.Time // READ-ONLY; Describes the status of a service. Status *ServiceStatus }
ServiceResourceProperties - Services response resource.
func (*ServiceResourceProperties) GetServiceResourceProperties ¶
func (s *ServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type ServiceResourceProperties.
func (ServiceResourceProperties) MarshalJSON ¶
func (s ServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceProperties.
func (*ServiceResourceProperties) UnmarshalJSON ¶
func (s *ServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceProperties.
type ServiceResourcePropertiesClassification ¶
type ServiceResourcePropertiesClassification interface { // GetServiceResourceProperties returns the ServiceResourceProperties content of the underlying type. GetServiceResourceProperties() *ServiceResourceProperties }
ServiceResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetServiceResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DataTransferServiceResourceProperties, *GraphAPIComputeServiceResourceProperties, *MaterializedViewsBuilderServiceResourceProperties, - *SQLDedicatedGatewayServiceResourceProperties, *ServiceResourceProperties
type ServiceSize ¶
type ServiceSize string
ServiceSize - Instance type for the service.
const ( ServiceSizeCosmosD16S ServiceSize = "Cosmos.D16s" ServiceSizeCosmosD4S ServiceSize = "Cosmos.D4s" ServiceSizeCosmosD8S ServiceSize = "Cosmos.D8s" )
func PossibleServiceSizeValues ¶
func PossibleServiceSizeValues() []ServiceSize
PossibleServiceSizeValues returns the possible values for the ServiceSize const type.
type ServiceStatus ¶
type ServiceStatus string
ServiceStatus - Describes the status of a service.
const ( ServiceStatusCreating ServiceStatus = "Creating" ServiceStatusDeleting ServiceStatus = "Deleting" ServiceStatusError ServiceStatus = "Error" ServiceStatusRunning ServiceStatus = "Running" ServiceStatusStopped ServiceStatus = "Stopped" ServiceStatusUpdating ServiceStatus = "Updating" )
func PossibleServiceStatusValues ¶
func PossibleServiceStatusValues() []ServiceStatus
PossibleServiceStatusValues returns the possible values for the ServiceStatus const type.
type ServiceType ¶
type ServiceType string
ServiceType - ServiceType for the service.
const ( ServiceTypeDataTransfer ServiceType = "DataTransfer" ServiceTypeGraphAPICompute ServiceType = "GraphAPICompute" ServiceTypeMaterializedViewsBuilder ServiceType = "MaterializedViewsBuilder" ServiceTypeSQLDedicatedGateway ServiceType = "SqlDedicatedGateway" )
func PossibleServiceTypeValues ¶
func PossibleServiceTypeValues() []ServiceType
PossibleServiceTypeValues returns the possible values for the ServiceType const type.
type SpatialSpec ¶
type SpatialSpec struct { // 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 }
func (SpatialSpec) MarshalJSON ¶
func (s SpatialSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SpatialSpec.
func (*SpatialSpec) UnmarshalJSON ¶
func (s *SpatialSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SpatialSpec.
type SpatialType ¶
type SpatialType string
SpatialType - Indicates the spatial type of index.
const ( SpatialTypeLineString SpatialType = "LineString" SpatialTypeMultiPolygon SpatialType = "MultiPolygon" SpatialTypePoint SpatialType = "Point" SpatialTypePolygon SpatialType = "Polygon" )
func PossibleSpatialTypeValues ¶
func PossibleSpatialTypeValues() []SpatialType
PossibleSpatialTypeValues returns the possible values for the SpatialType const type.
type Status ¶ added in v2.4.0
type Status string
Status - Enum to indicate current buildout status of the region.
func PossibleStatusValues ¶ added in v2.4.0
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TableCreateUpdateParameters ¶
type TableCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Table. Properties *TableCreateUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
TableCreateUpdateParameters - Parameters to create and update Cosmos DB Table.
func (TableCreateUpdateParameters) MarshalJSON ¶
func (t TableCreateUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableCreateUpdateParameters.
func (*TableCreateUpdateParameters) UnmarshalJSON ¶
func (t *TableCreateUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableCreateUpdateParameters.
type TableCreateUpdateProperties ¶
type TableCreateUpdateProperties struct { // REQUIRED; 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 }
TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
func (TableCreateUpdateProperties) MarshalJSON ¶
func (t TableCreateUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableCreateUpdateProperties.
func (*TableCreateUpdateProperties) UnmarshalJSON ¶
func (t *TableCreateUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableCreateUpdateProperties.
type TableGetProperties ¶
type TableGetProperties struct { Options *TableGetPropertiesOptions Resource *TableGetPropertiesResource }
TableGetProperties - The properties of an Azure Cosmos Table
func (TableGetProperties) MarshalJSON ¶
func (t TableGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableGetProperties.
func (*TableGetProperties) UnmarshalJSON ¶
func (t *TableGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableGetProperties.
type TableGetPropertiesOptions ¶
type TableGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 }
func (TableGetPropertiesOptions) MarshalJSON ¶
func (t TableGetPropertiesOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableGetPropertiesOptions.
func (*TableGetPropertiesOptions) UnmarshalJSON ¶
func (t *TableGetPropertiesOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableGetPropertiesOptions.
type TableGetPropertiesResource ¶
type TableGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB table ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (TableGetPropertiesResource) MarshalJSON ¶
func (t TableGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableGetPropertiesResource.
func (*TableGetPropertiesResource) UnmarshalJSON ¶
func (t *TableGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableGetPropertiesResource.
type TableGetResults ¶
type TableGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB Table Properties *TableGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
TableGetResults - An Azure Cosmos DB Table.
func (TableGetResults) MarshalJSON ¶
func (t TableGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableGetResults.
func (*TableGetResults) UnmarshalJSON ¶
func (t *TableGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableGetResults.
type TableListResult ¶
type TableListResult struct { // READ-ONLY; List of Table and their properties. Value []*TableGetResults }
TableListResult - The List operation response, that contains the Table and their properties.
func (TableListResult) MarshalJSON ¶
func (t TableListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableListResult.
func (*TableListResult) UnmarshalJSON ¶
func (t *TableListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableListResult.
type TableResource ¶
type TableResource struct { // REQUIRED; Name of the Cosmos DB table ID *string // Enum to indicate the mode of resource creation. CreateMode *CreateMode // Parameters to indicate the information about the restore RestoreParameters *ResourceRestoreParameters }
TableResource - Cosmos DB table resource object
func (TableResource) MarshalJSON ¶
func (t TableResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableResource.
func (*TableResource) UnmarshalJSON ¶
func (t *TableResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TableResource.
type TableResourcesClient ¶
type TableResourcesClient struct {
// contains filtered or unexported fields
}
TableResourcesClient contains the methods for the TableResources group. Don't use this type directly, use NewTableResourcesClient() instead.
func NewTableResourcesClient ¶
func NewTableResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TableResourcesClient, error)
NewTableResourcesClient creates a new instance of TableResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TableResourcesClient) BeginCreateUpdateTable ¶
func (client *TableResourcesClient) BeginCreateUpdateTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters TableCreateUpdateParameters, options *TableResourcesClientBeginCreateUpdateTableOptions) (*runtime.Poller[TableResourcesClientCreateUpdateTableResponse], error)
BeginCreateUpdateTable - Create or update an Azure Cosmos DB Table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- createUpdateTableParameters - The parameters to provide for the current Table.
- options - TableResourcesClientBeginCreateUpdateTableOptions contains the optional parameters for the TableResourcesClient.BeginCreateUpdateTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableCreateUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginCreateUpdateTable(ctx, "rg1", "ddb1", "tableName", armcosmos.TableCreateUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.TableCreateUpdateProperties{ Options: &armcosmos.CreateUpdateOptions{}, Resource: &armcosmos.TableResource{ ID: to.Ptr("tableName"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TableGetResults = armcosmos.TableGetResults{ // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/tables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/tables/tableName"), // Location: to.Ptr("West US"), // Properties: &armcosmos.TableGetProperties{ // Resource: &armcosmos.TableGetPropertiesResource{ // ID: to.Ptr("tableName"), // }, // }, // }
Output:
func (*TableResourcesClient) BeginDeleteTable ¶
func (client *TableResourcesClient) BeginDeleteTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginDeleteTableOptions) (*runtime.Poller[TableResourcesClientDeleteTableResponse], error)
BeginDeleteTable - Deletes an existing Azure Cosmos DB Table. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- options - TableResourcesClientBeginDeleteTableOptions contains the optional parameters for the TableResourcesClient.BeginDeleteTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginDeleteTable(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*TableResourcesClient) BeginMigrateTableToAutoscale ¶
func (client *TableResourcesClient) BeginMigrateTableToAutoscale(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToAutoscaleOptions) (*runtime.Poller[TableResourcesClientMigrateTableToAutoscaleResponse], error)
BeginMigrateTableToAutoscale - Migrate an Azure Cosmos DB Table from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- options - TableResourcesClientBeginMigrateTableToAutoscaleOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToAutoscale method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableMigrateToAutoscale.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginMigrateTableToAutoscale(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // AutoscaleSettings: &armcosmos.AutoscaleSettingsResource{ // MaxThroughput: to.Ptr[int32](4000), // }, // MinimumThroughput: to.Ptr("4000"), // OfferReplacePending: to.Ptr("false"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*TableResourcesClient) BeginMigrateTableToManualThroughput ¶
func (client *TableResourcesClient) BeginMigrateTableToManualThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientBeginMigrateTableToManualThroughputOptions) (*runtime.Poller[TableResourcesClientMigrateTableToManualThroughputResponse], error)
BeginMigrateTableToManualThroughput - Migrate an Azure Cosmos DB Table from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- options - TableResourcesClientBeginMigrateTableToManualThroughputOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToManualThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableMigrateToManualThroughput.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginMigrateTableToManualThroughput(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*TableResourcesClient) BeginRetrieveContinuousBackupInformation ¶ added in v2.2.0
func (client *TableResourcesClient) BeginRetrieveContinuousBackupInformation(ctx context.Context, resourceGroupName string, accountName string, tableName string, location ContinuousBackupRestoreLocation, options *TableResourcesClientBeginRetrieveContinuousBackupInformationOptions) (*runtime.Poller[TableResourcesClientRetrieveContinuousBackupInformationResponse], error)
BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- location - The name of the continuous backup restore location.
- options - TableResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the TableResourcesClient.BeginRetrieveContinuousBackupInformation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableBackupInformation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginRetrieveContinuousBackupInformation(ctx, "rgName", "ddb1", "tableName1", armcosmos.ContinuousBackupRestoreLocation{ Location: to.Ptr("North Europe"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupInformation = armcosmos.BackupInformation{ // ContinuousBackupInformation: &armcosmos.ContinuousBackupInformation{ // LatestRestorableTimestamp: to.Ptr("2021-02-05T02:40:50Z"), // }, // }
Output:
func (*TableResourcesClient) BeginUpdateTableThroughput ¶
func (client *TableResourcesClient) BeginUpdateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *TableResourcesClientBeginUpdateTableThroughputOptions) (*runtime.Poller[TableResourcesClientUpdateTableThroughputResponse], error)
BeginUpdateTableThroughput - Update RUs per second of an Azure Cosmos DB Table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- updateThroughputParameters - The parameters to provide for the RUs per second of the current Table.
- options - TableResourcesClientBeginUpdateTableThroughputOptions contains the optional parameters for the TableResourcesClient.BeginUpdateTableThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableThroughputUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTableResourcesClient().BeginUpdateTableThroughput(ctx, "rg1", "ddb1", "tableName", armcosmos.ThroughputSettingsUpdateParameters{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armcosmos.ThroughputSettingsUpdateProperties{ Resource: &armcosmos.ThroughputSettingsResource{ Throughput: to.Ptr[int32](400), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/tables/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/tables/tableName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*TableResourcesClient) GetTable ¶
func (client *TableResourcesClient) GetTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientGetTableOptions) (TableResourcesClientGetTableResponse, error)
GetTable - Gets the Tables under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- options - TableResourcesClientGetTableOptions contains the optional parameters for the TableResourcesClient.GetTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableResourcesClient().GetTable(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TableGetResults = armcosmos.TableGetResults{ // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/tables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/tables/tableName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.TableGetProperties{ // Resource: &armcosmos.TableGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // ID: to.Ptr("tableName"), // }, // }, // }
Output:
func (*TableResourcesClient) GetTableThroughput ¶
func (client *TableResourcesClient) GetTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, options *TableResourcesClientGetTableThroughputOptions) (TableResourcesClientGetTableThroughputResponse, error)
GetTableThroughput - Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- tableName - Cosmos DB table name.
- options - TableResourcesClientGetTableThroughputOptions contains the optional parameters for the TableResourcesClient.GetTableThroughput method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableThroughputGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTableResourcesClient().GetTableThroughput(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ThroughputSettingsGetResults = armcosmos.ThroughputSettingsGetResults{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/tables/throughputSettings"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/tables/tableName/throughputSettings/default"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.ThroughputSettingsGetProperties{ // Resource: &armcosmos.ThroughputSettingsGetPropertiesResource{ // Etag: to.Ptr("\"00005900-0000-0000-0000-56f9a2630000\""), // Rid: to.Ptr("PD5DALigDgw="), // Ts: to.Ptr[float32](1459200611), // InstantMaximumThroughput: to.Ptr("10000"), // MinimumThroughput: to.Ptr("400"), // OfferReplacePending: to.Ptr("true"), // SoftAllowedMaximumThroughput: to.Ptr("1000000"), // Throughput: to.Ptr[int32](400), // }, // }, // }
Output:
func (*TableResourcesClient) NewListTablesPager ¶
func (client *TableResourcesClient) NewListTablesPager(resourceGroupName string, accountName string, options *TableResourcesClientListTablesOptions) *runtime.Pager[TableResourcesClientListTablesResponse]
NewListTablesPager - Lists the Tables under an existing Azure Cosmos DB database account.
Generated from API version 2023-11-15
- resourceGroupName - The name of the resource group. The name is case insensitive.
- accountName - Cosmos DB database account name.
- options - TableResourcesClientListTablesOptions contains the optional parameters for the TableResourcesClient.NewListTablesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBTableList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTableResourcesClient().NewListTablesPager("rgName", "ddb1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TableListResult = armcosmos.TableListResult{ // Value: []*armcosmos.TableGetResults{ // { // Name: to.Ptr("tableName"), // Type: to.Ptr("Microsoft.DocumentDB/databaseAccounts/tables"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/tables/tableName"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armcosmos.TableGetProperties{ // Resource: &armcosmos.TableGetPropertiesResource{ // ID: to.Ptr("tableName"), // }, // }, // }}, // } }
Output:
type TableResourcesClientBeginCreateUpdateTableOptions ¶
type TableResourcesClientBeginCreateUpdateTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginCreateUpdateTableOptions contains the optional parameters for the TableResourcesClient.BeginCreateUpdateTable method.
type TableResourcesClientBeginDeleteTableOptions ¶
type TableResourcesClientBeginDeleteTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginDeleteTableOptions contains the optional parameters for the TableResourcesClient.BeginDeleteTable method.
type TableResourcesClientBeginMigrateTableToAutoscaleOptions ¶
type TableResourcesClientBeginMigrateTableToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginMigrateTableToAutoscaleOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToAutoscale method.
type TableResourcesClientBeginMigrateTableToManualThroughputOptions ¶
type TableResourcesClientBeginMigrateTableToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginMigrateTableToManualThroughputOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToManualThroughput method.
type TableResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶ added in v2.2.0
type TableResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the TableResourcesClient.BeginRetrieveContinuousBackupInformation method.
type TableResourcesClientBeginUpdateTableThroughputOptions ¶
type TableResourcesClientBeginUpdateTableThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginUpdateTableThroughputOptions contains the optional parameters for the TableResourcesClient.BeginUpdateTableThroughput method.
type TableResourcesClientCreateUpdateTableResponse ¶
type TableResourcesClientCreateUpdateTableResponse struct { // An Azure Cosmos DB Table. TableGetResults }
TableResourcesClientCreateUpdateTableResponse contains the response from method TableResourcesClient.BeginCreateUpdateTable.
type TableResourcesClientDeleteTableResponse ¶
type TableResourcesClientDeleteTableResponse struct { }
TableResourcesClientDeleteTableResponse contains the response from method TableResourcesClient.BeginDeleteTable.
type TableResourcesClientGetTableOptions ¶
type TableResourcesClientGetTableOptions struct { }
TableResourcesClientGetTableOptions contains the optional parameters for the TableResourcesClient.GetTable method.
type TableResourcesClientGetTableResponse ¶
type TableResourcesClientGetTableResponse struct { // An Azure Cosmos DB Table. TableGetResults }
TableResourcesClientGetTableResponse contains the response from method TableResourcesClient.GetTable.
type TableResourcesClientGetTableThroughputOptions ¶
type TableResourcesClientGetTableThroughputOptions struct { }
TableResourcesClientGetTableThroughputOptions contains the optional parameters for the TableResourcesClient.GetTableThroughput method.
type TableResourcesClientGetTableThroughputResponse ¶
type TableResourcesClientGetTableThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
TableResourcesClientGetTableThroughputResponse contains the response from method TableResourcesClient.GetTableThroughput.
type TableResourcesClientListTablesOptions ¶
type TableResourcesClientListTablesOptions struct { }
TableResourcesClientListTablesOptions contains the optional parameters for the TableResourcesClient.NewListTablesPager method.
type TableResourcesClientListTablesResponse ¶
type TableResourcesClientListTablesResponse struct { // The List operation response, that contains the Table and their properties. TableListResult }
TableResourcesClientListTablesResponse contains the response from method TableResourcesClient.NewListTablesPager.
type TableResourcesClientMigrateTableToAutoscaleResponse ¶
type TableResourcesClientMigrateTableToAutoscaleResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
TableResourcesClientMigrateTableToAutoscaleResponse contains the response from method TableResourcesClient.BeginMigrateTableToAutoscale.
type TableResourcesClientMigrateTableToManualThroughputResponse ¶
type TableResourcesClientMigrateTableToManualThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
TableResourcesClientMigrateTableToManualThroughputResponse contains the response from method TableResourcesClient.BeginMigrateTableToManualThroughput.
type TableResourcesClientRetrieveContinuousBackupInformationResponse ¶ added in v2.2.0
type TableResourcesClientRetrieveContinuousBackupInformationResponse struct { // Backup information of a resource. BackupInformation }
TableResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method TableResourcesClient.BeginRetrieveContinuousBackupInformation.
type TableResourcesClientUpdateTableThroughputResponse ¶
type TableResourcesClientUpdateTableThroughputResponse struct { // An Azure Cosmos DB resource throughput. ThroughputSettingsGetResults }
TableResourcesClientUpdateTableThroughputResponse contains the response from method TableResourcesClient.BeginUpdateTableThroughput.
type ThroughputPolicyResource ¶
type ThroughputPolicyResource struct { // Represents the percentage by which throughput can increase every time throughput policy kicks in. IncrementPercent *int32 // Determines whether the ThroughputPolicy is active or not IsEnabled *bool }
ThroughputPolicyResource - Cosmos DB resource throughput policy
func (ThroughputPolicyResource) MarshalJSON ¶
func (t ThroughputPolicyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputPolicyResource.
func (*ThroughputPolicyResource) UnmarshalJSON ¶
func (t *ThroughputPolicyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputPolicyResource.
type ThroughputSettingsGetProperties ¶
type ThroughputSettingsGetProperties struct {
Resource *ThroughputSettingsGetPropertiesResource
}
ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput
func (ThroughputSettingsGetProperties) MarshalJSON ¶
func (t ThroughputSettingsGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsGetProperties.
func (*ThroughputSettingsGetProperties) UnmarshalJSON ¶
func (t *ThroughputSettingsGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsGetProperties.
type ThroughputSettingsGetPropertiesResource ¶
type ThroughputSettingsGetPropertiesResource struct { // Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. AutoscaleSettings *AutoscaleSettingsResource // Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. Throughput *int32 // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string // READ-ONLY; The offer throughput value to instantly scale up without triggering splits InstantMaximumThroughput *string // READ-ONLY; The minimum throughput of the resource MinimumThroughput *string // READ-ONLY; The throughput replace is pending OfferReplacePending *string // READ-ONLY; A system generated property. A unique identifier. Rid *string // READ-ONLY; The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified SoftAllowedMaximumThroughput *string // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 }
func (ThroughputSettingsGetPropertiesResource) MarshalJSON ¶
func (t ThroughputSettingsGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsGetPropertiesResource.
func (*ThroughputSettingsGetPropertiesResource) UnmarshalJSON ¶
func (t *ThroughputSettingsGetPropertiesResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsGetPropertiesResource.
type ThroughputSettingsGetResults ¶
type ThroughputSettingsGetResults struct { // The location of the resource group to which the resource belongs. Location *string // The properties of an Azure Cosmos DB resource throughput Properties *ThroughputSettingsGetProperties // 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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ThroughputSettingsGetResults - An Azure Cosmos DB resource throughput.
func (ThroughputSettingsGetResults) MarshalJSON ¶
func (t ThroughputSettingsGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsGetResults.
func (*ThroughputSettingsGetResults) UnmarshalJSON ¶
func (t *ThroughputSettingsGetResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsGetResults.
type ThroughputSettingsResource ¶
type ThroughputSettingsResource struct { // Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. AutoscaleSettings *AutoscaleSettingsResource // Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. Throughput *int32 // READ-ONLY; The offer throughput value to instantly scale up without triggering splits InstantMaximumThroughput *string // READ-ONLY; The minimum throughput of the resource MinimumThroughput *string // READ-ONLY; The throughput replace is pending OfferReplacePending *string // READ-ONLY; The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified SoftAllowedMaximumThroughput *string }
ThroughputSettingsResource - Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both.
func (ThroughputSettingsResource) MarshalJSON ¶
func (t ThroughputSettingsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsResource.
func (*ThroughputSettingsResource) UnmarshalJSON ¶
func (t *ThroughputSettingsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsResource.
type ThroughputSettingsUpdateParameters ¶
type ThroughputSettingsUpdateParameters struct { // REQUIRED; Properties to update Azure Cosmos DB resource throughput. Properties *ThroughputSettingsUpdateProperties // The location of the resource group to which the resource belongs. Location *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". Tags map[string]*string // READ-ONLY; The unique resource identifier of the ARM resource. ID *string // READ-ONLY; The name of the ARM resource. Name *string // READ-ONLY; The type of Azure resource. Type *string }
ThroughputSettingsUpdateParameters - Parameters to update Cosmos DB resource throughput.
func (ThroughputSettingsUpdateParameters) MarshalJSON ¶
func (t ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsUpdateParameters.
func (*ThroughputSettingsUpdateParameters) UnmarshalJSON ¶
func (t *ThroughputSettingsUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsUpdateParameters.
type ThroughputSettingsUpdateProperties ¶
type ThroughputSettingsUpdateProperties struct { // REQUIRED; The standard JSON format of a resource throughput Resource *ThroughputSettingsResource }
ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
func (ThroughputSettingsUpdateProperties) MarshalJSON ¶
func (t ThroughputSettingsUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThroughputSettingsUpdateProperties.
func (*ThroughputSettingsUpdateProperties) UnmarshalJSON ¶
func (t *ThroughputSettingsUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThroughputSettingsUpdateProperties.
type TriggerOperation ¶
type TriggerOperation string
TriggerOperation - The operation the trigger is associated with
const ( TriggerOperationAll TriggerOperation = "All" TriggerOperationCreate TriggerOperation = "Create" TriggerOperationDelete TriggerOperation = "Delete" TriggerOperationReplace TriggerOperation = "Replace" TriggerOperationUpdate TriggerOperation = "Update" )
func PossibleTriggerOperationValues ¶
func PossibleTriggerOperationValues() []TriggerOperation
PossibleTriggerOperationValues returns the possible values for the TriggerOperation const type.
type TriggerType ¶
type TriggerType string
TriggerType - Type of the Trigger
const ( TriggerTypePost TriggerType = "Post" TriggerTypePre TriggerType = "Pre" )
func PossibleTriggerTypeValues ¶
func PossibleTriggerTypeValues() []TriggerType
PossibleTriggerTypeValues returns the possible values for the TriggerType const type.
type Type ¶ added in v2.4.0
type Type string
Type - Type of the connection string
const ( TypeCassandra Type = "Cassandra" TypeCassandraConnectorMetadata Type = "CassandraConnectorMetadata" TypeGremlin Type = "Gremlin" TypeGremlinV2 Type = "GremlinV2" TypeMongoDB Type = "MongoDB" TypeSQL Type = "Sql" TypeSQLDedicatedGateway Type = "SqlDedicatedGateway" TypeTable Type = "Table" TypeUndefined Type = "Undefined" )
func PossibleTypeValues ¶ added in v2.4.0
func PossibleTypeValues() []Type
PossibleTypeValues returns the possible values for the Type const type.
type UniqueKey ¶
type UniqueKey struct { // List of paths must be unique for each document in the Azure Cosmos DB service Paths []*string }
UniqueKey - The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
func (UniqueKey) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type UniqueKey.
func (*UniqueKey) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type UniqueKey.
type UniqueKeyPolicy ¶
type UniqueKeyPolicy struct { // List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. UniqueKeys []*UniqueKey }
UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
func (UniqueKeyPolicy) MarshalJSON ¶
func (u UniqueKeyPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UniqueKeyPolicy.
func (*UniqueKeyPolicy) UnmarshalJSON ¶
func (u *UniqueKeyPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UniqueKeyPolicy.
type UnitType ¶
type UnitType string
UnitType - The unit of the metric.
func PossibleUnitTypeValues ¶
func PossibleUnitTypeValues() []UnitType
PossibleUnitTypeValues returns the possible values for the UnitType const type.
type Usage ¶
type Usage struct { // READ-ONLY; Current value for this metric CurrentValue *int64 // READ-ONLY; Maximum value for this metric Limit *int64 // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The quota period used to summarize the usage values. QuotaPeriod *string // READ-ONLY; The unit of the metric. Unit *UnitType }
Usage - The usage data for a usage request.
func (Usage) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsagesResult ¶
type UsagesResult struct { // READ-ONLY; The list of usages for the database. A usage is a point in time metric Value []*Usage }
UsagesResult - The response to a list usage request.
func (UsagesResult) MarshalJSON ¶
func (u UsagesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsagesResult.
func (*UsagesResult) UnmarshalJSON ¶
func (u *UsagesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsagesResult.
type VirtualNetworkRule ¶
type VirtualNetworkRule struct { // 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 *bool }
VirtualNetworkRule - Virtual Network ACL Rule object
func (VirtualNetworkRule) MarshalJSON ¶
func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.
func (*VirtualNetworkRule) UnmarshalJSON ¶
func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.
Source Files ¶
- build.go
- cassandraclusters_client.go
- cassandradatacenters_client.go
- cassandraresources_client.go
- client_factory.go
- collection_client.go
- collectionpartition_client.go
- collectionpartitionregion_client.go
- collectionregion_client.go
- constants.go
- database_client.go
- databaseaccountregion_client.go
- databaseaccounts_client.go
- gremlinresources_client.go
- interfaces.go
- locations_client.go
- models.go
- models_serde.go
- mongodbresources_client.go
- notebookworkspaces_client.go
- operations_client.go
- options.go
- partitionkeyrangeid_client.go
- partitionkeyrangeidregion_client.go
- percentile_client.go
- percentilesourcetarget_client.go
- percentiletarget_client.go
- polymorphic_helpers.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- response_types.go
- restorabledatabaseaccounts_client.go
- restorablegremlindatabases_client.go
- restorablegremlingraphs_client.go
- restorablegremlinresources_client.go
- restorablemongodbcollections_client.go
- restorablemongodbdatabases_client.go
- restorablemongodbresources_client.go
- restorablesqlcontainers_client.go
- restorablesqldatabases_client.go
- restorablesqlresources_client.go
- restorabletableresources_client.go
- restorabletables_client.go
- service_client.go
- sqlresources_client.go
- tableresources_client.go
- time_rfc3339.go