Documentation ¶
Index ¶
- type APIProperties
- type APIType
- type ARMProxyResource
- type ARMResourceProperties
- type AnalyticalStorageConfiguration
- type AnalyticalStorageSchemaType
- type AuthenticationMethod
- 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 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 CloudError
- 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 ConflictResolutionMode
- type ConflictResolutionPolicy
- type ConnectionError
- type ConnectionState
- type ConnectorOffer
- type ConsistencyPolicy
- type ContainerPartitionKey
- type ContinuousBackupInformation
- type ContinuousBackupRestoreLocation
- type ContinuousModeBackupPolicy
- type CorsPolicy
- type CreateMode
- type CreateUpdateOptions
- type CreatedByType
- type DataCenterResource
- type DataCenterResourceProperties
- type DataType
- type DatabaseAccountConnectionString
- type DatabaseAccountCreateUpdateParameters
- type DatabaseAccountCreateUpdateProperties
- type DatabaseAccountGetProperties
- type DatabaseAccountGetResults
- 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 GremlinDatabaseCreateUpdateParameters
- type GremlinDatabaseCreateUpdateProperties
- type GremlinDatabaseGetProperties
- type GremlinDatabaseGetPropertiesOptions
- type GremlinDatabaseGetPropertiesResource
- type GremlinDatabaseGetResults
- type GremlinDatabaseListResult
- type GremlinDatabaseResource
- 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) 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 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 GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse
- type GremlinResourcesClientUpdateGremlinGraphThroughputResponse
- type IPAddressOrRange
- type IncludedPath
- type IndexKind
- type Indexes
- type IndexingMode
- type IndexingPolicy
- type KeyKind
- 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 Metric
- type MetricAvailability
- type MetricDefinition
- type MetricDefinitionsListResult
- type MetricListResult
- type MetricName
- type MetricValue
- 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) 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) 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) NewListMongoDBCollectionsPager(resourceGroupName string, accountName string, databaseName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoDBCollectionsResponse]
- func (client *MongoDBResourcesClient) NewListMongoDBDatabasesPager(resourceGroupName string, accountName string, ...) *runtime.Pager[MongoDBResourcesClientListMongoDBDatabasesResponse]
- type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions
- type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions
- type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions
- type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions
- type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions
- type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions
- type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions
- type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions
- type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions
- type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions
- type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions
- type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse
- type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse
- type MongoDBResourcesClientDeleteMongoDBCollectionResponse
- type MongoDBResourcesClientDeleteMongoDBDatabaseResponse
- type MongoDBResourcesClientGetMongoDBCollectionOptions
- type MongoDBResourcesClientGetMongoDBCollectionResponse
- type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions
- type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse
- type MongoDBResourcesClientGetMongoDBDatabaseOptions
- type MongoDBResourcesClientGetMongoDBDatabaseResponse
- type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions
- type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse
- type MongoDBResourcesClientListMongoDBCollectionsOptions
- type MongoDBResourcesClientListMongoDBCollectionsResponse
- type MongoDBResourcesClientListMongoDBDatabasesOptions
- type MongoDBResourcesClientListMongoDBDatabasesResponse
- type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse
- type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse
- type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse
- type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse
- type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse
- type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse
- type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse
- type MongoIndex
- type MongoIndexKeys
- type MongoIndexOptions
- 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 ProxyResource
- type PublicNetworkAccess
- type RegionForOnlineOffline
- type Resource
- type ResourceIdentityType
- 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 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 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 RestorableSQLResourcesListResult
- type RestoreMode
- type RestoreParameters
- 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 SQLResourcesClient
- 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) 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) 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 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 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 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 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 SpatialSpec
- type SpatialType
- 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) 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 TableResourcesClientBeginUpdateTableThroughputOptions
- type TableResourcesClientCreateUpdateTableResponse
- type TableResourcesClientDeleteTableResponse
- type TableResourcesClientGetTableOptions
- type TableResourcesClientGetTableResponse
- type TableResourcesClientGetTableThroughputOptions
- type TableResourcesClientGetTableThroughputResponse
- type TableResourcesClientListTablesOptions
- type TableResourcesClientListTablesResponse
- type TableResourcesClientMigrateTableToAutoscaleResponse
- type TableResourcesClientMigrateTableToManualThroughputResponse
- type TableResourcesClientUpdateTableThroughputResponse
- type ThroughputPolicyResource
- type ThroughputSettingsGetProperties
- type ThroughputSettingsGetPropertiesResource
- type ThroughputSettingsGetResults
- type ThroughputSettingsResource
- type ThroughputSettingsUpdateParameters
- type ThroughputSettingsUpdateProperties
- type TriggerOperation
- type TriggerType
- 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
- DatabaseAccountsClient.BeginDelete
- DatabaseAccountsClient.BeginFailoverPriorityChange
- DatabaseAccountsClient.BeginOfflineRegion
- DatabaseAccountsClient.BeginOnlineRegion
- DatabaseAccountsClient.BeginRegenerateKey
- DatabaseAccountsClient.BeginUpdate
- DatabaseAccountsClient.CheckNameExists
- DatabaseAccountsClient.Get
- DatabaseAccountsClient.GetReadOnlyKeys
- DatabaseAccountsClient.ListConnectionStrings
- DatabaseAccountsClient.ListKeys
- DatabaseAccountsClient.ListReadOnlyKeys
- 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.BeginUpdateGremlinDatabaseThroughput
- GremlinResourcesClient.BeginUpdateGremlinGraphThroughput
- GremlinResourcesClient.GetGremlinDatabase
- GremlinResourcesClient.GetGremlinDatabaseThroughput
- GremlinResourcesClient.GetGremlinGraph
- GremlinResourcesClient.GetGremlinGraphThroughput
- GremlinResourcesClient.NewListGremlinDatabasesPager
- GremlinResourcesClient.NewListGremlinGraphsPager
- LocationsClient.Get
- LocationsClient.NewListPager
- MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection
- MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase
- MongoDBResourcesClient.BeginDeleteMongoDBCollection
- MongoDBResourcesClient.BeginDeleteMongoDBDatabase
- MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale
- MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput
- MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale
- MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput
- MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation
- MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput
- MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput
- MongoDBResourcesClient.GetMongoDBCollection
- MongoDBResourcesClient.GetMongoDBCollectionThroughput
- MongoDBResourcesClient.GetMongoDBDatabase
- MongoDBResourcesClient.GetMongoDBDatabaseThroughput
- MongoDBResourcesClient.NewListMongoDBCollectionsPager
- MongoDBResourcesClient.NewListMongoDBDatabasesPager
- 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
- RestorableMongodbCollectionsClient.NewListPager
- RestorableMongodbDatabasesClient.NewListPager
- RestorableMongodbResourcesClient.NewListPager
- RestorableSQLContainersClient.NewListPager
- RestorableSQLDatabasesClient.NewListPager
- RestorableSQLResourcesClient.NewListPager
- SQLResourcesClient.BeginRetrieveContinuousBackupInformation
- TableResourcesClient.BeginCreateUpdateTable
- TableResourcesClient.BeginDeleteTable
- TableResourcesClient.BeginMigrateTableToAutoscale
- TableResourcesClient.BeginMigrateTableToManualThroughput
- 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 `json:"serverVersion,omitempty"` }
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
ARMProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags
type ARMResourceProperties ¶
type ARMResourceProperties struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type AnalyticalStorageConfiguration ¶
type AnalyticalStorageConfiguration struct { // Describes the types of schema for analytical storage. SchemaType *AnalyticalStorageSchemaType `json:"schemaType,omitempty"` }
AnalyticalStorageConfiguration - Analytical storage specific properties.
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" AuthenticationMethodNone AuthenticationMethod = "None" )
func PossibleAuthenticationMethodValues ¶
func PossibleAuthenticationMethodValues() []AuthenticationMethod
PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type.
type AutoUpgradePolicyResource ¶
type AutoUpgradePolicyResource struct { // Represents throughput policy which service must adhere to for auto-upgrade ThroughputPolicy *ThroughputPolicyResource `json:"throughputPolicy,omitempty"` }
AutoUpgradePolicyResource - Cosmos DB resource auto-upgrade policy
type AutoscaleSettings ¶
type AutoscaleSettings struct { // Represents maximum throughput, the resource can scale up to. MaxThroughput *int32 `json:"maxThroughput,omitempty"` }
type AutoscaleSettingsResource ¶
type AutoscaleSettingsResource struct { // REQUIRED; Represents maximum throughput container can scale up to. MaxThroughput *int32 `json:"maxThroughput,omitempty"` // Cosmos DB resource auto-upgrade policy AutoUpgradePolicy *AutoUpgradePolicyResource `json:"autoUpgradePolicy,omitempty"` // READ-ONLY; Represents target maximum throughput container can scale up to once offer is no longer in pending state. TargetMaxThroughput *int32 `json:"targetMaxThroughput,omitempty" azure:"ro"` }
AutoscaleSettingsResource - Cosmos DB provisioned throughput settings object
type BackupInformation ¶
type BackupInformation struct { // READ-ONLY; Information about the status of continuous backups. ContinuousBackupInformation *ContinuousBackupInformation `json:"continuousBackupInformation,omitempty" azure:"ro"` }
BackupInformation - Backup information of a resource.
type BackupPolicy ¶
type BackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType `json:"type,omitempty"` // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` }
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.
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 `json:"startTime,omitempty"` // Describes the status of migration between backup policy types. Status *BackupPolicyMigrationStatus `json:"status,omitempty"` // Describes the target backup policy type of the backup policy migration. TargetType *BackupPolicyType `json:"targetType,omitempty"` }
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 `json:"name,omitempty"` }
Capability - Cosmos DB capability object
type Capacity ¶ added in v0.2.0
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 `json:"totalThroughputLimit,omitempty"` }
Capacity - The object that represents all properties related to capacity enforcement on an account.
type CassandraClusterPublicStatus ¶ added in v0.2.0
type CassandraClusterPublicStatus struct { // List relevant information about any connection errors to the Datacenters. ConnectionErrors []*ConnectionError `json:"connectionErrors,omitempty"` // List of the status of each datacenter in this cluster. DataCenters []*CassandraClusterPublicStatusDataCentersItem `json:"dataCenters,omitempty"` ETag *string `json:"eTag,omitempty"` ReaperStatus *ManagedCassandraReaperStatus `json:"reaperStatus,omitempty"` }
CassandraClusterPublicStatus - Properties of a managed Cassandra cluster public status.
type CassandraClusterPublicStatusDataCentersItem ¶ added in v0.2.0
type CassandraClusterPublicStatusDataCentersItem struct { // The name of this Datacenter. Name *string `json:"name,omitempty"` Nodes []*ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems `json:"nodes,omitempty"` // A list of all seed nodes in the cluster, managed and unmanaged. SeedNodes []*string `json:"seedNodes,omitempty"` }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
Output:
func (*CassandraClustersClient) BeginDeallocate ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterDeallocate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraCommand.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterStart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CassandraClustersClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *CassandraClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *CassandraClustersClientListByResourceGroupOptions) *runtime.Pager[CassandraClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all managed Cassandra clusters in this resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 resourceGroupName - The name of the resource group. The name is case insensitive. options - CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("cassandra-prod-rg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CassandraClustersClient) NewListBySubscriptionPager ¶ added in v0.5.0
func (client *CassandraClustersClient) NewListBySubscriptionPager(options *CassandraClustersClientListBySubscriptionOptions) *runtime.Pager[CassandraClustersClientListBySubscriptionResponse]
NewListBySubscriptionPager - List all managed Cassandra clusters in this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 options - CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraClusterListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CassandraClustersClient) Status ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraClustersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Status(ctx, "cassandra-prod-rg", "cassandra-prod", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type CassandraClustersClientBeginCreateUpdateOptions ¶ added in v0.3.0
type CassandraClustersClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginCreateUpdate method.
type CassandraClustersClientBeginDeallocateOptions ¶ added in v0.3.0
type CassandraClustersClientBeginDeallocateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginDeallocateOptions contains the optional parameters for the CassandraClustersClient.BeginDeallocate method.
type CassandraClustersClientBeginDeleteOptions ¶ added in v0.3.0
type CassandraClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginDeleteOptions contains the optional parameters for the CassandraClustersClient.BeginDelete method.
type CassandraClustersClientBeginInvokeCommandOptions ¶ added in v0.3.0
type CassandraClustersClientBeginInvokeCommandOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginInvokeCommandOptions contains the optional parameters for the CassandraClustersClient.BeginInvokeCommand method.
type CassandraClustersClientBeginStartOptions ¶ added in v0.3.0
type CassandraClustersClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginStartOptions contains the optional parameters for the CassandraClustersClient.BeginStart method.
type CassandraClustersClientBeginUpdateOptions ¶ added in v0.3.0
type CassandraClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraClustersClientBeginUpdateOptions contains the optional parameters for the CassandraClustersClient.BeginUpdate method.
type CassandraClustersClientCreateUpdateResponse ¶ added in v0.3.0
type CassandraClustersClientCreateUpdateResponse struct {
ClusterResource
}
CassandraClustersClientCreateUpdateResponse contains the response from method CassandraClustersClient.CreateUpdate.
type CassandraClustersClientDeallocateResponse ¶ added in v0.3.0
type CassandraClustersClientDeallocateResponse struct { }
CassandraClustersClientDeallocateResponse contains the response from method CassandraClustersClient.Deallocate.
type CassandraClustersClientDeleteResponse ¶ added in v0.3.0
type CassandraClustersClientDeleteResponse struct { }
CassandraClustersClientDeleteResponse contains the response from method CassandraClustersClient.Delete.
type CassandraClustersClientGetOptions ¶ added in v0.3.0
type CassandraClustersClientGetOptions struct { }
CassandraClustersClientGetOptions contains the optional parameters for the CassandraClustersClient.Get method.
type CassandraClustersClientGetResponse ¶ added in v0.3.0
type CassandraClustersClientGetResponse struct {
ClusterResource
}
CassandraClustersClientGetResponse contains the response from method CassandraClustersClient.Get.
type CassandraClustersClientInvokeCommandResponse ¶ added in v0.3.0
type CassandraClustersClientInvokeCommandResponse struct {
CommandOutput
}
CassandraClustersClientInvokeCommandResponse contains the response from method CassandraClustersClient.InvokeCommand.
type CassandraClustersClientListByResourceGroupOptions ¶ added in v0.3.0
type CassandraClustersClientListByResourceGroupOptions struct { }
CassandraClustersClientListByResourceGroupOptions contains the optional parameters for the CassandraClustersClient.ListByResourceGroup method.
type CassandraClustersClientListByResourceGroupResponse ¶ added in v0.3.0
type CassandraClustersClientListByResourceGroupResponse struct {
ListClusters
}
CassandraClustersClientListByResourceGroupResponse contains the response from method CassandraClustersClient.ListByResourceGroup.
type CassandraClustersClientListBySubscriptionOptions ¶ added in v0.3.0
type CassandraClustersClientListBySubscriptionOptions struct { }
CassandraClustersClientListBySubscriptionOptions contains the optional parameters for the CassandraClustersClient.ListBySubscription method.
type CassandraClustersClientListBySubscriptionResponse ¶ added in v0.3.0
type CassandraClustersClientListBySubscriptionResponse struct {
ListClusters
}
CassandraClustersClientListBySubscriptionResponse contains the response from method CassandraClustersClient.ListBySubscription.
type CassandraClustersClientStartResponse ¶ added in v0.3.0
type CassandraClustersClientStartResponse struct { }
CassandraClustersClientStartResponse contains the response from method CassandraClustersClient.Start.
type CassandraClustersClientStatusOptions ¶ added in v0.3.0
type CassandraClustersClientStatusOptions struct { }
CassandraClustersClientStatusOptions contains the optional parameters for the CassandraClustersClient.Status method.
type CassandraClustersClientStatusResponse ¶ added in v0.3.0
type CassandraClustersClientStatusResponse struct {
CassandraClusterPublicStatus
}
CassandraClustersClientStatusResponse contains the response from method CassandraClustersClient.Status.
type CassandraClustersClientUpdateResponse ¶ added in v0.3.0
type CassandraClustersClientUpdateResponse struct {
ClusterResource
}
CassandraClustersClientUpdateResponse contains the response from method CassandraClustersClient.Update.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraDataCenterCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraDataCentersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraDataCenterDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraDataCentersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraDataCenterPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraDataCentersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraDataCenterGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraDataCentersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "cassandra-prod-rg", "cassandra-prod", "dc1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CassandraDataCentersClient) NewListPager ¶ added in v0.5.0
func (client *CassandraDataCentersClient) NewListPager(resourceGroupName string, clusterName string, options *CassandraDataCentersClientListOptions) *runtime.Pager[CassandraDataCentersClientListResponse]
NewListPager - List all data centers in a particular managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBManagedCassandraDataCenterList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraDataCentersClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("cassandra-prod-rg", "cassandra-prod", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CassandraDataCentersClientBeginCreateUpdateOptions ¶ added in v0.3.0
type CassandraDataCentersClientBeginCreateUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginCreateUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginCreateUpdate method.
type CassandraDataCentersClientBeginDeleteOptions ¶ added in v0.3.0
type CassandraDataCentersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginDeleteOptions contains the optional parameters for the CassandraDataCentersClient.BeginDelete method.
type CassandraDataCentersClientBeginUpdateOptions ¶ added in v0.3.0
type CassandraDataCentersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraDataCentersClientBeginUpdateOptions contains the optional parameters for the CassandraDataCentersClient.BeginUpdate method.
type CassandraDataCentersClientCreateUpdateResponse ¶ added in v0.3.0
type CassandraDataCentersClientCreateUpdateResponse struct {
DataCenterResource
}
CassandraDataCentersClientCreateUpdateResponse contains the response from method CassandraDataCentersClient.CreateUpdate.
type CassandraDataCentersClientDeleteResponse ¶ added in v0.3.0
type CassandraDataCentersClientDeleteResponse struct { }
CassandraDataCentersClientDeleteResponse contains the response from method CassandraDataCentersClient.Delete.
type CassandraDataCentersClientGetOptions ¶ added in v0.3.0
type CassandraDataCentersClientGetOptions struct { }
CassandraDataCentersClientGetOptions contains the optional parameters for the CassandraDataCentersClient.Get method.
type CassandraDataCentersClientGetResponse ¶ added in v0.3.0
type CassandraDataCentersClientGetResponse struct {
DataCenterResource
}
CassandraDataCentersClientGetResponse contains the response from method CassandraDataCentersClient.Get.
type CassandraDataCentersClientListOptions ¶ added in v0.3.0
type CassandraDataCentersClientListOptions struct { }
CassandraDataCentersClientListOptions contains the optional parameters for the CassandraDataCentersClient.List method.
type CassandraDataCentersClientListResponse ¶ added in v0.3.0
type CassandraDataCentersClientListResponse struct {
ListDataCenters
}
CassandraDataCentersClientListResponse contains the response from method CassandraDataCentersClient.List.
type CassandraDataCentersClientUpdateResponse ¶ added in v0.3.0
type CassandraDataCentersClientUpdateResponse struct {
DataCenterResource
}
CassandraDataCentersClientUpdateResponse contains the response from method CassandraDataCentersClient.Update.
type CassandraKeyspaceCreateUpdateParameters ¶
type CassandraKeyspaceCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra keyspace. Properties *CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type CassandraKeyspaceCreateUpdateProperties ¶
type CassandraKeyspaceCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a Cassandra keyspace Resource *CassandraKeyspaceResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace.
type CassandraKeyspaceGetProperties ¶
type CassandraKeyspaceGetProperties struct { Options *CassandraKeyspaceGetPropertiesOptions `json:"options,omitempty"` Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"` }
CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace
type CassandraKeyspaceGetPropertiesOptions ¶
type CassandraKeyspaceGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type CassandraKeyspaceGetPropertiesResource ¶
type CassandraKeyspaceGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Cassandra keyspace ID *string `json:"id,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type CassandraKeyspaceGetResults ¶
type CassandraKeyspaceGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB Cassandra keyspace Properties *CassandraKeyspaceGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type CassandraKeyspaceListResult ¶
type CassandraKeyspaceListResult struct { // READ-ONLY; List of Cassandra keyspaces and their properties. Value []*CassandraKeyspaceGetResults `json:"value,omitempty" azure:"ro"` }
CassandraKeyspaceListResult - The List operation response, that contains the Cassandra keyspaces and their properties.
type CassandraKeyspaceResource ¶
type CassandraKeyspaceResource struct { // REQUIRED; Name of the Cosmos DB Cassandra keyspace ID *string `json:"id,omitempty"` }
CassandraKeyspaceResource - Cosmos DB Cassandra keyspace resource object
type CassandraPartitionKey ¶
type CassandraPartitionKey struct { // Name of the Cosmos DB Cassandra table partition key Name *string `json:"name,omitempty"` }
CassandraPartitionKey - Cosmos DB Cassandra table partition key
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetCassandraKeyspace(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetCassandraKeyspaceThroughput(ctx, "rg1", "ddb1", "keyspaceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetCassandraTable(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetCassandraTableThroughput(ctx, "rg1", "ddb1", "keyspaceName", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CassandraResourcesClient) NewListCassandraKeyspacesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListCassandraKeyspaces method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraKeyspaceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListCassandraKeyspacesPager("rgName", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CassandraResourcesClient) NewListCassandraTablesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListCassandraTables method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCassandraTableList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCassandraResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListCassandraTablesPager("rgName", "ddb1", "keyspaceName", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginCreateUpdateCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraKeyspace method.
type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginCreateUpdateCassandraTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginCreateUpdateCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraTable method.
type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginDeleteCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraKeyspace method.
type CassandraResourcesClientBeginDeleteCassandraTableOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginDeleteCassandraTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginDeleteCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraTable method.
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraKeyspaceToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToAutoscale method.
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraKeyspaceToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraKeyspaceToManualThroughput method.
type CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraTableToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToAutoscale method.
type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginMigrateCassandraTableToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraTableToManualThroughput method.
type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginUpdateCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraKeyspaceThroughput method.
type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CassandraResourcesClientBeginUpdateCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraTableThroughput method.
type CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse ¶ added in v0.3.0
type CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse struct {
CassandraKeyspaceGetResults
}
CassandraResourcesClientCreateUpdateCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.CreateUpdateCassandraKeyspace.
type CassandraResourcesClientCreateUpdateCassandraTableResponse ¶ added in v0.3.0
type CassandraResourcesClientCreateUpdateCassandraTableResponse struct {
CassandraTableGetResults
}
CassandraResourcesClientCreateUpdateCassandraTableResponse contains the response from method CassandraResourcesClient.CreateUpdateCassandraTable.
type CassandraResourcesClientDeleteCassandraKeyspaceResponse ¶ added in v0.3.0
type CassandraResourcesClientDeleteCassandraKeyspaceResponse struct { }
CassandraResourcesClientDeleteCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.DeleteCassandraKeyspace.
type CassandraResourcesClientDeleteCassandraTableResponse ¶ added in v0.3.0
type CassandraResourcesClientDeleteCassandraTableResponse struct { }
CassandraResourcesClientDeleteCassandraTableResponse contains the response from method CassandraResourcesClient.DeleteCassandraTable.
type CassandraResourcesClientGetCassandraKeyspaceOptions ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraKeyspaceOptions struct { }
CassandraResourcesClientGetCassandraKeyspaceOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspace method.
type CassandraResourcesClientGetCassandraKeyspaceResponse ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraKeyspaceResponse struct {
CassandraKeyspaceGetResults
}
CassandraResourcesClientGetCassandraKeyspaceResponse contains the response from method CassandraResourcesClient.GetCassandraKeyspace.
type CassandraResourcesClientGetCassandraKeyspaceThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraKeyspaceThroughputOptions struct { }
CassandraResourcesClientGetCassandraKeyspaceThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraKeyspaceThroughput method.
type CassandraResourcesClientGetCassandraKeyspaceThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraKeyspaceThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientGetCassandraKeyspaceThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraKeyspaceThroughput.
type CassandraResourcesClientGetCassandraTableOptions ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraTableOptions struct { }
CassandraResourcesClientGetCassandraTableOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTable method.
type CassandraResourcesClientGetCassandraTableResponse ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraTableResponse struct {
CassandraTableGetResults
}
CassandraResourcesClientGetCassandraTableResponse contains the response from method CassandraResourcesClient.GetCassandraTable.
type CassandraResourcesClientGetCassandraTableThroughputOptions ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraTableThroughputOptions struct { }
CassandraResourcesClientGetCassandraTableThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraTableThroughput method.
type CassandraResourcesClientGetCassandraTableThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientGetCassandraTableThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientGetCassandraTableThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraTableThroughput.
type CassandraResourcesClientListCassandraKeyspacesOptions ¶ added in v0.3.0
type CassandraResourcesClientListCassandraKeyspacesOptions struct { }
CassandraResourcesClientListCassandraKeyspacesOptions contains the optional parameters for the CassandraResourcesClient.ListCassandraKeyspaces method.
type CassandraResourcesClientListCassandraKeyspacesResponse ¶ added in v0.3.0
type CassandraResourcesClientListCassandraKeyspacesResponse struct {
CassandraKeyspaceListResult
}
CassandraResourcesClientListCassandraKeyspacesResponse contains the response from method CassandraResourcesClient.ListCassandraKeyspaces.
type CassandraResourcesClientListCassandraTablesOptions ¶ added in v0.3.0
type CassandraResourcesClientListCassandraTablesOptions struct { }
CassandraResourcesClientListCassandraTablesOptions contains the optional parameters for the CassandraResourcesClient.ListCassandraTables method.
type CassandraResourcesClientListCassandraTablesResponse ¶ added in v0.3.0
type CassandraResourcesClientListCassandraTablesResponse struct {
CassandraTableListResult
}
CassandraResourcesClientListCassandraTablesResponse contains the response from method CassandraResourcesClient.ListCassandraTables.
type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse ¶ added in v0.3.0
type CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientMigrateCassandraKeyspaceToAutoscaleResponse contains the response from method CassandraResourcesClient.MigrateCassandraKeyspaceToAutoscale.
type CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientMigrateCassandraKeyspaceToManualThroughputResponse contains the response from method CassandraResourcesClient.MigrateCassandraKeyspaceToManualThroughput.
type CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse ¶ added in v0.3.0
type CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientMigrateCassandraTableToAutoscaleResponse contains the response from method CassandraResourcesClient.MigrateCassandraTableToAutoscale.
type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientMigrateCassandraTableToManualThroughputResponse contains the response from method CassandraResourcesClient.MigrateCassandraTableToManualThroughput.
type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientUpdateCassandraKeyspaceThroughputResponse contains the response from method CassandraResourcesClient.UpdateCassandraKeyspaceThroughput.
type CassandraResourcesClientUpdateCassandraTableThroughputResponse ¶ added in v0.3.0
type CassandraResourcesClientUpdateCassandraTableThroughputResponse struct {
ThroughputSettingsGetResults
}
CassandraResourcesClientUpdateCassandraTableThroughputResponse contains the response from method CassandraResourcesClient.UpdateCassandraTableThroughput.
type CassandraSchema ¶
type CassandraSchema struct { // List of cluster key. ClusterKeys []*ClusterKey `json:"clusterKeys,omitempty"` // List of Cassandra table columns. Columns []*Column `json:"columns,omitempty"` // List of partition key. PartitionKeys []*CassandraPartitionKey `json:"partitionKeys,omitempty"` }
CassandraSchema - Cosmos DB Cassandra table schema
func (CassandraSchema) MarshalJSON ¶
func (c CassandraSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CassandraSchema.
type CassandraTableCreateUpdateParameters ¶
type CassandraTableCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Cassandra table. Properties *CassandraTableCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type CassandraTableCreateUpdateProperties ¶
type CassandraTableCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a Cassandra table Resource *CassandraTableResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table.
type CassandraTableGetProperties ¶
type CassandraTableGetProperties struct { Options *CassandraTableGetPropertiesOptions `json:"options,omitempty"` Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"` }
CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table
type CassandraTableGetPropertiesOptions ¶
type CassandraTableGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type CassandraTableGetPropertiesResource ¶
type CassandraTableGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Cassandra table ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` // Time to live of the Cosmos DB Cassandra table DefaultTTL *int32 `json:"defaultTtl,omitempty"` // Schema of the Cosmos DB Cassandra table Schema *CassandraSchema `json:"schema,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type CassandraTableGetResults ¶
type CassandraTableGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB Cassandra table Properties *CassandraTableGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type CassandraTableListResult ¶
type CassandraTableListResult struct { // READ-ONLY; List of Cassandra tables and their properties. Value []*CassandraTableGetResults `json:"value,omitempty" azure:"ro"` }
CassandraTableListResult - The List operation response, that contains the Cassandra tables and their properties.
type CassandraTableResource ¶
type CassandraTableResource struct { // REQUIRED; Name of the Cosmos DB Cassandra table ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` // Time to live of the Cosmos DB Cassandra table DefaultTTL *int32 `json:"defaultTtl,omitempty"` // Schema of the Cosmos DB Cassandra table Schema *CassandraSchema `json:"schema,omitempty"` }
CassandraTableResource - Cosmos DB Cassandra table resource object
type Certificate ¶
type Certificate struct { // PEM formatted public key. Pem *string `json:"pem,omitempty"` }
type CloudError ¶
type CloudError struct { // Error Response. Error *ErrorResponse `json:"error,omitempty"` }
CloudError - An error response from the service.
type ClusterKey ¶
type ClusterKey struct { // Name of the Cosmos DB Cassandra table cluster key Name *string `json:"name,omitempty"` // Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc" OrderBy *string `json:"orderBy,omitempty"` }
ClusterKey - Cosmos DB Cassandra table cluster key
type ClusterResource ¶
type ClusterResource struct { // Identity for the resource. Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // Properties of a managed Cassandra cluster. Properties *ClusterResourceProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
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 `json:"authenticationMethod,omitempty"` // Whether Cassandra audit logging is enabled CassandraAuditLoggingEnabled *bool `json:"cassandraAuditLoggingEnabled,omitempty"` // 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 `json:"cassandraVersion,omitempty"` // 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 `json:"clientCertificates,omitempty"` // 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 `json:"clusterNameOverride,omitempty"` // Whether the cluster and associated data centers has been deallocated. Deallocated *bool `json:"deallocated,omitempty"` // 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 `json:"delegatedManagementSubnetId,omitempty"` // 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 `json:"externalGossipCertificates,omitempty"` // 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 `json:"externalSeedNodes,omitempty"` // Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0. HoursBetweenBackups *int32 `json:"hoursBetweenBackups,omitempty"` // 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 `json:"initialCassandraAdminPassword,omitempty"` // Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. PrometheusEndpoint *SeedNode `json:"prometheusEndpoint,omitempty"` // The status of the resource at the time the operation was called. ProvisioningState *ManagedCassandraProvisioningState `json:"provisioningState,omitempty"` // 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 `json:"repairEnabled,omitempty"` // 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 `json:"restoreFromBackupId,omitempty"` // 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 `json:"gossipCertificates,omitempty" azure:"ro"` // 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 `json:"seedNodes,omitempty" azure:"ro"` }
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.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetricDefinitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionGetMetricDefinitions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListMetricDefinitionsPager("rg1", "ddb1", "databaseRid", "collectionRid", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CollectionClient) NewListMetricsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CollectionClient) NewListUsagesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListUsages method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionGetUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListUsagesPager("rg1", "ddb1", "databaseRid", "collectionRid", &armcosmos.CollectionClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CollectionClientListMetricDefinitionsOptions ¶ added in v0.3.0
type CollectionClientListMetricDefinitionsOptions struct { }
CollectionClientListMetricDefinitionsOptions contains the optional parameters for the CollectionClient.ListMetricDefinitions method.
type CollectionClientListMetricDefinitionsResponse ¶ added in v0.3.0
type CollectionClientListMetricDefinitionsResponse struct {
MetricDefinitionsListResult
}
CollectionClientListMetricDefinitionsResponse contains the response from method CollectionClient.ListMetricDefinitions.
type CollectionClientListMetricsOptions ¶ added in v0.3.0
type CollectionClientListMetricsOptions struct { }
CollectionClientListMetricsOptions contains the optional parameters for the CollectionClient.ListMetrics method.
type CollectionClientListMetricsResponse ¶ added in v0.3.0
type CollectionClientListMetricsResponse struct {
MetricListResult
}
CollectionClientListMetricsResponse contains the response from method CollectionClient.ListMetrics.
type CollectionClientListUsagesOptions ¶ added in v0.3.0
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.ListUsages method.
type CollectionClientListUsagesResponse ¶ added in v0.3.0
type CollectionClientListUsagesResponse struct {
UsagesResult
}
CollectionClientListUsagesResponse contains the response from method CollectionClient.ListUsages.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionPartitionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionPartitionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CollectionPartitionClient) NewListUsagesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListUsages method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionPartitionGetUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionPartitionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListUsagesPager("rg1", "ddb1", "databaseRid", "collectionRid", &armcosmos.CollectionPartitionClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Partition Storage'")}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CollectionPartitionClientListMetricsOptions ¶ added in v0.3.0
type CollectionPartitionClientListMetricsOptions struct { }
CollectionPartitionClientListMetricsOptions contains the optional parameters for the CollectionPartitionClient.ListMetrics method.
type CollectionPartitionClientListMetricsResponse ¶ added in v0.3.0
type CollectionPartitionClientListMetricsResponse struct {
PartitionMetricListResult
}
CollectionPartitionClientListMetricsResponse contains the response from method CollectionPartitionClient.ListMetrics.
type CollectionPartitionClientListUsagesOptions ¶ added in v0.3.0
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.ListUsages method.
type CollectionPartitionClientListUsagesResponse ¶ added in v0.3.0
type CollectionPartitionClientListUsagesResponse struct {
PartitionUsagesResult
}
CollectionPartitionClientListUsagesResponse contains the response from method CollectionPartitionClient.ListUsages.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBCollectionPartitionRegionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionPartitionRegionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CollectionPartitionRegionClientListMetricsOptions ¶ added in v0.3.0
type CollectionPartitionRegionClientListMetricsOptions struct { }
CollectionPartitionRegionClientListMetricsOptions contains the optional parameters for the CollectionPartitionRegionClient.ListMetrics method.
type CollectionPartitionRegionClientListMetricsResponse ¶ added in v0.3.0
type CollectionPartitionRegionClientListMetricsResponse struct {
PartitionMetricListResult
}
CollectionPartitionRegionClientListMetricsResponse contains the response from method CollectionPartitionRegionClient.ListMetrics.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRegionCollectionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewCollectionRegionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CollectionRegionClientListMetricsOptions ¶ added in v0.3.0
type CollectionRegionClientListMetricsOptions struct { }
CollectionRegionClientListMetricsOptions contains the optional parameters for the CollectionRegionClient.ListMetrics method.
type CollectionRegionClientListMetricsResponse ¶ added in v0.3.0
type CollectionRegionClientListMetricsResponse struct {
MetricListResult
}
CollectionRegionClientListMetricsResponse contains the response from method CollectionRegionClient.ListMetrics.
type Column ¶
type Column struct { // Name of the Cosmos DB Cassandra table column Name *string `json:"name,omitempty"` // Type of the Cosmos DB Cassandra table column Type *string `json:"type,omitempty"` }
Column - Cosmos DB Cassandra table column
type CommandOutput ¶ added in v0.2.0
type CommandOutput struct { // Output of the command. CommandOutput *string `json:"commandOutput,omitempty"` }
CommandOutput - Response of /command api
type CommandPostBody ¶ added in v0.2.0
type CommandPostBody struct { // REQUIRED; The command which should be run Command *string `json:"command,omitempty"` // REQUIRED; IP address of the cassandra host to run the command on Host *string `json:"host,omitempty"` // The arguments for the command to be run Arguments map[string]*string `json:"arguments,omitempty"` // If true, stops cassandra before executing the command and then start it again CassandraStopStart *bool `json:"cassandra-stop-start,omitempty"` // If true, allows the command to write to the cassandra directory, otherwise read-only. Readwrite *bool `json:"readwrite,omitempty"` }
CommandPostBody - Specification of which command to run where
func (CommandPostBody) MarshalJSON ¶ added in v0.2.0
func (c CommandPostBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CommandPostBody.
type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties ¶
type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties struct { // READ-ONLY; The client id of user assigned identity. ClientID *string `json:"clientId,omitempty" azure:"ro"` // READ-ONLY; The principal id of user assigned identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` }
type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems ¶ added in v0.2.0
type ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems struct { // The node's IP address. Address *string `json:"address,omitempty"` // A float representing the current system-wide CPU utilization as a percentage. CPUUsage *float64 `json:"cpuUsage,omitempty"` // The amount of disk free, in kB, of the directory /var/lib/cassandra. DiskFreeKB *int64 `json:"diskFreeKB,omitempty"` // The amount of disk used, in kB, of the directory /var/lib/cassandra. DiskUsedKB *int64 `json:"diskUsedKB,omitempty"` // The network ID of the node. HostID *string `json:"hostID,omitempty"` // 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 `json:"load,omitempty"` // Memory used by kernel buffers (Buffers in /proc/meminfo) and page cache and slabs (Cached and SReclaimable in /proc/meminfo), // in kB. MemoryBuffersAndCachedKB *int64 `json:"memoryBuffersAndCachedKB,omitempty"` // Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. MemoryFreeKB *int64 `json:"memoryFreeKB,omitempty"` // Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB. MemoryTotalKB *int64 `json:"memoryTotalKB,omitempty"` // Used memory (calculated as total - free - buffers - cache), in kB. MemoryUsedKB *int64 `json:"memoryUsedKB,omitempty"` // The rack this node is part of. Rack *string `json:"rack,omitempty"` Size *int32 `json:"size,omitempty"` // The state of the node in Cassandra ring. State *NodeState `json:"state,omitempty"` Status *string `json:"status,omitempty"` // The timestamp when these statistics were captured. Timestamp *string `json:"timestamp,omitempty"` // List of tokens this node covers. Tokens []*string `json:"tokens,omitempty"` }
type CompositePath ¶
type CompositePath struct { // Sort order for composite paths. Order *CompositePathSortOrder `json:"order,omitempty"` // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string `json:"path,omitempty"` }
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 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 `json:"conflictResolutionPath,omitempty"` // The procedure to resolve conflicts in the case of custom mode. ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"` // Indicates the conflict resolution mode. Mode *ConflictResolutionMode `json:"mode,omitempty"` }
ConflictResolutionPolicy - The conflict resolution policy for the container.
type ConnectionError ¶ added in v0.2.0
type ConnectionError struct { // The kind of connection error that occurred. ConnectionState *ConnectionState `json:"connectionState,omitempty"` // Detailed error message about the failed connection. Exception *string `json:"exception,omitempty"` // The IP of host that originated the failed connection. IPFrom *string `json:"iPFrom,omitempty"` // The IP that the connection attempted to reach. IPTo *string `json:"iPTo,omitempty"` // The TCP port the connection was attempted on. Port *int32 `json:"port,omitempty"` }
type ConnectionState ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 `json:"defaultConsistencyLevel,omitempty"` // 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 `json:"maxIntervalInSeconds,omitempty"` // 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 `json:"maxStalenessPrefix,omitempty"` }
ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
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 `json:"kind,omitempty"` // List of paths using which data within the container can be partitioned Paths []*string `json:"paths,omitempty"` // Indicates the version of the partition key definition Version *int32 `json:"version,omitempty"` // READ-ONLY; Indicates if the container is using a system generated partition key SystemKey *bool `json:"systemKey,omitempty" azure:"ro"` }
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.
type ContinuousBackupInformation ¶
type ContinuousBackupInformation struct { // The latest restorable timestamp for a resource. LatestRestorableTimestamp *string `json:"latestRestorableTimestamp,omitempty"` }
ContinuousBackupInformation - Information about the status of continuous backups.
type ContinuousBackupRestoreLocation ¶
type ContinuousBackupRestoreLocation struct { // The name of the continuous backup restore location. Location *string `json:"location,omitempty"` }
ContinuousBackupRestoreLocation - Properties of the regional restorable account.
type ContinuousModeBackupPolicy ¶
type ContinuousModeBackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType `json:"type,omitempty"` // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` }
ContinuousModeBackupPolicy - The object representing continuous mode backup policy.
func (*ContinuousModeBackupPolicy) GetBackupPolicy ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (c *ContinuousModeBackupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousModeBackupPolicy.
type CorsPolicy ¶
type CorsPolicy struct { // REQUIRED; The origin domains that are permitted to make a request against the service via CORS. AllowedOrigins *string `json:"allowedOrigins,omitempty"` // The request headers that the origin domain may specify on the CORS request. AllowedHeaders *string `json:"allowedHeaders,omitempty"` // The methods (HTTP request verbs) that the origin domain may use for a CORS request. AllowedMethods *string `json:"allowedMethods,omitempty"` // 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 `json:"exposedHeaders,omitempty"` // The maximum amount time that a browser should cache the preflight OPTIONS request. MaxAgeInSeconds *int64 `json:"maxAgeInSeconds,omitempty"` }
CorsPolicy - The CORS policy for the Cosmos DB database account.
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. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Request Units per second. For example, "throughput": 10000. Throughput *int32 `json:"throughput,omitempty"` }
CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput"
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 `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
DataCenterResource - A managed Cassandra data center.
func (DataCenterResource) MarshalJSON ¶
func (d DataCenterResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataCenterResource.
type DataCenterResourceProperties ¶
type DataCenterResourceProperties struct { // If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra // data center virtual machines. AvailabilityZone *bool `json:"availabilityZone,omitempty"` // Indicates the Key Uri of the customer key to use for encryption of the backup storage account. BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty"` // 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 `json:"base64EncodedCassandraYamlFragment,omitempty"` // The region this data center should be created in. DataCenterLocation *string `json:"dataCenterLocation,omitempty"` // 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 `json:"delegatedSubnetId,omitempty"` // Number of disk used for data centers. Default value is 4. DiskCapacity *int32 `json:"diskCapacity,omitempty"` // Disk SKU used for data centers. Default value is P30. DiskSKU *string `json:"diskSku,omitempty"` // 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 `json:"managedDiskCustomerKeyUri,omitempty"` // 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 `json:"nodeCount,omitempty"` // The status of the resource at the time the operation was called. ProvisioningState *ManagedCassandraProvisioningState `json:"provisioningState,omitempty"` // Virtual Machine SKU used for data centers. Default value is StandardDS14v2 SKU *string `json:"sku,omitempty"` // 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 `json:"seedNodes,omitempty" azure:"ro"` }
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.
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 `json:"connectionString,omitempty" azure:"ro"` // READ-ONLY; Description of the connection string Description *string `json:"description,omitempty" azure:"ro"` }
DatabaseAccountConnectionString - Connection string for the Cosmos DB account
type DatabaseAccountCreateUpdateParameters ¶
type DatabaseAccountCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB database accounts. Properties *DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"` // Identity for the resource. Identity *ManagedServiceIdentity `json:"identity,omitempty"` // Indicates the type of database account. This can only be set at database account creation. Kind *DatabaseAccountKind `json:"kind,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type DatabaseAccountCreateUpdateProperties ¶
type DatabaseAccountCreateUpdateProperties struct { // REQUIRED; The offer type for the database DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"` // REQUIRED; An array that contains the georeplication locations enabled for the Cosmos DB account. Locations []*Location `json:"locations,omitempty"` // API specific properties. Currently, supported only for MongoDB API. APIProperties *APIProperties `json:"apiProperties,omitempty"` // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"` // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification `json:"backupPolicy,omitempty"` // List of Cosmos DB capabilities for the account Capabilities []*Capability `json:"capabilities,omitempty"` // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity `json:"capacity,omitempty"` // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer `json:"connectorOffer,omitempty"` // The consistency policy for the Cosmos DB account. ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy `json:"cors,omitempty"` // Enum to indicate the mode of account creation. CreateMode *CreateMode `json:"createMode,omitempty"` // 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 `json:"defaultIdentity,omitempty"` // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"` // 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 `json:"enableAutomaticFailover,omitempty"` // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // List of IpRules. IPRules []*IPAddressOrRange `json:"ipRules,omitempty"` // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` // The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass `json:"networkAclBypass,omitempty"` // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string `json:"networkAclBypassResourceIds,omitempty"` // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // Parameters to indicate the information about the restore. RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"` // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` }
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 `json:"apiProperties,omitempty"` // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"` // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification `json:"backupPolicy,omitempty"` // List of Cosmos DB capabilities for the account Capabilities []*Capability `json:"capabilities,omitempty"` // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity `json:"capacity,omitempty"` // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer `json:"connectorOffer,omitempty"` // The consistency policy for the Cosmos DB database account. ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy `json:"cors,omitempty"` // Enum to indicate the mode of account creation. CreateMode *CreateMode `json:"createMode,omitempty"` // 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 `json:"defaultIdentity,omitempty"` // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"` // 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 `json:"enableAutomaticFailover,omitempty"` // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // List of IpRules. IPRules []*IPAddressOrRange `json:"ipRules,omitempty"` // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` // The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass `json:"networkAclBypass,omitempty"` // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string `json:"networkAclBypassResourceIds,omitempty"` // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // Parameters to indicate the information about the restore. RestoreParameters *RestoreParameters `json:"restoreParameters,omitempty"` // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` // READ-ONLY; The offer type for the Cosmos DB database account. Default value: Standard. DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty" azure:"ro"` // READ-ONLY; The connection endpoint for the Cosmos DB database account. DocumentEndpoint *string `json:"documentEndpoint,omitempty" azure:"ro"` // READ-ONLY; An array that contains the regions ordered by their failover priorities. FailoverPolicies []*FailoverPolicy `json:"failoverPolicies,omitempty" azure:"ro"` // READ-ONLY; A unique identifier assigned to the database account InstanceID *string `json:"instanceId,omitempty" azure:"ro"` // READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account. Locations []*Location `json:"locations,omitempty" azure:"ro"` // READ-ONLY; List of Private Endpoint Connections configured for the Cosmos DB account. PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` // 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 `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account. ReadLocations []*Location `json:"readLocations,omitempty" azure:"ro"` // READ-ONLY; An array that contains the write location for the Cosmos DB account. WriteLocations []*Location `json:"writeLocations,omitempty" azure:"ro"` }
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 `json:"identity,omitempty"` // Indicates the type of database account. This can only be set at database account creation. Kind *DatabaseAccountKind `json:"kind,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // Properties for the database account. Properties *DatabaseAccountGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
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 `json:"connectionStrings,omitempty"` }
DatabaseAccountListConnectionStringsResult - The connection strings for the given database account.
type DatabaseAccountListKeysResult ¶
type DatabaseAccountListKeysResult struct { // READ-ONLY; Base 64 encoded value of the primary read-write key. PrimaryMasterKey *string `json:"primaryMasterKey,omitempty" azure:"ro"` // READ-ONLY; Base 64 encoded value of the primary read-only key. PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty" azure:"ro"` // READ-ONLY; Base 64 encoded value of the secondary read-write key. SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty" azure:"ro"` // READ-ONLY; Base 64 encoded value of the secondary read-only key. SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty" azure:"ro"` }
DatabaseAccountListKeysResult - The access keys for the given database account.
type DatabaseAccountListReadOnlyKeysResult ¶
type DatabaseAccountListReadOnlyKeysResult struct { // READ-ONLY; Base 64 encoded value of the primary read-only key. PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty" azure:"ro"` // READ-ONLY; Base 64 encoded value of the secondary read-only key. SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty" azure:"ro"` }
DatabaseAccountListReadOnlyKeysResult - The read-only access keys for the given database account.
type DatabaseAccountRegenerateKeyParameters ¶
type DatabaseAccountRegenerateKeyParameters struct { // REQUIRED; The access key to regenerate. KeyKind *KeyKind `json:"keyKind,omitempty"` }
DatabaseAccountRegenerateKeyParameters - Parameters to regenerate the keys within the database account.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountRegionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountRegionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseAccountRegionClientListMetricsOptions ¶ added in v0.3.0
type DatabaseAccountRegionClientListMetricsOptions struct { }
DatabaseAccountRegionClientListMetricsOptions contains the optional parameters for the DatabaseAccountRegionClient.ListMetrics method.
type DatabaseAccountRegionClientListMetricsResponse ¶ added in v0.3.0
type DatabaseAccountRegionClientListMetricsResponse struct {
MetricListResult
}
DatabaseAccountRegionClientListMetricsResponse contains the response from method DatabaseAccountRegionClient.ListMetrics.
type DatabaseAccountUpdateParameters ¶
type DatabaseAccountUpdateParameters struct { // Identity for the resource. Identity *ManagedServiceIdentity `json:"identity,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // Properties to update Azure Cosmos DB database accounts. Properties *DatabaseAccountUpdateProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` }
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.
type DatabaseAccountUpdateProperties ¶
type DatabaseAccountUpdateProperties struct { // API specific properties. Currently, supported only for MongoDB API. APIProperties *APIProperties `json:"apiProperties,omitempty"` // Analytical storage specific properties. AnalyticalStorageConfiguration *AnalyticalStorageConfiguration `json:"analyticalStorageConfiguration,omitempty"` // The object representing the policy for taking backups on an account. BackupPolicy BackupPolicyClassification `json:"backupPolicy,omitempty"` // List of Cosmos DB capabilities for the account Capabilities []*Capability `json:"capabilities,omitempty"` // The object that represents all properties related to capacity enforcement on an account. Capacity *Capacity `json:"capacity,omitempty"` // The cassandra connector offer type for the Cosmos DB database C* account. ConnectorOffer *ConnectorOffer `json:"connectorOffer,omitempty"` // The consistency policy for the Cosmos DB account. ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` // The CORS policy for the Cosmos DB database account. Cors []*CorsPolicy `json:"cors,omitempty"` // 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 `json:"defaultIdentity,omitempty"` // Disable write operations on metadata resources (databases, containers, throughput) via account keys DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"` // Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` // Flag to indicate whether to enable storage analytics. EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"` // 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 `json:"enableAutomaticFailover,omitempty"` // Enables the cassandra connector on the Cosmos DB C* account EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"` // Flag to indicate whether Free Tier is enabled. EnableFreeTier *bool `json:"enableFreeTier,omitempty"` // Enables the account to write in multiple locations EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"` // List of IpRules. IPRules []*IPAddressOrRange `json:"ipRules,omitempty"` // Flag to indicate whether to enable/disable Virtual Network ACL rules. IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` // The URI of the key vault KeyVaultKeyURI *string `json:"keyVaultKeyUri,omitempty"` // An array that contains the georeplication locations enabled for the Cosmos DB account. Locations []*Location `json:"locations,omitempty"` // Indicates what services are allowed to bypass firewall checks. NetworkACLBypass *NetworkACLBypass `json:"networkAclBypass,omitempty"` // An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. NetworkACLBypassResourceIDs []*string `json:"networkAclBypassResourceIds,omitempty"` // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` // List of Virtual Network ACL rules configured for the Cosmos DB account. VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` }
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 2021-10-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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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), 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"), }}, 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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountFailoverPriorityChange.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountOfflineRegion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountOnlineRegion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountRegenerateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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), 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), 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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountCheckNameExists.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetReadOnlyKeys(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountListConnectionStrings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListConnectionStrings(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountListKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListKeys(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountListReadOnlyKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListReadOnlyKeys(ctx, "rg1", "ddb1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DatabaseAccountsClient) NewListByResourceGroupPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 resourceGroupName - The name of the resource group. The name is case insensitive. options - DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("rg1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseAccountsClient) NewListMetricDefinitionsPager ¶ added in v0.5.0
func (client *DatabaseAccountsClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, options *DatabaseAccountsClientListMetricDefinitionsOptions) *runtime.Pager[DatabaseAccountsClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Retrieves metric definitions for the given database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetricDefinitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountGetMetricDefinitions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListMetricDefinitionsPager("rg1", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseAccountsClient) NewListMetricsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseAccountsClient) NewListPager ¶ added in v0.5.0
func (client *DatabaseAccountsClient) NewListPager(options *DatabaseAccountsClientListOptions) *runtime.Pager[DatabaseAccountsClientListResponse]
NewListPager - Lists all the Azure Cosmos DB database accounts available under the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 options - DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseAccountsClient) NewListUsagesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListUsages method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseAccountGetUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListUsagesPager("rg1", "ddb1", &armcosmos.DatabaseAccountsClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseAccountsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginCreateOrUpdate method.
type DatabaseAccountsClientBeginDeleteOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginDeleteOptions contains the optional parameters for the DatabaseAccountsClient.BeginDelete method.
type DatabaseAccountsClientBeginFailoverPriorityChangeOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginFailoverPriorityChangeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginFailoverPriorityChangeOptions contains the optional parameters for the DatabaseAccountsClient.BeginFailoverPriorityChange method.
type DatabaseAccountsClientBeginOfflineRegionOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginOfflineRegionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginOfflineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOfflineRegion method.
type DatabaseAccountsClientBeginOnlineRegionOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginOnlineRegionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginOnlineRegionOptions contains the optional parameters for the DatabaseAccountsClient.BeginOnlineRegion method.
type DatabaseAccountsClientBeginRegenerateKeyOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginRegenerateKeyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginRegenerateKeyOptions contains the optional parameters for the DatabaseAccountsClient.BeginRegenerateKey method.
type DatabaseAccountsClientBeginUpdateOptions ¶ added in v0.3.0
type DatabaseAccountsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseAccountsClientBeginUpdateOptions contains the optional parameters for the DatabaseAccountsClient.BeginUpdate method.
type DatabaseAccountsClientCheckNameExistsOptions ¶ added in v0.3.0
type DatabaseAccountsClientCheckNameExistsOptions struct { }
DatabaseAccountsClientCheckNameExistsOptions contains the optional parameters for the DatabaseAccountsClient.CheckNameExists method.
type DatabaseAccountsClientCheckNameExistsResponse ¶ added in v0.3.0
type DatabaseAccountsClientCheckNameExistsResponse struct { // Success indicates if the operation succeeded or failed. Success bool }
DatabaseAccountsClientCheckNameExistsResponse contains the response from method DatabaseAccountsClient.CheckNameExists.
type DatabaseAccountsClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseAccountsClientCreateOrUpdateResponse struct {
DatabaseAccountGetResults
}
DatabaseAccountsClientCreateOrUpdateResponse contains the response from method DatabaseAccountsClient.CreateOrUpdate.
type DatabaseAccountsClientDeleteResponse ¶ added in v0.3.0
type DatabaseAccountsClientDeleteResponse struct { }
DatabaseAccountsClientDeleteResponse contains the response from method DatabaseAccountsClient.Delete.
type DatabaseAccountsClientFailoverPriorityChangeResponse ¶ added in v0.3.0
type DatabaseAccountsClientFailoverPriorityChangeResponse struct { }
DatabaseAccountsClientFailoverPriorityChangeResponse contains the response from method DatabaseAccountsClient.FailoverPriorityChange.
type DatabaseAccountsClientGetOptions ¶ added in v0.3.0
type DatabaseAccountsClientGetOptions struct { }
DatabaseAccountsClientGetOptions contains the optional parameters for the DatabaseAccountsClient.Get method.
type DatabaseAccountsClientGetReadOnlyKeysOptions ¶ added in v0.3.0
type DatabaseAccountsClientGetReadOnlyKeysOptions struct { }
DatabaseAccountsClientGetReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.GetReadOnlyKeys method.
type DatabaseAccountsClientGetReadOnlyKeysResponse ¶ added in v0.3.0
type DatabaseAccountsClientGetReadOnlyKeysResponse struct {
DatabaseAccountListReadOnlyKeysResult
}
DatabaseAccountsClientGetReadOnlyKeysResponse contains the response from method DatabaseAccountsClient.GetReadOnlyKeys.
type DatabaseAccountsClientGetResponse ¶ added in v0.3.0
type DatabaseAccountsClientGetResponse struct {
DatabaseAccountGetResults
}
DatabaseAccountsClientGetResponse contains the response from method DatabaseAccountsClient.Get.
type DatabaseAccountsClientListByResourceGroupOptions ¶ added in v0.3.0
type DatabaseAccountsClientListByResourceGroupOptions struct { }
DatabaseAccountsClientListByResourceGroupOptions contains the optional parameters for the DatabaseAccountsClient.ListByResourceGroup method.
type DatabaseAccountsClientListByResourceGroupResponse ¶ added in v0.3.0
type DatabaseAccountsClientListByResourceGroupResponse struct {
DatabaseAccountsListResult
}
DatabaseAccountsClientListByResourceGroupResponse contains the response from method DatabaseAccountsClient.ListByResourceGroup.
type DatabaseAccountsClientListConnectionStringsOptions ¶ added in v0.3.0
type DatabaseAccountsClientListConnectionStringsOptions struct { }
DatabaseAccountsClientListConnectionStringsOptions contains the optional parameters for the DatabaseAccountsClient.ListConnectionStrings method.
type DatabaseAccountsClientListConnectionStringsResponse ¶ added in v0.3.0
type DatabaseAccountsClientListConnectionStringsResponse struct {
DatabaseAccountListConnectionStringsResult
}
DatabaseAccountsClientListConnectionStringsResponse contains the response from method DatabaseAccountsClient.ListConnectionStrings.
type DatabaseAccountsClientListKeysOptions ¶ added in v0.3.0
type DatabaseAccountsClientListKeysOptions struct { }
DatabaseAccountsClientListKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListKeys method.
type DatabaseAccountsClientListKeysResponse ¶ added in v0.3.0
type DatabaseAccountsClientListKeysResponse struct {
DatabaseAccountListKeysResult
}
DatabaseAccountsClientListKeysResponse contains the response from method DatabaseAccountsClient.ListKeys.
type DatabaseAccountsClientListMetricDefinitionsOptions ¶ added in v0.3.0
type DatabaseAccountsClientListMetricDefinitionsOptions struct { }
DatabaseAccountsClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseAccountsClient.ListMetricDefinitions method.
type DatabaseAccountsClientListMetricDefinitionsResponse ¶ added in v0.3.0
type DatabaseAccountsClientListMetricDefinitionsResponse struct {
MetricDefinitionsListResult
}
DatabaseAccountsClientListMetricDefinitionsResponse contains the response from method DatabaseAccountsClient.ListMetricDefinitions.
type DatabaseAccountsClientListMetricsOptions ¶ added in v0.3.0
type DatabaseAccountsClientListMetricsOptions struct { }
DatabaseAccountsClientListMetricsOptions contains the optional parameters for the DatabaseAccountsClient.ListMetrics method.
type DatabaseAccountsClientListMetricsResponse ¶ added in v0.3.0
type DatabaseAccountsClientListMetricsResponse struct {
MetricListResult
}
DatabaseAccountsClientListMetricsResponse contains the response from method DatabaseAccountsClient.ListMetrics.
type DatabaseAccountsClientListOptions ¶ added in v0.3.0
type DatabaseAccountsClientListOptions struct { }
DatabaseAccountsClientListOptions contains the optional parameters for the DatabaseAccountsClient.List method.
type DatabaseAccountsClientListReadOnlyKeysOptions ¶ added in v0.3.0
type DatabaseAccountsClientListReadOnlyKeysOptions struct { }
DatabaseAccountsClientListReadOnlyKeysOptions contains the optional parameters for the DatabaseAccountsClient.ListReadOnlyKeys method.
type DatabaseAccountsClientListReadOnlyKeysResponse ¶ added in v0.3.0
type DatabaseAccountsClientListReadOnlyKeysResponse struct {
DatabaseAccountListReadOnlyKeysResult
}
DatabaseAccountsClientListReadOnlyKeysResponse contains the response from method DatabaseAccountsClient.ListReadOnlyKeys.
type DatabaseAccountsClientListResponse ¶ added in v0.3.0
type DatabaseAccountsClientListResponse struct {
DatabaseAccountsListResult
}
DatabaseAccountsClientListResponse contains the response from method DatabaseAccountsClient.List.
type DatabaseAccountsClientListUsagesOptions ¶ added in v0.3.0
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.ListUsages method.
type DatabaseAccountsClientListUsagesResponse ¶ added in v0.3.0
type DatabaseAccountsClientListUsagesResponse struct {
UsagesResult
}
DatabaseAccountsClientListUsagesResponse contains the response from method DatabaseAccountsClient.ListUsages.
type DatabaseAccountsClientOfflineRegionResponse ¶ added in v0.3.0
type DatabaseAccountsClientOfflineRegionResponse struct { }
DatabaseAccountsClientOfflineRegionResponse contains the response from method DatabaseAccountsClient.OfflineRegion.
type DatabaseAccountsClientOnlineRegionResponse ¶ added in v0.3.0
type DatabaseAccountsClientOnlineRegionResponse struct { }
DatabaseAccountsClientOnlineRegionResponse contains the response from method DatabaseAccountsClient.OnlineRegion.
type DatabaseAccountsClientRegenerateKeyResponse ¶ added in v0.3.0
type DatabaseAccountsClientRegenerateKeyResponse struct { }
DatabaseAccountsClientRegenerateKeyResponse contains the response from method DatabaseAccountsClient.RegenerateKey.
type DatabaseAccountsClientUpdateResponse ¶ added in v0.3.0
type DatabaseAccountsClientUpdateResponse struct {
DatabaseAccountGetResults
}
DatabaseAccountsClientUpdateResponse contains the response from method DatabaseAccountsClient.Update.
type DatabaseAccountsListResult ¶
type DatabaseAccountsListResult struct { // READ-ONLY; List of database account and their properties. Value []*DatabaseAccountGetResults `json:"value,omitempty" azure:"ro"` }
DatabaseAccountsListResult - The List operation response, that contains the database accounts and their properties.
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 ¶ added in v0.5.0
func (client *DatabaseClient) NewListMetricDefinitionsPager(resourceGroupName string, accountName string, databaseRid string, options *DatabaseClientListMetricDefinitionsOptions) *runtime.Pager[DatabaseClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Retrieves metric definitions for the given database. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetricDefinitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseGetMetricDefinitions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListMetricDefinitionsPager("rg1", "ddb1", "databaseRid", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseClient) NewListMetricsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseClient) NewListUsagesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListUsages method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBDatabaseGetUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewDatabaseClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListUsagesPager("rg1", "ddb1", "databaseRid", &armcosmos.DatabaseClientListUsagesOptions{Filter: to.Ptr("$filter=name.value eq 'Storage'")}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseClientListMetricDefinitionsOptions ¶ added in v0.3.0
type DatabaseClientListMetricDefinitionsOptions struct { }
DatabaseClientListMetricDefinitionsOptions contains the optional parameters for the DatabaseClient.ListMetricDefinitions method.
type DatabaseClientListMetricDefinitionsResponse ¶ added in v0.3.0
type DatabaseClientListMetricDefinitionsResponse struct {
MetricDefinitionsListResult
}
DatabaseClientListMetricDefinitionsResponse contains the response from method DatabaseClient.ListMetricDefinitions.
type DatabaseClientListMetricsOptions ¶ added in v0.3.0
type DatabaseClientListMetricsOptions struct { }
DatabaseClientListMetricsOptions contains the optional parameters for the DatabaseClient.ListMetrics method.
type DatabaseClientListMetricsResponse ¶ added in v0.3.0
type DatabaseClientListMetricsResponse struct {
MetricListResult
}
DatabaseClientListMetricsResponse contains the response from method DatabaseClient.ListMetrics.
type DatabaseClientListUsagesOptions ¶ added in v0.3.0
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.ListUsages method.
type DatabaseClientListUsagesResponse ¶ added in v0.3.0
type DatabaseClientListUsagesResponse struct {
UsagesResult
}
DatabaseClientListUsagesResponse contains the response from method DatabaseClient.ListUsages.
type DatabaseRestoreResource ¶
type DatabaseRestoreResource struct { // The names of the collections available for restore. CollectionNames []*string `json:"collectionNames,omitempty"` // The name of the database available for restore. DatabaseName *string `json:"databaseName,omitempty"` }
DatabaseRestoreResource - Specific Databases to restore.
func (DatabaseRestoreResource) MarshalJSON ¶
func (d DatabaseRestoreResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseRestoreResource.
type DefaultConsistencyLevel ¶
type DefaultConsistencyLevel string
DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account.
const ( DefaultConsistencyLevelEventual DefaultConsistencyLevel = "Eventual" DefaultConsistencyLevelSession DefaultConsistencyLevel = "Session" DefaultConsistencyLevelBoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" DefaultConsistencyLevelStrong DefaultConsistencyLevel = "Strong" DefaultConsistencyLevelConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" )
func PossibleDefaultConsistencyLevelValues ¶
func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel
PossibleDefaultConsistencyLevelValues returns the possible values for the DefaultConsistencyLevel const type.
type ErrorResponse ¶
type ErrorResponse struct { // Error code. Code *string `json:"code,omitempty"` // Error message indicating why the operation failed. Message *string `json:"message,omitempty"` }
ErrorResponse - Error Response.
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 `json:"path,omitempty"` }
type ExtendedResourceProperties ¶
type ExtendedResourceProperties struct { // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
ExtendedResourceProperties - The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs.
type FailoverPolicies ¶
type FailoverPolicies struct { // REQUIRED; List of failover policies. FailoverPolicies []*FailoverPolicy `json:"failoverPolicies,omitempty"` }
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.
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 `json:"failoverPriority,omitempty"` // The name of the region in which the database account exists. LocationName *string `json:"locationName,omitempty"` // READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>. ID *string `json:"id,omitempty" azure:"ro"` }
FailoverPolicy - The failover policy for a given region of a database account.
type GremlinDatabaseCreateUpdateParameters ¶
type GremlinDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin database. Properties *GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type GremlinDatabaseCreateUpdateProperties ¶
type GremlinDatabaseCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a Gremlin database Resource *GremlinDatabaseResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database.
type GremlinDatabaseGetProperties ¶
type GremlinDatabaseGetProperties struct { Options *GremlinDatabaseGetPropertiesOptions `json:"options,omitempty"` Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"` }
GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
type GremlinDatabaseGetPropertiesOptions ¶
type GremlinDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type GremlinDatabaseGetPropertiesResource ¶
type GremlinDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type GremlinDatabaseGetResults ¶
type GremlinDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB SQL database Properties *GremlinDatabaseGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type GremlinDatabaseListResult ¶
type GremlinDatabaseListResult struct { // READ-ONLY; List of Gremlin databases and their properties. Value []*GremlinDatabaseGetResults `json:"value,omitempty" azure:"ro"` }
GremlinDatabaseListResult - The List operation response, that contains the Gremlin databases and their properties.
type GremlinDatabaseResource ¶
type GremlinDatabaseResource struct { // REQUIRED; Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` }
GremlinDatabaseResource - Cosmos DB Gremlin database resource object
type GremlinGraphCreateUpdateParameters ¶
type GremlinGraphCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB Gremlin graph. Properties *GremlinGraphCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type GremlinGraphCreateUpdateProperties ¶
type GremlinGraphCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a Gremlin graph Resource *GremlinGraphResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph.
type GremlinGraphGetProperties ¶
type GremlinGraphGetProperties struct { Options *GremlinGraphGetPropertiesOptions `json:"options,omitempty"` Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"` }
GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph
type GremlinGraphGetPropertiesOptions ¶
type GremlinGraphGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type GremlinGraphGetPropertiesResource ¶
type GremlinGraphGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB Gremlin graph ID *string `json:"id,omitempty"` // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` // The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type GremlinGraphGetResults ¶
type GremlinGraphGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB Gremlin graph Properties *GremlinGraphGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type GremlinGraphListResult ¶
type GremlinGraphListResult struct { // READ-ONLY; List of graphs and their properties. Value []*GremlinGraphGetResults `json:"value,omitempty" azure:"ro"` }
GremlinGraphListResult - The List operation response, that contains the graphs and their properties.
type GremlinGraphResource ¶
type GremlinGraphResource struct { // REQUIRED; Name of the Cosmos DB Gremlin graph ID *string `json:"id,omitempty"` // The conflict resolution policy for the graph. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` // The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` }
GremlinGraphResource - Cosmos DB Gremlin graph resource object
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetGremlinDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetGremlinDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetGremlinGraph(ctx, "rgName", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetGremlinGraphThroughput(ctx, "rg1", "ddb1", "databaseName", "graphName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*GremlinResourcesClient) NewListGremlinDatabasesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListGremlinDatabases method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListGremlinDatabasesPager("rgName", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*GremlinResourcesClient) NewListGremlinGraphsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListGremlinGraphs method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBGremlinGraphList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewGremlinResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListGremlinGraphsPager("rgName", "ddb1", "databaseName", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginCreateUpdateGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinDatabase method.
type GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginCreateUpdateGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginCreateUpdateGremlinGraph method.
type GremlinResourcesClientBeginDeleteGremlinDatabaseOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginDeleteGremlinDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginDeleteGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinDatabase method.
type GremlinResourcesClientBeginDeleteGremlinGraphOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginDeleteGremlinGraphOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginDeleteGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.BeginDeleteGremlinGraph method.
type GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinDatabaseToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToAutoscale method.
type GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinDatabaseToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinDatabaseToManualThroughput method.
type GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinGraphToAutoscaleOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToAutoscale method.
type GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginMigrateGremlinGraphToManualThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginMigrateGremlinGraphToManualThroughput method.
type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinDatabaseThroughput method.
type GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GremlinResourcesClientBeginUpdateGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.BeginUpdateGremlinGraphThroughput method.
type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse ¶ added in v0.3.0
type GremlinResourcesClientCreateUpdateGremlinDatabaseResponse struct {
GremlinDatabaseGetResults
}
GremlinResourcesClientCreateUpdateGremlinDatabaseResponse contains the response from method GremlinResourcesClient.CreateUpdateGremlinDatabase.
type GremlinResourcesClientCreateUpdateGremlinGraphResponse ¶ added in v0.3.0
type GremlinResourcesClientCreateUpdateGremlinGraphResponse struct {
GremlinGraphGetResults
}
GremlinResourcesClientCreateUpdateGremlinGraphResponse contains the response from method GremlinResourcesClient.CreateUpdateGremlinGraph.
type GremlinResourcesClientDeleteGremlinDatabaseResponse ¶ added in v0.3.0
type GremlinResourcesClientDeleteGremlinDatabaseResponse struct { }
GremlinResourcesClientDeleteGremlinDatabaseResponse contains the response from method GremlinResourcesClient.DeleteGremlinDatabase.
type GremlinResourcesClientDeleteGremlinGraphResponse ¶ added in v0.3.0
type GremlinResourcesClientDeleteGremlinGraphResponse struct { }
GremlinResourcesClientDeleteGremlinGraphResponse contains the response from method GremlinResourcesClient.DeleteGremlinGraph.
type GremlinResourcesClientGetGremlinDatabaseOptions ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinDatabaseOptions struct { }
GremlinResourcesClientGetGremlinDatabaseOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabase method.
type GremlinResourcesClientGetGremlinDatabaseResponse ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinDatabaseResponse struct {
GremlinDatabaseGetResults
}
GremlinResourcesClientGetGremlinDatabaseResponse contains the response from method GremlinResourcesClient.GetGremlinDatabase.
type GremlinResourcesClientGetGremlinDatabaseThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinDatabaseThroughputOptions struct { }
GremlinResourcesClientGetGremlinDatabaseThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinDatabaseThroughput method.
type GremlinResourcesClientGetGremlinDatabaseThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientGetGremlinDatabaseThroughputResponse contains the response from method GremlinResourcesClient.GetGremlinDatabaseThroughput.
type GremlinResourcesClientGetGremlinGraphOptions ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinGraphOptions struct { }
GremlinResourcesClientGetGremlinGraphOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraph method.
type GremlinResourcesClientGetGremlinGraphResponse ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinGraphResponse struct {
GremlinGraphGetResults
}
GremlinResourcesClientGetGremlinGraphResponse contains the response from method GremlinResourcesClient.GetGremlinGraph.
type GremlinResourcesClientGetGremlinGraphThroughputOptions ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinGraphThroughputOptions struct { }
GremlinResourcesClientGetGremlinGraphThroughputOptions contains the optional parameters for the GremlinResourcesClient.GetGremlinGraphThroughput method.
type GremlinResourcesClientGetGremlinGraphThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientGetGremlinGraphThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientGetGremlinGraphThroughputResponse contains the response from method GremlinResourcesClient.GetGremlinGraphThroughput.
type GremlinResourcesClientListGremlinDatabasesOptions ¶ added in v0.3.0
type GremlinResourcesClientListGremlinDatabasesOptions struct { }
GremlinResourcesClientListGremlinDatabasesOptions contains the optional parameters for the GremlinResourcesClient.ListGremlinDatabases method.
type GremlinResourcesClientListGremlinDatabasesResponse ¶ added in v0.3.0
type GremlinResourcesClientListGremlinDatabasesResponse struct {
GremlinDatabaseListResult
}
GremlinResourcesClientListGremlinDatabasesResponse contains the response from method GremlinResourcesClient.ListGremlinDatabases.
type GremlinResourcesClientListGremlinGraphsOptions ¶ added in v0.3.0
type GremlinResourcesClientListGremlinGraphsOptions struct { }
GremlinResourcesClientListGremlinGraphsOptions contains the optional parameters for the GremlinResourcesClient.ListGremlinGraphs method.
type GremlinResourcesClientListGremlinGraphsResponse ¶ added in v0.3.0
type GremlinResourcesClientListGremlinGraphsResponse struct {
GremlinGraphListResult
}
GremlinResourcesClientListGremlinGraphsResponse contains the response from method GremlinResourcesClient.ListGremlinGraphs.
type GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse ¶ added in v0.3.0
type GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientMigrateGremlinDatabaseToAutoscaleResponse contains the response from method GremlinResourcesClient.MigrateGremlinDatabaseToAutoscale.
type GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientMigrateGremlinDatabaseToManualThroughputResponse contains the response from method GremlinResourcesClient.MigrateGremlinDatabaseToManualThroughput.
type GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse ¶ added in v0.3.0
type GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientMigrateGremlinGraphToAutoscaleResponse contains the response from method GremlinResourcesClient.MigrateGremlinGraphToAutoscale.
type GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientMigrateGremlinGraphToManualThroughputResponse contains the response from method GremlinResourcesClient.MigrateGremlinGraphToManualThroughput.
type GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientUpdateGremlinDatabaseThroughputResponse contains the response from method GremlinResourcesClient.UpdateGremlinDatabaseThroughput.
type GremlinResourcesClientUpdateGremlinGraphThroughputResponse ¶ added in v0.3.0
type GremlinResourcesClientUpdateGremlinGraphThroughputResponse struct {
ThroughputSettingsGetResults
}
GremlinResourcesClientUpdateGremlinGraphThroughputResponse contains the response from method GremlinResourcesClient.UpdateGremlinGraphThroughput.
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 `json:"ipAddressOrRange,omitempty"` }
IPAddressOrRange - IpAddressOrRange object
type IncludedPath ¶
type IncludedPath struct { // List of indexes for this path Indexes []*Indexes `json:"indexes,omitempty"` // The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) Path *string `json:"path,omitempty"` }
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.
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 `json:"dataType,omitempty"` // Indicates the type of index. Kind *IndexKind `json:"kind,omitempty"` // The precision of the index. -1 is maximum precision. Precision *int32 `json:"precision,omitempty"` }
Indexes - The indexes for the path.
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 `json:"automatic,omitempty"` // List of composite path list CompositeIndexes [][]*CompositePath `json:"compositeIndexes,omitempty"` // List of paths to exclude from indexing ExcludedPaths []*ExcludedPath `json:"excludedPaths,omitempty"` // List of paths to include in the indexing IncludedPaths []*IncludedPath `json:"includedPaths,omitempty"` // Indicates the indexing mode. IndexingMode *IndexingMode `json:"indexingMode,omitempty"` // List of spatial specifics SpatialIndexes []*SpatialSpec `json:"spatialIndexes,omitempty"` }
IndexingPolicy - Cosmos DB indexing policy
func (IndexingPolicy) MarshalJSON ¶
func (i IndexingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 ListClusters ¶
type ListClusters struct { // Container for the array of clusters. Value []*ClusterResource `json:"value,omitempty"` }
ListClusters - List of managed Cassandra clusters.
type ListDataCenters ¶
type ListDataCenters struct { // READ-ONLY; Container for array of data centers. Value []*DataCenterResource `json:"value,omitempty" azure:"ro"` }
ListDataCenters - List of managed Cassandra data centers and their properties.
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 `json:"failoverPriority,omitempty"` // Flag to indicate whether or not this region is an AvailabilityZone region IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"` // The name of the region. LocationName *string `json:"locationName,omitempty"` // READ-ONLY; The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/ DocumentEndpoint *string `json:"documentEndpoint,omitempty" azure:"ro"` // READ-ONLY; The unique identifier of the region within the database account. Example: <accountName>-<locationName>. ID *string `json:"id,omitempty" azure:"ro"` // 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 `json:"provisioningState,omitempty" azure:"ro"` }
Location - A region in which the Azure Cosmos DB database account is deployed.
type LocationGetResult ¶
type LocationGetResult struct { // Cosmos DB location metadata Properties *LocationProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
LocationGetResult - Cosmos DB location get result
type LocationListResult ¶
type LocationListResult struct { // READ-ONLY; List of Cosmos DB locations and their properties. Value []*LocationGetResult `json:"value,omitempty" azure:"ro"` }
LocationListResult - The List operation response, that contains Cosmos DB locations and their properties.
type LocationProperties ¶
type LocationProperties struct { // READ-ONLY; The properties of available backup storage redundancies. BackupStorageRedundancies []*BackupStorageRedundancy `json:"backupStorageRedundancies,omitempty" azure:"ro"` // READ-ONLY; Flag indicating whether the location is residency sensitive. IsResidencyRestricted *bool `json:"isResidencyRestricted,omitempty" azure:"ro"` // READ-ONLY; Flag indicating whether the location supports availability zones or not. SupportsAvailabilityZone *bool `json:"supportsAvailabilityZone,omitempty" azure:"ro"` }
LocationProperties - Cosmos DB location metadata
func (LocationProperties) MarshalJSON ¶
func (l LocationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationProperties.
type LocationsClient ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBLocationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewLocationsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westus", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*LocationsClient) NewListPager ¶ added in v0.5.0
func (client *LocationsClient) NewListPager(options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse]
NewListPager - List Cosmos DB locations and their properties If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 options - LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBLocationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewLocationsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LocationsClientGetOptions ¶ added in v0.3.0
type LocationsClientGetOptions struct { }
LocationsClientGetOptions contains the optional parameters for the LocationsClient.Get method.
type LocationsClientGetResponse ¶ added in v0.3.0
type LocationsClientGetResponse struct {
LocationGetResult
}
LocationsClientGetResponse contains the response from method LocationsClient.Get.
type LocationsClientListOptions ¶ added in v0.3.0
type LocationsClientListOptions struct { }
LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.
type LocationsClientListResponse ¶ added in v0.3.0
type LocationsClientListResponse struct {
LocationListResult
}
LocationsClientListResponse contains the response from method LocationsClient.List.
type ManagedCassandraARMResourceProperties ¶ added in v0.2.0
type ManagedCassandraARMResourceProperties struct { // Identity for the resource. Identity *ManagedCassandraManagedServiceIdentity `json:"identity,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedCassandraARMResourceProperties - The core properties of ARM resources.
func (ManagedCassandraARMResourceProperties) MarshalJSON ¶ added in v0.2.0
func (m ManagedCassandraARMResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedCassandraARMResourceProperties.
type ManagedCassandraManagedServiceIdentity ¶ added in v0.2.0
type ManagedCassandraManagedServiceIdentity struct { // The type of the resource. Type *ManagedCassandraResourceIdentityType `json:"type,omitempty"` // READ-ONLY; The object id of the identity resource. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant id of the resource. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ManagedCassandraManagedServiceIdentity - Identity for the resource.
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 ¶ added in v0.2.0
type ManagedCassandraResourceIdentityType ¶ added in v0.2.0
type ManagedCassandraResourceIdentityType string
ManagedCassandraResourceIdentityType - The type of the resource.
const ( ManagedCassandraResourceIdentityTypeNone ManagedCassandraResourceIdentityType = "None" ManagedCassandraResourceIdentityTypeSystemAssigned ManagedCassandraResourceIdentityType = "SystemAssigned" )
func PossibleManagedCassandraResourceIdentityTypeValues ¶ added in v0.2.0
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 `json:"type,omitempty"` // 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 `json:"userAssignedIdentities,omitempty"` // READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ManagedServiceIdentity - Identity for the resource.
func (ManagedServiceIdentity) MarshalJSON ¶
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
type Metric ¶
type Metric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue `json:"metricValues,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
Metric data
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 `json:"retention,omitempty" azure:"ro"` // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` }
MetricAvailability - The availability of the metric.
type MetricDefinition ¶
type MetricDefinition struct { // READ-ONLY; The list of metric availabilities for the account. MetricAvailabilities []*MetricAvailability `json:"metricAvailabilities,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The primary aggregation type of the metric. PrimaryAggregationType *PrimaryAggregationType `json:"primaryAggregationType,omitempty" azure:"ro"` // READ-ONLY; The resource uri of the database. ResourceURI *string `json:"resourceUri,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
MetricDefinition - The definition of a metric.
type MetricDefinitionsListResult ¶
type MetricDefinitionsListResult struct { // READ-ONLY; The list of metric definitions for the account. Value []*MetricDefinition `json:"value,omitempty" azure:"ro"` }
MetricDefinitionsListResult - The response to a list metric definitions request.
type MetricListResult ¶
type MetricListResult struct { // READ-ONLY; The list of metrics for the account. Value []*Metric `json:"value,omitempty" azure:"ro"` }
MetricListResult - The response to a list metrics request.
type MetricName ¶
type MetricName struct { // READ-ONLY; The friendly name of the metric. LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"` // READ-ONLY; The name of the metric. Value *string `json:"value,omitempty" azure:"ro"` }
MetricName - A metric name.
type MetricValue ¶
type MetricValue struct { // READ-ONLY; The average value of the metric. Average *float64 `json:"average,omitempty" azure:"ro"` // READ-ONLY; The number of values for the metric. Count *int32 `json:"_count,omitempty" azure:"ro"` // READ-ONLY; The max value of the metric. Maximum *float64 `json:"maximum,omitempty" azure:"ro"` // READ-ONLY; The min value of the metric. Minimum *float64 `json:"minimum,omitempty" azure:"ro"` // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` // READ-ONLY; The total value of the metric. Total *float64 `json:"total,omitempty" azure:"ro"` }
MetricValue - Represents metrics values.
func (*MetricValue) UnmarshalJSON ¶
func (m *MetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue.
type MongoDBCollectionCreateUpdateParameters ¶
type MongoDBCollectionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB collection. Properties *MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type MongoDBCollectionCreateUpdateProperties ¶
type MongoDBCollectionCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a MongoDB collection Resource *MongoDBCollectionResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection.
type MongoDBCollectionGetProperties ¶
type MongoDBCollectionGetProperties struct { Options *MongoDBCollectionGetPropertiesOptions `json:"options,omitempty"` Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"` }
MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection
type MongoDBCollectionGetPropertiesOptions ¶
type MongoDBCollectionGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type MongoDBCollectionGetPropertiesResource ¶
type MongoDBCollectionGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB MongoDB collection ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` // List of index keys Indexes []*MongoIndex `json:"indexes,omitempty"` // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string `json:"shardKey,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
func (MongoDBCollectionGetPropertiesResource) MarshalJSON ¶ added in v0.3.0
func (m MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MongoDBCollectionGetPropertiesResource.
type MongoDBCollectionGetResults ¶
type MongoDBCollectionGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB MongoDB collection Properties *MongoDBCollectionGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type MongoDBCollectionListResult ¶
type MongoDBCollectionListResult struct { // READ-ONLY; List of MongoDB collections and their properties. Value []*MongoDBCollectionGetResults `json:"value,omitempty" azure:"ro"` }
MongoDBCollectionListResult - The List operation response, that contains the MongoDB collections and their properties.
type MongoDBCollectionResource ¶
type MongoDBCollectionResource struct { // REQUIRED; Name of the Cosmos DB MongoDB collection ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int32 `json:"analyticalStorageTtl,omitempty"` // List of index keys Indexes []*MongoIndex `json:"indexes,omitempty"` // A key-value pair of shard keys to be applied for the request. ShardKey map[string]*string `json:"shardKey,omitempty"` }
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.
type MongoDBDatabaseCreateUpdateParameters ¶
type MongoDBDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB MongoDB database. Properties *MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type MongoDBDatabaseCreateUpdateProperties ¶
type MongoDBDatabaseCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a MongoDB database Resource *MongoDBDatabaseResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database.
type MongoDBDatabaseGetProperties ¶
type MongoDBDatabaseGetProperties struct { Options *MongoDBDatabaseGetPropertiesOptions `json:"options,omitempty"` Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"` }
MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database
type MongoDBDatabaseGetPropertiesOptions ¶
type MongoDBDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type MongoDBDatabaseGetPropertiesResource ¶
type MongoDBDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type MongoDBDatabaseGetResults ¶
type MongoDBDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB MongoDB database Properties *MongoDBDatabaseGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type MongoDBDatabaseListResult ¶
type MongoDBDatabaseListResult struct { // READ-ONLY; List of MongoDB databases and their properties. Value []*MongoDBDatabaseGetResults `json:"value,omitempty" azure:"ro"` }
MongoDBDatabaseListResult - The List operation response, that contains the MongoDB databases and their properties.
type MongoDBDatabaseResource ¶
type MongoDBDatabaseResource struct { // REQUIRED; Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` }
MongoDBDatabaseResource - Cosmos DB MongoDB database resource object
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) 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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
Output:
func (*MongoDBResourcesClient) BeginRetrieveContinuousBackupInformation ¶ added in v0.2.0
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionBackupInformation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetMongoDBCollection(ctx, "rgName", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetMongoDBCollectionThroughput(ctx, "rg1", "ddb1", "databaseName", "collectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetMongoDBDatabase(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetMongoDBDatabaseThroughput(ctx, "rg1", "ddb1", "databaseName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*MongoDBResourcesClient) NewListMongoDBCollectionsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMongoDBCollections method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBCollectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListMongoDBCollectionsPager("rgName", "ddb1", "databaseName", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*MongoDBResourcesClient) NewListMongoDBDatabasesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMongoDBDatabases method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBMongoDBDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewMongoDBResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListMongoDBDatabasesPager("rgName", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBCollection method.
type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginCreateUpdateMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoDBDatabase method.
type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBCollection method.
type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginDeleteMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoDBDatabase method.
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBCollectionToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToAutoscale method.
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBCollectionToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBCollectionToManualThroughput method.
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBDatabaseToAutoscaleOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToAutoscale method.
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginMigrateMongoDBDatabaseToManualThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMigrateMongoDBDatabaseToManualThroughput method.
type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the MongoDBResourcesClient.BeginRetrieveContinuousBackupInformation method.
type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginUpdateMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBCollectionThroughput method.
type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MongoDBResourcesClientBeginUpdateMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginUpdateMongoDBDatabaseThroughput method.
type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse ¶ added in v0.3.0
type MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse struct {
MongoDBCollectionGetResults
}
MongoDBResourcesClientCreateUpdateMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.CreateUpdateMongoDBCollection.
type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse ¶ added in v0.3.0
type MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse struct {
MongoDBDatabaseGetResults
}
MongoDBResourcesClientCreateUpdateMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.CreateUpdateMongoDBDatabase.
type MongoDBResourcesClientDeleteMongoDBCollectionResponse ¶ added in v0.3.0
type MongoDBResourcesClientDeleteMongoDBCollectionResponse struct { }
MongoDBResourcesClientDeleteMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.DeleteMongoDBCollection.
type MongoDBResourcesClientDeleteMongoDBDatabaseResponse ¶ added in v0.3.0
type MongoDBResourcesClientDeleteMongoDBDatabaseResponse struct { }
MongoDBResourcesClientDeleteMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.DeleteMongoDBDatabase.
type MongoDBResourcesClientGetMongoDBCollectionOptions ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBCollectionOptions struct { }
MongoDBResourcesClientGetMongoDBCollectionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollection method.
type MongoDBResourcesClientGetMongoDBCollectionResponse ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBCollectionResponse struct {
MongoDBCollectionGetResults
}
MongoDBResourcesClientGetMongoDBCollectionResponse contains the response from method MongoDBResourcesClient.GetMongoDBCollection.
type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBCollectionThroughputOptions struct { }
MongoDBResourcesClientGetMongoDBCollectionThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBCollectionThroughput method.
type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBCollectionThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientGetMongoDBCollectionThroughputResponse contains the response from method MongoDBResourcesClient.GetMongoDBCollectionThroughput.
type MongoDBResourcesClientGetMongoDBDatabaseOptions ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBDatabaseOptions struct { }
MongoDBResourcesClientGetMongoDBDatabaseOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabase method.
type MongoDBResourcesClientGetMongoDBDatabaseResponse ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBDatabaseResponse struct {
MongoDBDatabaseGetResults
}
MongoDBResourcesClientGetMongoDBDatabaseResponse contains the response from method MongoDBResourcesClient.GetMongoDBDatabase.
type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions struct { }
MongoDBResourcesClientGetMongoDBDatabaseThroughputOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoDBDatabaseThroughput method.
type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientGetMongoDBDatabaseThroughputResponse contains the response from method MongoDBResourcesClient.GetMongoDBDatabaseThroughput.
type MongoDBResourcesClientListMongoDBCollectionsOptions ¶ added in v0.3.0
type MongoDBResourcesClientListMongoDBCollectionsOptions struct { }
MongoDBResourcesClientListMongoDBCollectionsOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoDBCollections method.
type MongoDBResourcesClientListMongoDBCollectionsResponse ¶ added in v0.3.0
type MongoDBResourcesClientListMongoDBCollectionsResponse struct {
MongoDBCollectionListResult
}
MongoDBResourcesClientListMongoDBCollectionsResponse contains the response from method MongoDBResourcesClient.ListMongoDBCollections.
type MongoDBResourcesClientListMongoDBDatabasesOptions ¶ added in v0.3.0
type MongoDBResourcesClientListMongoDBDatabasesOptions struct { }
MongoDBResourcesClientListMongoDBDatabasesOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoDBDatabases method.
type MongoDBResourcesClientListMongoDBDatabasesResponse ¶ added in v0.3.0
type MongoDBResourcesClientListMongoDBDatabasesResponse struct {
MongoDBDatabaseListResult
}
MongoDBResourcesClientListMongoDBDatabasesResponse contains the response from method MongoDBResourcesClient.ListMongoDBDatabases.
type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse ¶ added in v0.3.0
type MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientMigrateMongoDBCollectionToAutoscaleResponse contains the response from method MongoDBResourcesClient.MigrateMongoDBCollectionToAutoscale.
type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientMigrateMongoDBCollectionToManualThroughputResponse contains the response from method MongoDBResourcesClient.MigrateMongoDBCollectionToManualThroughput.
type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse ¶ added in v0.3.0
type MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientMigrateMongoDBDatabaseToAutoscaleResponse contains the response from method MongoDBResourcesClient.MigrateMongoDBDatabaseToAutoscale.
type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientMigrateMongoDBDatabaseToManualThroughputResponse contains the response from method MongoDBResourcesClient.MigrateMongoDBDatabaseToManualThroughput.
type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse ¶ added in v0.3.0
type MongoDBResourcesClientRetrieveContinuousBackupInformationResponse struct {
BackupInformation
}
MongoDBResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method MongoDBResourcesClient.RetrieveContinuousBackupInformation.
type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientUpdateMongoDBCollectionThroughputResponse contains the response from method MongoDBResourcesClient.UpdateMongoDBCollectionThroughput.
type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse ¶ added in v0.3.0
type MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
MongoDBResourcesClientUpdateMongoDBDatabaseThroughputResponse contains the response from method MongoDBResourcesClient.UpdateMongoDBDatabaseThroughput.
type MongoIndex ¶
type MongoIndex struct { // Cosmos DB MongoDB collection index keys Key *MongoIndexKeys `json:"key,omitempty"` // Cosmos DB MongoDB collection index key options Options *MongoIndexOptions `json:"options,omitempty"` }
MongoIndex - Cosmos DB MongoDB collection index key
type MongoIndexKeys ¶
type MongoIndexKeys struct { // List of keys for each MongoDB collection in the Azure Cosmos DB service Keys []*string `json:"keys,omitempty"` }
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.
type MongoIndexOptions ¶
type MongoIndexOptions struct { // Expire after seconds ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"` // Is unique or not Unique *bool `json:"unique,omitempty"` }
MongoIndexOptions - Cosmos DB MongoDB collection index options
type NetworkACLBypass ¶
type NetworkACLBypass string
NetworkACLBypass - Indicates what services are allowed to bypass firewall checks.
const ( NetworkACLBypassNone NetworkACLBypass = "None" NetworkACLBypassAzureServices NetworkACLBypass = "AzureServices" )
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 `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
NotebookWorkspace - A notebook workspace resource
type NotebookWorkspaceConnectionInfoResult ¶
type NotebookWorkspaceConnectionInfoResult struct { // READ-ONLY; Specifies auth token used for connecting to Notebook server (uses token-based auth). AuthToken *string `json:"authToken,omitempty" azure:"ro"` // READ-ONLY; Specifies the endpoint of Notebook server. NotebookServerEndpoint *string `json:"notebookServerEndpoint,omitempty" azure:"ro"` }
NotebookWorkspaceConnectionInfoResult - The connection info for the given notebook workspace
type NotebookWorkspaceCreateUpdateParameters ¶
type NotebookWorkspaceCreateUpdateParameters struct { // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
NotebookWorkspaceCreateUpdateParameters - Parameters to create a notebook workspace resource
type NotebookWorkspaceListResult ¶
type NotebookWorkspaceListResult struct { // Array of notebook workspace resources Value []*NotebookWorkspace `json:"value,omitempty"` }
NotebookWorkspaceListResult - A list of notebook workspace resources
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 `json:"notebookServerEndpoint,omitempty" azure:"ro"` // READ-ONLY; Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. Status *string `json:"status,omitempty" azure:"ro"` }
NotebookWorkspaceProperties - Properties of a notebook workspace resource.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceRegenerateAuthToken.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceStart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceListConnectionInfo.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListConnectionInfo(ctx, "rg1", "ddb1", armcosmos.NotebookWorkspaceNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*NotebookWorkspacesClient) NewListByDatabaseAccountPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListByDatabaseAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBNotebookWorkspaceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewNotebookWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type NotebookWorkspacesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type NotebookWorkspacesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NotebookWorkspacesClient.BeginCreateOrUpdate method.
type NotebookWorkspacesClientBeginDeleteOptions ¶ added in v0.3.0
type NotebookWorkspacesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginDeleteOptions contains the optional parameters for the NotebookWorkspacesClient.BeginDelete method.
type NotebookWorkspacesClientBeginRegenerateAuthTokenOptions ¶ added in v0.3.0
type NotebookWorkspacesClientBeginRegenerateAuthTokenOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginRegenerateAuthTokenOptions contains the optional parameters for the NotebookWorkspacesClient.BeginRegenerateAuthToken method.
type NotebookWorkspacesClientBeginStartOptions ¶ added in v0.3.0
type NotebookWorkspacesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NotebookWorkspacesClientBeginStartOptions contains the optional parameters for the NotebookWorkspacesClient.BeginStart method.
type NotebookWorkspacesClientCreateOrUpdateResponse ¶ added in v0.3.0
type NotebookWorkspacesClientCreateOrUpdateResponse struct {
NotebookWorkspace
}
NotebookWorkspacesClientCreateOrUpdateResponse contains the response from method NotebookWorkspacesClient.CreateOrUpdate.
type NotebookWorkspacesClientDeleteResponse ¶ added in v0.3.0
type NotebookWorkspacesClientDeleteResponse struct { }
NotebookWorkspacesClientDeleteResponse contains the response from method NotebookWorkspacesClient.Delete.
type NotebookWorkspacesClientGetOptions ¶ added in v0.3.0
type NotebookWorkspacesClientGetOptions struct { }
NotebookWorkspacesClientGetOptions contains the optional parameters for the NotebookWorkspacesClient.Get method.
type NotebookWorkspacesClientGetResponse ¶ added in v0.3.0
type NotebookWorkspacesClientGetResponse struct {
NotebookWorkspace
}
NotebookWorkspacesClientGetResponse contains the response from method NotebookWorkspacesClient.Get.
type NotebookWorkspacesClientListByDatabaseAccountOptions ¶ added in v0.3.0
type NotebookWorkspacesClientListByDatabaseAccountOptions struct { }
NotebookWorkspacesClientListByDatabaseAccountOptions contains the optional parameters for the NotebookWorkspacesClient.ListByDatabaseAccount method.
type NotebookWorkspacesClientListByDatabaseAccountResponse ¶ added in v0.3.0
type NotebookWorkspacesClientListByDatabaseAccountResponse struct {
NotebookWorkspaceListResult
}
NotebookWorkspacesClientListByDatabaseAccountResponse contains the response from method NotebookWorkspacesClient.ListByDatabaseAccount.
type NotebookWorkspacesClientListConnectionInfoOptions ¶ added in v0.3.0
type NotebookWorkspacesClientListConnectionInfoOptions struct { }
NotebookWorkspacesClientListConnectionInfoOptions contains the optional parameters for the NotebookWorkspacesClient.ListConnectionInfo method.
type NotebookWorkspacesClientListConnectionInfoResponse ¶ added in v0.3.0
type NotebookWorkspacesClientListConnectionInfoResponse struct {
NotebookWorkspaceConnectionInfoResult
}
NotebookWorkspacesClientListConnectionInfoResponse contains the response from method NotebookWorkspacesClient.ListConnectionInfo.
type NotebookWorkspacesClientRegenerateAuthTokenResponse ¶ added in v0.3.0
type NotebookWorkspacesClientRegenerateAuthTokenResponse struct { }
NotebookWorkspacesClientRegenerateAuthTokenResponse contains the response from method NotebookWorkspacesClient.RegenerateAuthToken.
type NotebookWorkspacesClientStartResponse ¶ added in v0.3.0
type NotebookWorkspacesClientStartResponse struct { }
NotebookWorkspacesClientStartResponse contains the response from method NotebookWorkspacesClient.Start.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` // Operation name: {provider}/{resource}/{operation} Name *string `json:"name,omitempty"` }
Operation - REST API operation
type OperationDisplay ¶
type OperationDisplay struct { // Description of operation Description *string `json:"Description,omitempty"` // Operation type: Read, write, delete, etc. Operation *string `json:"Operation,omitempty"` // Service provider: Microsoft.ResourceProvider Provider *string `json:"Provider,omitempty"` // Resource on which the operation is performed: Profile, endpoint, etc. Resource *string `json:"Resource,omitempty"` }
OperationDisplay - The object that represents the operation.
type OperationListResult ¶
type OperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` // List of operations supported by the Resource Provider. Value []*Operation `json:"value,omitempty"` }
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.
type OperationType ¶
type OperationType string
OperationType - Enum to indicate the operation type of the event.
const ( OperationTypeCreate OperationType = "Create" OperationTypeDelete OperationType = "Delete" 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 ¶ added in v0.5.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Cosmos DB Resource Provider operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBOperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OptionsResource ¶
type OptionsResource struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
OptionsResource - Cosmos DB options resource object
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPKeyRangeIdGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPartitionKeyRangeIDClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PartitionKeyRangeIDClientListMetricsOptions ¶ added in v0.3.0
type PartitionKeyRangeIDClientListMetricsOptions struct { }
PartitionKeyRangeIDClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDClient.ListMetrics method.
type PartitionKeyRangeIDClientListMetricsResponse ¶ added in v0.3.0
type PartitionKeyRangeIDClientListMetricsResponse struct {
PartitionMetricListResult
}
PartitionKeyRangeIDClientListMetricsResponse contains the response from method PartitionKeyRangeIDClient.ListMetrics.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPKeyRangeIdRegionGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPartitionKeyRangeIDRegionClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PartitionKeyRangeIDRegionClientListMetricsOptions ¶ added in v0.3.0
type PartitionKeyRangeIDRegionClientListMetricsOptions struct { }
PartitionKeyRangeIDRegionClientListMetricsOptions contains the optional parameters for the PartitionKeyRangeIDRegionClient.ListMetrics method.
type PartitionKeyRangeIDRegionClientListMetricsResponse ¶ added in v0.3.0
type PartitionKeyRangeIDRegionClientListMetricsResponse struct {
PartitionMetricListResult
}
PartitionKeyRangeIDRegionClientListMetricsResponse contains the response from method PartitionKeyRangeIDRegionClient.ListMetrics.
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 `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue `json:"metricValues,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The partition id (GUID identifier) of the metric values. PartitionID *string `json:"partitionId,omitempty" azure:"ro"` // READ-ONLY; The partition key range id (integer identifier) of the metric values. PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
PartitionMetric - The metric values for a single partition.
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 `json:"value,omitempty" azure:"ro"` }
PartitionMetricListResult - The response to a list partition metrics request.
type PartitionUsage ¶
type PartitionUsage struct { // READ-ONLY; Current value for this metric CurrentValue *int64 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; Maximum value for this metric Limit *int64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The partition id (GUID identifier) of the usages. PartitionID *string `json:"partitionId,omitempty" azure:"ro"` // READ-ONLY; The partition key range id (integer identifier) of the usages. PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty" azure:"ro"` // READ-ONLY; The quota period used to summarize the usage values. QuotaPeriod *string `json:"quotaPeriod,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
PartitionUsage - The partition level usage data for a usage request.
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 `json:"value,omitempty" azure:"ro"` }
PartitionUsagesResult - The response to a list partition level usage request.
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPercentileGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPercentileClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PercentileClientListMetricsOptions ¶ added in v0.3.0
type PercentileClientListMetricsOptions struct { }
PercentileClientListMetricsOptions contains the optional parameters for the PercentileClient.ListMetrics method.
type PercentileClientListMetricsResponse ¶ added in v0.3.0
type PercentileClientListMetricsResponse struct {
PercentileMetricListResult
}
PercentileClientListMetricsResponse contains the response from method PercentileClient.ListMetrics.
type PercentileMetric ¶
type PercentileMetric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The percentile metric values for the specified time window and timestep. MetricValues []*PercentileMetricValue `json:"metricValues,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The time grain to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
PercentileMetric - Percentile Metric data
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 `json:"value,omitempty" azure:"ro"` }
PercentileMetricListResult - The response to a list percentile metrics request.
type PercentileMetricValue ¶
type PercentileMetricValue struct { // READ-ONLY; The average value of the metric. Average *float64 `json:"average,omitempty" azure:"ro"` // READ-ONLY; The number of values for the metric. Count *int32 `json:"_count,omitempty" azure:"ro"` // READ-ONLY; The max value of the metric. Maximum *float64 `json:"maximum,omitempty" azure:"ro"` // READ-ONLY; The min value of the metric. Minimum *float64 `json:"minimum,omitempty" azure:"ro"` // READ-ONLY; The 10th percentile value for the metric. P10 *float64 `json:"P10,omitempty" azure:"ro"` // READ-ONLY; The 25th percentile value for the metric. P25 *float64 `json:"P25,omitempty" azure:"ro"` // READ-ONLY; The 50th percentile value for the metric. P50 *float64 `json:"P50,omitempty" azure:"ro"` // READ-ONLY; The 75th percentile value for the metric. P75 *float64 `json:"P75,omitempty" azure:"ro"` // READ-ONLY; The 90th percentile value for the metric. P90 *float64 `json:"P90,omitempty" azure:"ro"` // READ-ONLY; The 95th percentile value for the metric. P95 *float64 `json:"P95,omitempty" azure:"ro"` // READ-ONLY; The 99th percentile value for the metric. P99 *float64 `json:"P99,omitempty" azure:"ro"` // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` // READ-ONLY; The total value of the metric. Total *float64 `json:"total,omitempty" azure:"ro"` }
PercentileMetricValue - Represents percentile metrics values.
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPercentileSourceTargetGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPercentileSourceTargetClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PercentileSourceTargetClientListMetricsOptions ¶ added in v0.3.0
type PercentileSourceTargetClientListMetricsOptions struct { }
PercentileSourceTargetClientListMetricsOptions contains the optional parameters for the PercentileSourceTargetClient.ListMetrics method.
type PercentileSourceTargetClientListMetricsResponse ¶ added in v0.3.0
type PercentileSourceTargetClientListMetricsResponse struct {
PercentileMetricListResult
}
PercentileSourceTargetClientListMetricsResponse contains the response from method PercentileSourceTargetClient.ListMetrics.
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPercentileTargetGetMetrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPercentileTargetClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PercentileTargetClientListMetricsOptions ¶ added in v0.3.0
type PercentileTargetClientListMetricsOptions struct { }
PercentileTargetClientListMetricsOptions contains the optional parameters for the PercentileTargetClient.ListMetrics method.
type PercentileTargetClientListMetricsResponse ¶ added in v0.3.0
type PercentileTargetClientListMetricsResponse struct {
PercentileMetricListResult
}
PercentileTargetClientListMetricsResponse contains the response from method PercentileTargetClient.ListMetrics.
type PeriodicModeBackupPolicy ¶
type PeriodicModeBackupPolicy struct { // REQUIRED; Describes the mode of backups. Type *BackupPolicyType `json:"type,omitempty"` // The object representing the state of the migration between the backup policies. MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` // Configuration values for periodic mode backup PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` }
PeriodicModeBackupPolicy - The object representing periodic mode backup policy.
func (*PeriodicModeBackupPolicy) GetBackupPolicy ¶ added in v0.3.0
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 `json:"backupIntervalInMinutes,omitempty"` // An integer representing the time (in hours) that each backup is retained BackupRetentionIntervalInHours *int32 `json:"backupRetentionIntervalInHours,omitempty"` // Enum to indicate type of backup residency BackupStorageRedundancy *BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty"` }
PeriodicModeProperties - Configuration values for periodic mode backup
type Permission ¶
type Permission struct { // An array of data actions that are allowed. DataActions []*string `json:"dataActions,omitempty"` // An array of data actions that are denied. NotDataActions []*string `json:"notDataActions,omitempty"` }
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.
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 `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
PrivateEndpointConnection - A private endpoint connection
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections Value []*PrivateEndpointConnection `json:"value,omitempty"` }
PrivateEndpointConnectionListResult - A list of private endpoint connections
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Group id of the private endpoint. GroupID *string `json:"groupId,omitempty"` // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` // Connection State of the Private Endpoint Connection. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` // Provisioning state of the private endpoint. ProvisioningState *string `json:"provisioningState,omitempty"` }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateEndpointConnectionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateEndpointConnectionDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rg1", "ddb1", "privateEndpointConnectionName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) NewListByDatabaseAccountPager ¶ added in v0.5.0
func (client *PrivateEndpointConnectionsClient) NewListByDatabaseAccountPager(resourceGroupName string, accountName string, options *PrivateEndpointConnectionsClientListByDatabaseAccountOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByDatabaseAccountResponse]
NewListByDatabaseAccountPager - List all private endpoint connections on a Cosmos DB account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListByDatabaseAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateEndpointConnectionListGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByDatabaseAccountOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByDatabaseAccountOptions struct { }
PrivateEndpointConnectionsClientListByDatabaseAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByDatabaseAccount method.
type PrivateEndpointConnectionsClientListByDatabaseAccountResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByDatabaseAccountResponse struct {
PrivateEndpointConnectionListResult
}
PrivateEndpointConnectionsClientListByDatabaseAccountResponse contains the response from method PrivateEndpointConnectionsClient.ListByDatabaseAccount.
type PrivateEndpointProperty ¶
type PrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string `json:"id,omitempty"` }
PrivateEndpointProperty - Private endpoint which the connection belongs to.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
PrivateLinkResource - A private link resource
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource `json:"value,omitempty"` }
PrivateLinkResourceListResult - A list of private link resources
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; The private link resource group id. GroupID *string `json:"groupId,omitempty" azure:"ro"` // READ-ONLY; The private link resource required member names. RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` // READ-ONLY; The private link resource required zone names. RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"` }
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.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateLinkResourceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rg1", "ddb1", "sql", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrivateLinkResourcesClient) NewListByDatabaseAccountPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListByDatabaseAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBPrivateLinkResourceListGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByDatabaseAccountPager("rg1", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientGetResponse struct {
PrivateLinkResource
}
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByDatabaseAccountOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientListByDatabaseAccountOptions struct { }
PrivateLinkResourcesClientListByDatabaseAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByDatabaseAccount method.
type PrivateLinkResourcesClientListByDatabaseAccountResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientListByDatabaseAccountResponse struct {
PrivateLinkResourceListResult
}
PrivateLinkResourcesClientListByDatabaseAccountResponse contains the response from method PrivateLinkResourcesClient.ListByDatabaseAccount.
type PrivateLinkServiceConnectionStateProperty ¶
type PrivateLinkServiceConnectionStateProperty struct { // The private link service connection description. Description *string `json:"description,omitempty"` // The private link service connection status. Status *string `json:"status,omitempty"` // READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect) ActionsRequired *string `json:"actionsRequired,omitempty" azure:"ro"` }
PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Whether requests from Public Network are allowed
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" )
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 `json:"region,omitempty"` }
RegionForOnlineOffline - Cosmos DB region to online or offline.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
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 ( ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned,UserAssigned" ResourceIdentityTypeNone ResourceIdentityType = "None" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type RestorableDatabaseAccountGetResult ¶
type RestorableDatabaseAccountGetResult struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of a restorable database account. Properties *RestorableDatabaseAccountProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableDatabaseAccountGetResult - A Azure Cosmos DB restorable database account.
type RestorableDatabaseAccountProperties ¶
type RestorableDatabaseAccountProperties struct { // The name of the global database account AccountName *string `json:"accountName,omitempty"` // The creation time of the restorable database account (ISO-8601 format). CreationTime *time.Time `json:"creationTime,omitempty"` // The time at which the restorable database account has been deleted (ISO-8601 format). DeletionTime *time.Time `json:"deletionTime,omitempty"` // READ-ONLY; The API type of the restorable database account. APIType *APIType `json:"apiType,omitempty" azure:"ro"` // READ-ONLY; List of regions where the of the database account can be restored from. RestorableLocations []*RestorableLocationResource `json:"restorableLocations,omitempty" azure:"ro"` }
RestorableDatabaseAccountProperties - The properties of a restorable database account.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableDatabaseAccountGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByLocation(ctx, "West US", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RestorableDatabaseAccountsClient) NewListByLocationPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 location - Cosmos DB region, with spaces between words and each word capitalized. options - RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableDatabaseAccountList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByLocationPager("West US", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*RestorableDatabaseAccountsClient) NewListPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-15 options - RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableDatabaseAccountsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableDatabaseAccountsClientGetByLocationOptions ¶ added in v0.3.0
type RestorableDatabaseAccountsClientGetByLocationOptions struct { }
RestorableDatabaseAccountsClientGetByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.GetByLocation method.
type RestorableDatabaseAccountsClientGetByLocationResponse ¶ added in v0.3.0
type RestorableDatabaseAccountsClientGetByLocationResponse struct {
RestorableDatabaseAccountGetResult
}
RestorableDatabaseAccountsClientGetByLocationResponse contains the response from method RestorableDatabaseAccountsClient.GetByLocation.
type RestorableDatabaseAccountsClientListByLocationOptions ¶ added in v0.3.0
type RestorableDatabaseAccountsClientListByLocationOptions struct { }
RestorableDatabaseAccountsClientListByLocationOptions contains the optional parameters for the RestorableDatabaseAccountsClient.ListByLocation method.
type RestorableDatabaseAccountsClientListByLocationResponse ¶ added in v0.3.0
type RestorableDatabaseAccountsClientListByLocationResponse struct {
RestorableDatabaseAccountsListResult
}
RestorableDatabaseAccountsClientListByLocationResponse contains the response from method RestorableDatabaseAccountsClient.ListByLocation.
type RestorableDatabaseAccountsClientListOptions ¶ added in v0.3.0
type RestorableDatabaseAccountsClientListOptions struct { }
RestorableDatabaseAccountsClientListOptions contains the optional parameters for the RestorableDatabaseAccountsClient.List method.
type RestorableDatabaseAccountsClientListResponse ¶ added in v0.3.0
type RestorableDatabaseAccountsClientListResponse struct {
RestorableDatabaseAccountsListResult
}
RestorableDatabaseAccountsClientListResponse contains the response from method RestorableDatabaseAccountsClient.List.
type RestorableDatabaseAccountsListResult ¶
type RestorableDatabaseAccountsListResult struct { // READ-ONLY; List of restorable database accounts and their properties. Value []*RestorableDatabaseAccountGetResult `json:"value,omitempty" azure:"ro"` }
RestorableDatabaseAccountsListResult - The List operation response, that contains the restorable database accounts and their properties.
type RestorableLocationResource ¶
type RestorableLocationResource struct { // READ-ONLY; The creation time of the regional restorable database account (ISO-8601 format). CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` // READ-ONLY; The time at which the regional restorable database account has been deleted (ISO-8601 format). DeletionTime *time.Time `json:"deletionTime,omitempty" azure:"ro"` // READ-ONLY; The location of the regional restorable account. LocationName *string `json:"locationName,omitempty" azure:"ro"` // READ-ONLY; The instance id of the regional restorable account. RegionalDatabaseAccountInstanceID *string `json:"regionalDatabaseAccountInstanceId,omitempty" azure:"ro"` }
RestorableLocationResource - Properties of the regional restorable account.
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 `json:"properties,omitempty"` // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableMongodbCollectionGetResult - An Azure Cosmos DB MongoDB collection event
type RestorableMongodbCollectionProperties ¶
type RestorableMongodbCollectionProperties struct { // The resource of an Azure Cosmos DB MongoDB collection event Resource *RestorableMongodbCollectionPropertiesResource `json:"resource,omitempty"` }
RestorableMongodbCollectionProperties - The properties of an Azure Cosmos DB MongoDB collection event
type RestorableMongodbCollectionPropertiesResource ¶
type RestorableMongodbCollectionPropertiesResource struct { // READ-ONLY; The time when this collection event happened. EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"` // READ-ONLY; The operation type of this collection event. OperationType *OperationType `json:"operationType,omitempty" azure:"ro"` // READ-ONLY; The name of this MongoDB collection. OwnerID *string `json:"ownerId,omitempty" azure:"ro"` // READ-ONLY; The resource ID of this MongoDB collection. OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` }
RestorableMongodbCollectionPropertiesResource - The resource of an Azure Cosmos DB MongoDB collection event
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableMongodbCollectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableMongodbCollectionsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableMongodbCollectionsClientListOptions{RestorableMongodbDatabaseRid: to.Ptr("PD5DALigDgw=")}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableMongodbCollectionsClientListOptions ¶ added in v0.3.0
type RestorableMongodbCollectionsClientListOptions struct { // The resource ID of the MongoDB database. RestorableMongodbDatabaseRid *string }
RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.List method.
type RestorableMongodbCollectionsClientListResponse ¶ added in v0.3.0
type RestorableMongodbCollectionsClientListResponse struct {
RestorableMongodbCollectionsListResult
}
RestorableMongodbCollectionsClientListResponse contains the response from method RestorableMongodbCollectionsClient.List.
type RestorableMongodbCollectionsListResult ¶
type RestorableMongodbCollectionsListResult struct { // READ-ONLY; List of MongoDB collection events and their properties. Value []*RestorableMongodbCollectionGetResult `json:"value,omitempty" azure:"ro"` }
RestorableMongodbCollectionsListResult - The List operation response, that contains the MongoDB collection events and their properties.
type RestorableMongodbDatabaseGetResult ¶
type RestorableMongodbDatabaseGetResult struct { // The properties of a MongoDB database event. Properties *RestorableMongodbDatabaseProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableMongodbDatabaseGetResult - An Azure Cosmos DB MongoDB database event
type RestorableMongodbDatabaseProperties ¶
type RestorableMongodbDatabaseProperties struct { // The resource of an Azure Cosmos DB MongoDB database event Resource *RestorableMongodbDatabasePropertiesResource `json:"resource,omitempty"` }
RestorableMongodbDatabaseProperties - The properties of an Azure Cosmos DB MongoDB database event
type RestorableMongodbDatabasePropertiesResource ¶
type RestorableMongodbDatabasePropertiesResource struct { // READ-ONLY; The time when this database event happened. EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"` // READ-ONLY; The operation type of this database event. OperationType *OperationType `json:"operationType,omitempty" azure:"ro"` // READ-ONLY; The name of this MongoDB database. OwnerID *string `json:"ownerId,omitempty" azure:"ro"` // READ-ONLY; The resource ID of this MongoDB database. OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` }
RestorableMongodbDatabasePropertiesResource - The resource of an Azure Cosmos DB MongoDB database event
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableMongodbDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableMongodbDatabasesClient("2296c272-5d55-40d9-bc05-4d56dc2d7588", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableMongodbDatabasesClientListOptions ¶ added in v0.3.0
type RestorableMongodbDatabasesClientListOptions struct { }
RestorableMongodbDatabasesClientListOptions contains the optional parameters for the RestorableMongodbDatabasesClient.List method.
type RestorableMongodbDatabasesClientListResponse ¶ added in v0.3.0
type RestorableMongodbDatabasesClientListResponse struct {
RestorableMongodbDatabasesListResult
}
RestorableMongodbDatabasesClientListResponse contains the response from method RestorableMongodbDatabasesClient.List.
type RestorableMongodbDatabasesListResult ¶
type RestorableMongodbDatabasesListResult struct { // READ-ONLY; List of MongoDB database events and their properties. Value []*RestorableMongodbDatabaseGetResult `json:"value,omitempty" azure:"ro"` }
RestorableMongodbDatabasesListResult - The List operation response, that contains the MongoDB database events and their properties.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableMongodbResourceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableMongodbResourcesClient("2296c272-5d55-40d9-bc05-4d56dc2d7588", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableMongodbResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("10/13/2020 4:56"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableMongodbResourcesClientListOptions ¶ added in v0.3.0
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.List method.
type RestorableMongodbResourcesClientListResponse ¶ added in v0.3.0
type RestorableMongodbResourcesClientListResponse struct {
RestorableMongodbResourcesListResult
}
RestorableMongodbResourcesClientListResponse contains the response from method RestorableMongodbResourcesClient.List.
type RestorableMongodbResourcesListResult ¶
type RestorableMongodbResourcesListResult struct { // READ-ONLY; List of restorable MongoDB resources, including the database and collection names. Value []*DatabaseRestoreResource `json:"value,omitempty" azure:"ro"` }
RestorableMongodbResourcesListResult - The List operation response, that contains the restorable MongoDB resources.
type RestorableSQLContainerGetResult ¶
type RestorableSQLContainerGetResult struct { // The properties of a SQL container event. Properties *RestorableSQLContainerProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableSQLContainerGetResult - An Azure Cosmos DB SQL container event
type RestorableSQLContainerProperties ¶
type RestorableSQLContainerProperties struct { // The resource of an Azure Cosmos DB SQL container event Resource *RestorableSQLContainerPropertiesResource `json:"resource,omitempty"` }
RestorableSQLContainerProperties - The properties of an Azure Cosmos DB SQL container event
type RestorableSQLContainerPropertiesResource ¶
type RestorableSQLContainerPropertiesResource struct { // Cosmos DB SQL container resource object Container *RestorableSQLContainerPropertiesResourceContainer `json:"container,omitempty"` // READ-ONLY; The when this container event happened. EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"` // READ-ONLY; The operation type of this container event. OperationType *OperationType `json:"operationType,omitempty" azure:"ro"` // READ-ONLY; The name of this SQL container. OwnerID *string `json:"ownerId,omitempty" azure:"ro"` // READ-ONLY; The resource ID of this SQL container. OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` }
RestorableSQLContainerPropertiesResource - The resource of an Azure Cosmos DB SQL container event
type RestorableSQLContainerPropertiesResourceContainer ¶
type RestorableSQLContainerPropertiesResourceContainer struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"` // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` // The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that specifies the addressable path of the container resource. Self *string `json:"_self,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
RestorableSQLContainerPropertiesResourceContainer - Cosmos DB SQL container resource object
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableSqlContainerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableSQLContainersClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "98a570f2-63db-4117-91f0-366327b7b353", &armcosmos.RestorableSQLContainersClientListOptions{RestorableSQLDatabaseRid: to.Ptr("3fu-hg=="), StartTime: nil, EndTime: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableSQLContainersClientListOptions ¶ added in v0.3.0
type RestorableSQLContainersClientListOptions struct { // The snapshot create timestamp before which snapshots need to be listed. EndTime *string // The resource ID of the SQL database. RestorableSQLDatabaseRid *string // The snapshot create timestamp after which snapshots need to be listed. StartTime *string }
RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.List method.
type RestorableSQLContainersClientListResponse ¶ added in v0.3.0
type RestorableSQLContainersClientListResponse struct {
RestorableSQLContainersListResult
}
RestorableSQLContainersClientListResponse contains the response from method RestorableSQLContainersClient.List.
type RestorableSQLContainersListResult ¶
type RestorableSQLContainersListResult struct { // READ-ONLY; List of SQL container events and their properties. Value []*RestorableSQLContainerGetResult `json:"value,omitempty" azure:"ro"` }
RestorableSQLContainersListResult - The List operation response, that contains the SQL container events and their properties.
type RestorableSQLDatabaseGetResult ¶
type RestorableSQLDatabaseGetResult struct { // The properties of a SQL database event. Properties *RestorableSQLDatabaseProperties `json:"properties,omitempty"` // READ-ONLY; The unique resource Identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableSQLDatabaseGetResult - An Azure Cosmos DB SQL database event
type RestorableSQLDatabaseProperties ¶
type RestorableSQLDatabaseProperties struct { // The resource of an Azure Cosmos DB SQL database event Resource *RestorableSQLDatabasePropertiesResource `json:"resource,omitempty"` }
RestorableSQLDatabaseProperties - The properties of an Azure Cosmos DB SQL database event
type RestorableSQLDatabasePropertiesResource ¶
type RestorableSQLDatabasePropertiesResource struct { // Cosmos DB SQL database resource object Database *RestorableSQLDatabasePropertiesResourceDatabase `json:"database,omitempty"` // READ-ONLY; The time when this database event happened. EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"` // READ-ONLY; The operation type of this database event. OperationType *OperationType `json:"operationType,omitempty" azure:"ro"` // READ-ONLY; The name of the SQL database. OwnerID *string `json:"ownerId,omitempty" azure:"ro"` // READ-ONLY; The resource ID of the SQL database. OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` }
RestorableSQLDatabasePropertiesResource - The resource of an Azure Cosmos DB SQL database event
type RestorableSQLDatabasePropertiesResourceDatabase ¶
type RestorableSQLDatabasePropertiesResourceDatabase struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` // READ-ONLY; A system generated property that specified the addressable path of the collections resource. Colls *string `json:"_colls,omitempty" azure:"ro"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that specifies the addressable path of the database resource. Self *string `json:"_self,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` // READ-ONLY; A system generated property that specifies the addressable path of the users resource. Users *string `json:"_users,omitempty" azure:"ro"` }
RestorableSQLDatabasePropertiesResourceDatabase - Cosmos DB SQL database resource object
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 ¶ added in v0.5.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableSqlDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableSQLDatabasesClient("2296c272-5d55-40d9-bc05-4d56dc2d7588", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableSQLDatabasesClientListOptions ¶ added in v0.3.0
type RestorableSQLDatabasesClientListOptions struct { }
RestorableSQLDatabasesClientListOptions contains the optional parameters for the RestorableSQLDatabasesClient.List method.
type RestorableSQLDatabasesClientListResponse ¶ added in v0.3.0
type RestorableSQLDatabasesClientListResponse struct {
RestorableSQLDatabasesListResult
}
RestorableSQLDatabasesClientListResponse contains the response from method RestorableSQLDatabasesClient.List.
type RestorableSQLDatabasesListResult ¶
type RestorableSQLDatabasesListResult struct { // READ-ONLY; List of SQL database events and their properties. Value []*RestorableSQLDatabaseGetResult `json:"value,omitempty" azure:"ro"` }
RestorableSQLDatabasesListResult - The List operation response, that contains the SQL database events and their properties.
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 ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBRestorableSqlResourceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewRestorableSQLResourcesClient("2296c272-5d55-40d9-bc05-4d56dc2d7588", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableSQLResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"), RestoreTimestampInUTC: to.Ptr("10/13/2020 4:56"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableSQLResourcesClientListOptions ¶ added in v0.3.0
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.List method.
type RestorableSQLResourcesClientListResponse ¶ added in v0.3.0
type RestorableSQLResourcesClientListResponse struct {
RestorableSQLResourcesListResult
}
RestorableSQLResourcesClientListResponse contains the response from method RestorableSQLResourcesClient.List.
type RestorableSQLResourcesListResult ¶
type RestorableSQLResourcesListResult struct { // READ-ONLY; List of restorable SQL resources, including the database and collection names. Value []*DatabaseRestoreResource `json:"value,omitempty" azure:"ro"` }
RestorableSQLResourcesListResult - The List operation response, that contains the restorable SQL resources.
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 `json:"databasesToRestore,omitempty"` // Describes the mode of the restore. RestoreMode *RestoreMode `json:"restoreMode,omitempty"` // 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 `json:"restoreSource,omitempty"` // Time to which the account has to be restored (ISO-8601 format). RestoreTimestampInUTC *time.Time `json:"restoreTimestampInUtc,omitempty"` }
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 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 `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLContainerCreateUpdateProperties ¶
type SQLContainerCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a container Resource *SQLContainerResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container.
type SQLContainerGetProperties ¶
type SQLContainerGetProperties struct { Options *SQLContainerGetPropertiesOptions `json:"options,omitempty"` Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"` }
SQLContainerGetProperties - The properties of an Azure Cosmos DB container
type SQLContainerGetPropertiesOptions ¶
type SQLContainerGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type SQLContainerGetPropertiesResource ¶
type SQLContainerGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"` // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` // The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type SQLContainerGetResults ¶
type SQLContainerGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB container Properties *SQLContainerGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLContainerGetResults - An Azure Cosmos DB container.
func (SQLContainerGetResults) MarshalJSON ¶
func (s SQLContainerGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLContainerGetResults.
type SQLContainerListResult ¶
type SQLContainerListResult struct { // READ-ONLY; List of containers and their properties. Value []*SQLContainerGetResults `json:"value,omitempty" azure:"ro"` }
SQLContainerListResult - The List operation response, that contains the containers and their properties.
type SQLContainerResource ¶
type SQLContainerResource struct { // REQUIRED; Name of the Cosmos DB SQL container ID *string `json:"id,omitempty"` // Analytical TTL. AnalyticalStorageTTL *int64 `json:"analyticalStorageTtl,omitempty"` // The conflict resolution policy for the container. ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // Default time to live DefaultTTL *int32 `json:"defaultTtl,omitempty"` // The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` // The configuration of the partition key to be used for partitioning data into multiple partitions PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` // The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos // DB service. UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` }
SQLContainerResource - Cosmos DB SQL container resource object
type SQLDatabaseCreateUpdateParameters ¶
type SQLDatabaseCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB SQL database. Properties *SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLDatabaseCreateUpdateProperties ¶
type SQLDatabaseCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a SQL database Resource *SQLDatabaseResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database.
type SQLDatabaseGetProperties ¶
type SQLDatabaseGetProperties struct { Options *SQLDatabaseGetPropertiesOptions `json:"options,omitempty"` Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"` }
SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database
type SQLDatabaseGetPropertiesOptions ¶
type SQLDatabaseGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type SQLDatabaseGetPropertiesResource ¶
type SQLDatabaseGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` // A system generated property that specified the addressable path of the collections resource. Colls *string `json:"_colls,omitempty"` // A system generated property that specifies the addressable path of the users resource. Users *string `json:"_users,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type SQLDatabaseGetResults ¶
type SQLDatabaseGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB SQL database Properties *SQLDatabaseGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLDatabaseListResult ¶
type SQLDatabaseListResult struct { // READ-ONLY; List of SQL databases and their properties. Value []*SQLDatabaseGetResults `json:"value,omitempty" azure:"ro"` }
SQLDatabaseListResult - The List operation response, that contains the SQL databases and their properties.
type SQLDatabaseResource ¶
type SQLDatabaseResource struct { // REQUIRED; Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` }
SQLDatabaseResource - Cosmos DB SQL database resource object
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) 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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBSqlContainerBackupInformation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewSQLResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
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 2021-10-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.
func (*SQLResourcesClient) NewListSQLContainersPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLContainers method.
func (*SQLResourcesClient) NewListSQLDatabasesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLDatabases method.
func (*SQLResourcesClient) NewListSQLRoleAssignmentsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLRoleAssignments method.
func (*SQLResourcesClient) NewListSQLRoleDefinitionsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLRoleDefinitions method.
func (*SQLResourcesClient) NewListSQLStoredProceduresPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLStoredProcedures method.
func (*SQLResourcesClient) NewListSQLTriggersPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLTriggers method.
func (*SQLResourcesClient) NewListSQLUserDefinedFunctionsPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListSQLUserDefinedFunctions method.
type SQLResourcesClientBeginCreateUpdateSQLContainerOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLContainerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLContainer method.
type SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLDatabase method.
type SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleAssignment method.
type SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLRoleDefinition method.
type SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLStoredProcedure method.
type SQLResourcesClientBeginCreateUpdateSQLTriggerOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLTriggerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLTrigger method.
type SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions ¶ added in v0.3.0
type SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginCreateUpdateSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateSQLUserDefinedFunction method.
type SQLResourcesClientBeginDeleteSQLContainerOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLContainerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLContainerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLContainer method.
type SQLResourcesClientBeginDeleteSQLDatabaseOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLDatabase method.
type SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleAssignment method.
type SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLRoleDefinition method.
type SQLResourcesClientBeginDeleteSQLStoredProcedureOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLStoredProcedureOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLStoredProcedure method.
type SQLResourcesClientBeginDeleteSQLTriggerOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLTriggerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLTrigger method.
type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions ¶ added in v0.3.0
type SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginDeleteSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.BeginDeleteSQLUserDefinedFunction method.
type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions ¶ added in v0.3.0
type SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLContainerToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToAutoscale method.
type SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLContainerToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLContainerToManualThroughput method.
type SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions ¶ added in v0.3.0
type SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLDatabaseToAutoscaleOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToAutoscale method.
type SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginMigrateSQLDatabaseToManualThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginMigrateSQLDatabaseToManualThroughput method.
type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions ¶ added in v0.3.0
type SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the SQLResourcesClient.BeginRetrieveContinuousBackupInformation method.
type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientBeginUpdateSQLContainerThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginUpdateSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLContainerThroughput method.
type SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLResourcesClientBeginUpdateSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginUpdateSQLDatabaseThroughput method.
type SQLResourcesClientCreateUpdateSQLContainerResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLContainerResponse struct {
SQLContainerGetResults
}
SQLResourcesClientCreateUpdateSQLContainerResponse contains the response from method SQLResourcesClient.CreateUpdateSQLContainer.
type SQLResourcesClientCreateUpdateSQLDatabaseResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLDatabaseResponse struct {
SQLDatabaseGetResults
}
SQLResourcesClientCreateUpdateSQLDatabaseResponse contains the response from method SQLResourcesClient.CreateUpdateSQLDatabase.
type SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse struct {
SQLRoleAssignmentGetResults
}
SQLResourcesClientCreateUpdateSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.CreateUpdateSQLRoleAssignment.
type SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse struct {
SQLRoleDefinitionGetResults
}
SQLResourcesClientCreateUpdateSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.CreateUpdateSQLRoleDefinition.
type SQLResourcesClientCreateUpdateSQLStoredProcedureResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLStoredProcedureResponse struct {
SQLStoredProcedureGetResults
}
SQLResourcesClientCreateUpdateSQLStoredProcedureResponse contains the response from method SQLResourcesClient.CreateUpdateSQLStoredProcedure.
type SQLResourcesClientCreateUpdateSQLTriggerResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLTriggerResponse struct {
SQLTriggerGetResults
}
SQLResourcesClientCreateUpdateSQLTriggerResponse contains the response from method SQLResourcesClient.CreateUpdateSQLTrigger.
type SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse ¶ added in v0.3.0
type SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse struct {
SQLUserDefinedFunctionGetResults
}
SQLResourcesClientCreateUpdateSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.CreateUpdateSQLUserDefinedFunction.
type SQLResourcesClientDeleteSQLContainerResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLContainerResponse struct { }
SQLResourcesClientDeleteSQLContainerResponse contains the response from method SQLResourcesClient.DeleteSQLContainer.
type SQLResourcesClientDeleteSQLDatabaseResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLDatabaseResponse struct { }
SQLResourcesClientDeleteSQLDatabaseResponse contains the response from method SQLResourcesClient.DeleteSQLDatabase.
type SQLResourcesClientDeleteSQLRoleAssignmentResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLRoleAssignmentResponse struct { }
SQLResourcesClientDeleteSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.DeleteSQLRoleAssignment.
type SQLResourcesClientDeleteSQLRoleDefinitionResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLRoleDefinitionResponse struct { }
SQLResourcesClientDeleteSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.DeleteSQLRoleDefinition.
type SQLResourcesClientDeleteSQLStoredProcedureResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLStoredProcedureResponse struct { }
SQLResourcesClientDeleteSQLStoredProcedureResponse contains the response from method SQLResourcesClient.DeleteSQLStoredProcedure.
type SQLResourcesClientDeleteSQLTriggerResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLTriggerResponse struct { }
SQLResourcesClientDeleteSQLTriggerResponse contains the response from method SQLResourcesClient.DeleteSQLTrigger.
type SQLResourcesClientDeleteSQLUserDefinedFunctionResponse ¶ added in v0.3.0
type SQLResourcesClientDeleteSQLUserDefinedFunctionResponse struct { }
SQLResourcesClientDeleteSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.DeleteSQLUserDefinedFunction.
type SQLResourcesClientGetSQLContainerOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLContainerOptions struct { }
SQLResourcesClientGetSQLContainerOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainer method.
type SQLResourcesClientGetSQLContainerResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLContainerResponse struct {
SQLContainerGetResults
}
SQLResourcesClientGetSQLContainerResponse contains the response from method SQLResourcesClient.GetSQLContainer.
type SQLResourcesClientGetSQLContainerThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLContainerThroughputOptions struct { }
SQLResourcesClientGetSQLContainerThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLContainerThroughput method.
type SQLResourcesClientGetSQLContainerThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLContainerThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientGetSQLContainerThroughputResponse contains the response from method SQLResourcesClient.GetSQLContainerThroughput.
type SQLResourcesClientGetSQLDatabaseOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLDatabaseOptions struct { }
SQLResourcesClientGetSQLDatabaseOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabase method.
type SQLResourcesClientGetSQLDatabaseResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLDatabaseResponse struct {
SQLDatabaseGetResults
}
SQLResourcesClientGetSQLDatabaseResponse contains the response from method SQLResourcesClient.GetSQLDatabase.
type SQLResourcesClientGetSQLDatabaseThroughputOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLDatabaseThroughputOptions struct { }
SQLResourcesClientGetSQLDatabaseThroughputOptions contains the optional parameters for the SQLResourcesClient.GetSQLDatabaseThroughput method.
type SQLResourcesClientGetSQLDatabaseThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientGetSQLDatabaseThroughputResponse contains the response from method SQLResourcesClient.GetSQLDatabaseThroughput.
type SQLResourcesClientGetSQLRoleAssignmentOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLRoleAssignmentOptions struct { }
SQLResourcesClientGetSQLRoleAssignmentOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleAssignment method.
type SQLResourcesClientGetSQLRoleAssignmentResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLRoleAssignmentResponse struct {
SQLRoleAssignmentGetResults
}
SQLResourcesClientGetSQLRoleAssignmentResponse contains the response from method SQLResourcesClient.GetSQLRoleAssignment.
type SQLResourcesClientGetSQLRoleDefinitionOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLRoleDefinitionOptions struct { }
SQLResourcesClientGetSQLRoleDefinitionOptions contains the optional parameters for the SQLResourcesClient.GetSQLRoleDefinition method.
type SQLResourcesClientGetSQLRoleDefinitionResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLRoleDefinitionResponse struct {
SQLRoleDefinitionGetResults
}
SQLResourcesClientGetSQLRoleDefinitionResponse contains the response from method SQLResourcesClient.GetSQLRoleDefinition.
type SQLResourcesClientGetSQLStoredProcedureOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLStoredProcedureOptions struct { }
SQLResourcesClientGetSQLStoredProcedureOptions contains the optional parameters for the SQLResourcesClient.GetSQLStoredProcedure method.
type SQLResourcesClientGetSQLStoredProcedureResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLStoredProcedureResponse struct {
SQLStoredProcedureGetResults
}
SQLResourcesClientGetSQLStoredProcedureResponse contains the response from method SQLResourcesClient.GetSQLStoredProcedure.
type SQLResourcesClientGetSQLTriggerOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLTriggerOptions struct { }
SQLResourcesClientGetSQLTriggerOptions contains the optional parameters for the SQLResourcesClient.GetSQLTrigger method.
type SQLResourcesClientGetSQLTriggerResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLTriggerResponse struct {
SQLTriggerGetResults
}
SQLResourcesClientGetSQLTriggerResponse contains the response from method SQLResourcesClient.GetSQLTrigger.
type SQLResourcesClientGetSQLUserDefinedFunctionOptions ¶ added in v0.3.0
type SQLResourcesClientGetSQLUserDefinedFunctionOptions struct { }
SQLResourcesClientGetSQLUserDefinedFunctionOptions contains the optional parameters for the SQLResourcesClient.GetSQLUserDefinedFunction method.
type SQLResourcesClientGetSQLUserDefinedFunctionResponse ¶ added in v0.3.0
type SQLResourcesClientGetSQLUserDefinedFunctionResponse struct {
SQLUserDefinedFunctionGetResults
}
SQLResourcesClientGetSQLUserDefinedFunctionResponse contains the response from method SQLResourcesClient.GetSQLUserDefinedFunction.
type SQLResourcesClientListSQLContainersOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLContainersOptions struct { }
SQLResourcesClientListSQLContainersOptions contains the optional parameters for the SQLResourcesClient.ListSQLContainers method.
type SQLResourcesClientListSQLContainersResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLContainersResponse struct {
SQLContainerListResult
}
SQLResourcesClientListSQLContainersResponse contains the response from method SQLResourcesClient.ListSQLContainers.
type SQLResourcesClientListSQLDatabasesOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLDatabasesOptions struct { }
SQLResourcesClientListSQLDatabasesOptions contains the optional parameters for the SQLResourcesClient.ListSQLDatabases method.
type SQLResourcesClientListSQLDatabasesResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLDatabasesResponse struct {
SQLDatabaseListResult
}
SQLResourcesClientListSQLDatabasesResponse contains the response from method SQLResourcesClient.ListSQLDatabases.
type SQLResourcesClientListSQLRoleAssignmentsOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLRoleAssignmentsOptions struct { }
SQLResourcesClientListSQLRoleAssignmentsOptions contains the optional parameters for the SQLResourcesClient.ListSQLRoleAssignments method.
type SQLResourcesClientListSQLRoleAssignmentsResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLRoleAssignmentsResponse struct {
SQLRoleAssignmentListResult
}
SQLResourcesClientListSQLRoleAssignmentsResponse contains the response from method SQLResourcesClient.ListSQLRoleAssignments.
type SQLResourcesClientListSQLRoleDefinitionsOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLRoleDefinitionsOptions struct { }
SQLResourcesClientListSQLRoleDefinitionsOptions contains the optional parameters for the SQLResourcesClient.ListSQLRoleDefinitions method.
type SQLResourcesClientListSQLRoleDefinitionsResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLRoleDefinitionsResponse struct {
SQLRoleDefinitionListResult
}
SQLResourcesClientListSQLRoleDefinitionsResponse contains the response from method SQLResourcesClient.ListSQLRoleDefinitions.
type SQLResourcesClientListSQLStoredProceduresOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLStoredProceduresOptions struct { }
SQLResourcesClientListSQLStoredProceduresOptions contains the optional parameters for the SQLResourcesClient.ListSQLStoredProcedures method.
type SQLResourcesClientListSQLStoredProceduresResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLStoredProceduresResponse struct {
SQLStoredProcedureListResult
}
SQLResourcesClientListSQLStoredProceduresResponse contains the response from method SQLResourcesClient.ListSQLStoredProcedures.
type SQLResourcesClientListSQLTriggersOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLTriggersOptions struct { }
SQLResourcesClientListSQLTriggersOptions contains the optional parameters for the SQLResourcesClient.ListSQLTriggers method.
type SQLResourcesClientListSQLTriggersResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLTriggersResponse struct {
SQLTriggerListResult
}
SQLResourcesClientListSQLTriggersResponse contains the response from method SQLResourcesClient.ListSQLTriggers.
type SQLResourcesClientListSQLUserDefinedFunctionsOptions ¶ added in v0.3.0
type SQLResourcesClientListSQLUserDefinedFunctionsOptions struct { }
SQLResourcesClientListSQLUserDefinedFunctionsOptions contains the optional parameters for the SQLResourcesClient.ListSQLUserDefinedFunctions method.
type SQLResourcesClientListSQLUserDefinedFunctionsResponse ¶ added in v0.3.0
type SQLResourcesClientListSQLUserDefinedFunctionsResponse struct {
SQLUserDefinedFunctionListResult
}
SQLResourcesClientListSQLUserDefinedFunctionsResponse contains the response from method SQLResourcesClient.ListSQLUserDefinedFunctions.
type SQLResourcesClientMigrateSQLContainerToAutoscaleResponse ¶ added in v0.3.0
type SQLResourcesClientMigrateSQLContainerToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientMigrateSQLContainerToAutoscaleResponse contains the response from method SQLResourcesClient.MigrateSQLContainerToAutoscale.
type SQLResourcesClientMigrateSQLContainerToManualThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientMigrateSQLContainerToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientMigrateSQLContainerToManualThroughputResponse contains the response from method SQLResourcesClient.MigrateSQLContainerToManualThroughput.
type SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse ¶ added in v0.3.0
type SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientMigrateSQLDatabaseToAutoscaleResponse contains the response from method SQLResourcesClient.MigrateSQLDatabaseToAutoscale.
type SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientMigrateSQLDatabaseToManualThroughputResponse contains the response from method SQLResourcesClient.MigrateSQLDatabaseToManualThroughput.
type SQLResourcesClientRetrieveContinuousBackupInformationResponse ¶ added in v0.3.0
type SQLResourcesClientRetrieveContinuousBackupInformationResponse struct {
BackupInformation
}
SQLResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method SQLResourcesClient.RetrieveContinuousBackupInformation.
type SQLResourcesClientUpdateSQLContainerThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientUpdateSQLContainerThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientUpdateSQLContainerThroughputResponse contains the response from method SQLResourcesClient.UpdateSQLContainerThroughput.
type SQLResourcesClientUpdateSQLDatabaseThroughputResponse ¶ added in v0.3.0
type SQLResourcesClientUpdateSQLDatabaseThroughputResponse struct {
ThroughputSettingsGetResults
}
SQLResourcesClientUpdateSQLDatabaseThroughputResponse contains the response from method SQLResourcesClient.UpdateSQLDatabaseThroughput.
type SQLRoleAssignmentCreateUpdateParameters ¶
type SQLRoleAssignmentCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB SQL Role Assignment. Properties *SQLRoleAssignmentResource `json:"properties,omitempty"` }
SQLRoleAssignmentCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB SQL Role Assignment.
type SQLRoleAssignmentGetResults ¶
type SQLRoleAssignmentGetResults struct { // Properties related to the Role Assignment. Properties *SQLRoleAssignmentResource `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLRoleAssignmentGetResults - An Azure Cosmos DB Role Assignment
type SQLRoleAssignmentListResult ¶
type SQLRoleAssignmentListResult struct { // READ-ONLY; List of Role Assignments and their properties Value []*SQLRoleAssignmentGetResults `json:"value,omitempty" azure:"ro"` }
SQLRoleAssignmentListResult - The relevant Role Assignments.
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 `json:"principalId,omitempty"` // The unique identifier for the associated Role Definition. RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` // The data plane resource path for which access is being granted through this Role Assignment. Scope *string `json:"scope,omitempty"` }
SQLRoleAssignmentResource - Azure Cosmos DB SQL Role Assignment resource object.
type SQLRoleDefinitionCreateUpdateParameters ¶
type SQLRoleDefinitionCreateUpdateParameters struct { // Properties to create and update an Azure Cosmos DB SQL Role Definition. Properties *SQLRoleDefinitionResource `json:"properties,omitempty"` }
SQLRoleDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB SQL Role Definition.
type SQLRoleDefinitionGetResults ¶
type SQLRoleDefinitionGetResults struct { // Properties related to the Role Definition. Properties *SQLRoleDefinitionResource `json:"properties,omitempty"` // READ-ONLY; The unique resource identifier of the database account. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the database account. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLRoleDefinitionGetResults - An Azure Cosmos DB SQL Role Definition.
type SQLRoleDefinitionListResult ¶
type SQLRoleDefinitionListResult struct { // READ-ONLY; List of Role Definitions and their properties. Value []*SQLRoleDefinitionGetResults `json:"value,omitempty" azure:"ro"` }
SQLRoleDefinitionListResult - The relevant Role Definitions.
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 `json:"assignableScopes,omitempty"` // The set of operations allowed through this Role Definition. Permissions []*Permission `json:"permissions,omitempty"` // A user-friendly name for the Role Definition. Must be unique for the database account. RoleName *string `json:"roleName,omitempty"` // Indicates whether the Role Definition was built-in or user created. Type *RoleDefinitionType `json:"type,omitempty"` }
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.
type SQLStoredProcedureCreateUpdateParameters ¶
type SQLStoredProcedureCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB storedProcedure. Properties *SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLStoredProcedureCreateUpdateProperties ¶
type SQLStoredProcedureCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a storedProcedure Resource *SQLStoredProcedureResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure.
type SQLStoredProcedureGetProperties ¶
type SQLStoredProcedureGetProperties struct {
Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"`
}
SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB StoredProcedure
type SQLStoredProcedureGetPropertiesResource ¶
type SQLStoredProcedureGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL storedProcedure ID *string `json:"id,omitempty"` // Body of the Stored Procedure Body *string `json:"body,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type SQLStoredProcedureGetResults ¶
type SQLStoredProcedureGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB storedProcedure Properties *SQLStoredProcedureGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLStoredProcedureGetResults - An Azure Cosmos DB storedProcedure.
func (SQLStoredProcedureGetResults) MarshalJSON ¶
func (s SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLStoredProcedureGetResults.
type SQLStoredProcedureListResult ¶
type SQLStoredProcedureListResult struct { // READ-ONLY; List of storedProcedures and their properties. Value []*SQLStoredProcedureGetResults `json:"value,omitempty" azure:"ro"` }
SQLStoredProcedureListResult - The List operation response, that contains the storedProcedures and their properties.
type SQLStoredProcedureResource ¶
type SQLStoredProcedureResource struct { // REQUIRED; Name of the Cosmos DB SQL storedProcedure ID *string `json:"id,omitempty"` // Body of the Stored Procedure Body *string `json:"body,omitempty"` }
SQLStoredProcedureResource - Cosmos DB SQL storedProcedure resource object
type SQLTriggerCreateUpdateParameters ¶
type SQLTriggerCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB trigger. Properties *SQLTriggerCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLTriggerCreateUpdateProperties ¶
type SQLTriggerCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a trigger Resource *SQLTriggerResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger.
type SQLTriggerGetProperties ¶
type SQLTriggerGetProperties struct {
Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"`
}
SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger
type SQLTriggerGetPropertiesResource ¶
type SQLTriggerGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL trigger ID *string `json:"id,omitempty"` // Body of the Trigger Body *string `json:"body,omitempty"` // The operation the trigger is associated with TriggerOperation *TriggerOperation `json:"triggerOperation,omitempty"` // Type of the Trigger TriggerType *TriggerType `json:"triggerType,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type SQLTriggerGetResults ¶
type SQLTriggerGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB trigger Properties *SQLTriggerGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLTriggerGetResults - An Azure Cosmos DB trigger.
func (SQLTriggerGetResults) MarshalJSON ¶
func (s SQLTriggerGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLTriggerGetResults.
type SQLTriggerListResult ¶
type SQLTriggerListResult struct { // READ-ONLY; List of triggers and their properties. Value []*SQLTriggerGetResults `json:"value,omitempty" azure:"ro"` }
SQLTriggerListResult - The List operation response, that contains the triggers and their properties.
type SQLTriggerResource ¶
type SQLTriggerResource struct { // REQUIRED; Name of the Cosmos DB SQL trigger ID *string `json:"id,omitempty"` // Body of the Trigger Body *string `json:"body,omitempty"` // The operation the trigger is associated with TriggerOperation *TriggerOperation `json:"triggerOperation,omitempty"` // Type of the Trigger TriggerType *TriggerType `json:"triggerType,omitempty"` }
SQLTriggerResource - Cosmos DB SQL trigger resource object
type SQLUserDefinedFunctionCreateUpdateParameters ¶
type SQLUserDefinedFunctionCreateUpdateParameters struct { // REQUIRED; Properties to create and update Azure Cosmos DB userDefinedFunction. Properties *SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type SQLUserDefinedFunctionCreateUpdateProperties ¶
type SQLUserDefinedFunctionCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a userDefinedFunction Resource *SQLUserDefinedFunctionResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction.
type SQLUserDefinedFunctionGetProperties ¶
type SQLUserDefinedFunctionGetProperties struct {
Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"`
}
SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction
type SQLUserDefinedFunctionGetPropertiesResource ¶
type SQLUserDefinedFunctionGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB SQL userDefinedFunction ID *string `json:"id,omitempty"` // Body of the User Defined Function Body *string `json:"body,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type SQLUserDefinedFunctionGetResults ¶
type SQLUserDefinedFunctionGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB userDefinedFunction Properties *SQLUserDefinedFunctionGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
SQLUserDefinedFunctionGetResults - An Azure Cosmos DB userDefinedFunction.
func (SQLUserDefinedFunctionGetResults) MarshalJSON ¶
func (s SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLUserDefinedFunctionGetResults.
type SQLUserDefinedFunctionListResult ¶
type SQLUserDefinedFunctionListResult struct { // READ-ONLY; List of userDefinedFunctions and their properties. Value []*SQLUserDefinedFunctionGetResults `json:"value,omitempty" azure:"ro"` }
SQLUserDefinedFunctionListResult - The List operation response, that contains the userDefinedFunctions and their properties.
type SQLUserDefinedFunctionResource ¶
type SQLUserDefinedFunctionResource struct { // REQUIRED; Name of the Cosmos DB SQL userDefinedFunction ID *string `json:"id,omitempty"` // Body of the User Defined Function Body *string `json:"body,omitempty"` }
SQLUserDefinedFunctionResource - Cosmos DB SQL userDefinedFunction resource object
type SeedNode ¶
type SeedNode struct { // IP address of this seed node. IPAddress *string `json:"ipAddress,omitempty"` }
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 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 `json:"path,omitempty"` // List of path's spatial type Types []*SpatialType `json:"types,omitempty"` }
func (SpatialSpec) MarshalJSON ¶
func (s SpatialSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type TableCreateUpdateProperties ¶
type TableCreateUpdateProperties struct { // REQUIRED; The standard JSON format of a Table Resource *TableResource `json:"resource,omitempty"` // A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. Options *CreateUpdateOptions `json:"options,omitempty"` }
TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table.
type TableGetProperties ¶
type TableGetProperties struct { Options *TableGetPropertiesOptions `json:"options,omitempty"` Resource *TableGetPropertiesResource `json:"resource,omitempty"` }
TableGetProperties - The properties of an Azure Cosmos Table
type TableGetPropertiesOptions ¶
type TableGetPropertiesOptions struct { // Specifies the Autoscale settings. AutoscaleSettings *AutoscaleSettings `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer // details. Throughput *int32 `json:"throughput,omitempty"` }
type TableGetPropertiesResource ¶
type TableGetPropertiesResource struct { // REQUIRED; Name of the Cosmos DB table ID *string `json:"id,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type TableGetResults ¶
type TableGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB Table Properties *TableGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
TableGetResults - An Azure Cosmos DB Table.
func (TableGetResults) MarshalJSON ¶
func (t TableGetResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TableGetResults.
type TableListResult ¶
type TableListResult struct { // READ-ONLY; List of Table and their properties. Value []*TableGetResults `json:"value,omitempty" azure:"ro"` }
TableListResult - The List operation response, that contains the Table and their properties.
type TableResource ¶
type TableResource struct { // REQUIRED; Name of the Cosmos DB table ID *string `json:"id,omitempty"` }
TableResource - Cosmos DB table resource object
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableCreateUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableMigrateToAutoscale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableMigrateToManualThroughput.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableThroughputUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetTable(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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 2021-10-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/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableThroughputGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetTableThroughput(ctx, "rg1", "ddb1", "tableName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*TableResourcesClient) NewListTablesPager ¶ added in v0.5.0
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-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.ListTables method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-10-15/examples/CosmosDBTableList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armcosmos.NewTableResourcesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListTablesPager("rgName", "ddb1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type TableResourcesClientBeginCreateUpdateTableOptions ¶ added in v0.3.0
type TableResourcesClientBeginCreateUpdateTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginCreateUpdateTableOptions contains the optional parameters for the TableResourcesClient.BeginCreateUpdateTable method.
type TableResourcesClientBeginDeleteTableOptions ¶ added in v0.3.0
type TableResourcesClientBeginDeleteTableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginDeleteTableOptions contains the optional parameters for the TableResourcesClient.BeginDeleteTable method.
type TableResourcesClientBeginMigrateTableToAutoscaleOptions ¶ added in v0.3.0
type TableResourcesClientBeginMigrateTableToAutoscaleOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginMigrateTableToAutoscaleOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToAutoscale method.
type TableResourcesClientBeginMigrateTableToManualThroughputOptions ¶ added in v0.3.0
type TableResourcesClientBeginMigrateTableToManualThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginMigrateTableToManualThroughputOptions contains the optional parameters for the TableResourcesClient.BeginMigrateTableToManualThroughput method.
type TableResourcesClientBeginUpdateTableThroughputOptions ¶ added in v0.3.0
type TableResourcesClientBeginUpdateTableThroughputOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TableResourcesClientBeginUpdateTableThroughputOptions contains the optional parameters for the TableResourcesClient.BeginUpdateTableThroughput method.
type TableResourcesClientCreateUpdateTableResponse ¶ added in v0.3.0
type TableResourcesClientCreateUpdateTableResponse struct {
TableGetResults
}
TableResourcesClientCreateUpdateTableResponse contains the response from method TableResourcesClient.CreateUpdateTable.
type TableResourcesClientDeleteTableResponse ¶ added in v0.3.0
type TableResourcesClientDeleteTableResponse struct { }
TableResourcesClientDeleteTableResponse contains the response from method TableResourcesClient.DeleteTable.
type TableResourcesClientGetTableOptions ¶ added in v0.3.0
type TableResourcesClientGetTableOptions struct { }
TableResourcesClientGetTableOptions contains the optional parameters for the TableResourcesClient.GetTable method.
type TableResourcesClientGetTableResponse ¶ added in v0.3.0
type TableResourcesClientGetTableResponse struct {
TableGetResults
}
TableResourcesClientGetTableResponse contains the response from method TableResourcesClient.GetTable.
type TableResourcesClientGetTableThroughputOptions ¶ added in v0.3.0
type TableResourcesClientGetTableThroughputOptions struct { }
TableResourcesClientGetTableThroughputOptions contains the optional parameters for the TableResourcesClient.GetTableThroughput method.
type TableResourcesClientGetTableThroughputResponse ¶ added in v0.3.0
type TableResourcesClientGetTableThroughputResponse struct {
ThroughputSettingsGetResults
}
TableResourcesClientGetTableThroughputResponse contains the response from method TableResourcesClient.GetTableThroughput.
type TableResourcesClientListTablesOptions ¶ added in v0.3.0
type TableResourcesClientListTablesOptions struct { }
TableResourcesClientListTablesOptions contains the optional parameters for the TableResourcesClient.ListTables method.
type TableResourcesClientListTablesResponse ¶ added in v0.3.0
type TableResourcesClientListTablesResponse struct {
TableListResult
}
TableResourcesClientListTablesResponse contains the response from method TableResourcesClient.ListTables.
type TableResourcesClientMigrateTableToAutoscaleResponse ¶ added in v0.3.0
type TableResourcesClientMigrateTableToAutoscaleResponse struct {
ThroughputSettingsGetResults
}
TableResourcesClientMigrateTableToAutoscaleResponse contains the response from method TableResourcesClient.MigrateTableToAutoscale.
type TableResourcesClientMigrateTableToManualThroughputResponse ¶ added in v0.3.0
type TableResourcesClientMigrateTableToManualThroughputResponse struct {
ThroughputSettingsGetResults
}
TableResourcesClientMigrateTableToManualThroughputResponse contains the response from method TableResourcesClient.MigrateTableToManualThroughput.
type TableResourcesClientUpdateTableThroughputResponse ¶ added in v0.3.0
type TableResourcesClientUpdateTableThroughputResponse struct {
ThroughputSettingsGetResults
}
TableResourcesClientUpdateTableThroughputResponse contains the response from method TableResourcesClient.UpdateTableThroughput.
type ThroughputPolicyResource ¶
type ThroughputPolicyResource struct { // Represents the percentage by which throughput can increase every time throughput policy kicks in. IncrementPercent *int32 `json:"incrementPercent,omitempty"` // Determines whether the ThroughputPolicy is active or not IsEnabled *bool `json:"isEnabled,omitempty"` }
ThroughputPolicyResource - Cosmos DB resource throughput policy
type ThroughputSettingsGetProperties ¶
type ThroughputSettingsGetProperties struct {
Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"`
}
ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput
type ThroughputSettingsGetPropertiesResource ¶
type ThroughputSettingsGetPropertiesResource struct { // Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. Throughput *int32 `json:"throughput,omitempty"` // READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. Etag *string `json:"_etag,omitempty" azure:"ro"` // READ-ONLY; The minimum throughput of the resource MinimumThroughput *string `json:"minimumThroughput,omitempty" azure:"ro"` // READ-ONLY; The throughput replace is pending OfferReplacePending *string `json:"offerReplacePending,omitempty" azure:"ro"` // READ-ONLY; A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty" azure:"ro"` // READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. Ts *float32 `json:"_ts,omitempty" azure:"ro"` }
type ThroughputSettingsGetResults ¶
type ThroughputSettingsGetResults struct { // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // The properties of an Azure Cosmos DB resource throughput Properties *ThroughputSettingsGetProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type ThroughputSettingsResource ¶
type ThroughputSettingsResource struct { // Cosmos DB resource for autoscale settings. Either throughput is required or autoscaleSettings is required, but not both. AutoscaleSettings *AutoscaleSettingsResource `json:"autoscaleSettings,omitempty"` // Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. Throughput *int32 `json:"throughput,omitempty"` // READ-ONLY; The minimum throughput of the resource MinimumThroughput *string `json:"minimumThroughput,omitempty" azure:"ro"` // READ-ONLY; The throughput replace is pending OfferReplacePending *string `json:"offerReplacePending,omitempty" azure:"ro"` }
ThroughputSettingsResource - Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both.
type ThroughputSettingsUpdateParameters ¶
type ThroughputSettingsUpdateParameters struct { // REQUIRED; Properties to update Azure Cosmos DB resource throughput. Properties *ThroughputSettingsUpdateProperties `json:"properties,omitempty"` // The location of the resource group to which the resource belongs. Location *string `json:"location,omitempty"` // 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 `json:"tags,omitempty"` // READ-ONLY; The unique resource identifier of the ARM resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the ARM resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of Azure resource. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type ThroughputSettingsUpdateProperties ¶
type ThroughputSettingsUpdateProperties struct { // REQUIRED; The standard JSON format of a resource throughput Resource *ThroughputSettingsResource `json:"resource,omitempty"` }
ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput.
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 UniqueKey ¶
type UniqueKey struct { // List of paths must be unique for each document in the Azure Cosmos DB service Paths []*string `json:"paths,omitempty"` }
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.
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 `json:"uniqueKeys,omitempty"` }
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.
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 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; Maximum value for this metric Limit *int64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The quota period used to summarize the usage values. QuotaPeriod *string `json:"quotaPeriod,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
Usage - The usage data for a usage request.
type UsagesResult ¶
type UsagesResult struct { // READ-ONLY; The list of usages for the database. A usage is a point in time metric Value []*Usage `json:"value,omitempty" azure:"ro"` }
UsagesResult - The response to a list usage request.
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 `json:"id,omitempty"` // Create firewall rule before the virtual network has vnet service endpoint enabled. IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"` }
VirtualNetworkRule - Virtual Network ACL Rule object
Source Files ¶
- build.go
- zz_generated_cassandraclusters_client.go
- zz_generated_cassandradatacenters_client.go
- zz_generated_cassandraresources_client.go
- zz_generated_collection_client.go
- zz_generated_collectionpartition_client.go
- zz_generated_collectionpartitionregion_client.go
- zz_generated_collectionregion_client.go
- zz_generated_constants.go
- zz_generated_database_client.go
- zz_generated_databaseaccountregion_client.go
- zz_generated_databaseaccounts_client.go
- zz_generated_gremlinresources_client.go
- zz_generated_locations_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_mongodbresources_client.go
- zz_generated_notebookworkspaces_client.go
- zz_generated_operations_client.go
- zz_generated_partitionkeyrangeid_client.go
- zz_generated_partitionkeyrangeidregion_client.go
- zz_generated_percentile_client.go
- zz_generated_percentilesourcetarget_client.go
- zz_generated_percentiletarget_client.go
- zz_generated_polymorphic_helpers.go
- zz_generated_privateendpointconnections_client.go
- zz_generated_privatelinkresources_client.go
- zz_generated_response_types.go
- zz_generated_restorabledatabaseaccounts_client.go
- zz_generated_restorablemongodbcollections_client.go
- zz_generated_restorablemongodbdatabases_client.go
- zz_generated_restorablemongodbresources_client.go
- zz_generated_restorablesqlcontainers_client.go
- zz_generated_restorablesqldatabases_client.go
- zz_generated_restorablesqlresources_client.go
- zz_generated_sqlresources_client.go
- zz_generated_tableresources_client.go
- zz_generated_time_rfc3339.go