documentdb

package
v12.4.0-beta+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package documentdb implements the Azure ARM Documentdb service API version 2015-04-08.

Azure Cosmos DB Database Service Resource Provider REST API

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Documentdb
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
	Filter         string
	Filter1        string
	DatabaseRid    string
	CollectionRid  string
	Region         string
}

BaseClient is the base client for Documentdb.

func New

func New(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type CollectionClient

type CollectionClient struct {
	BaseClient
}

CollectionClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewCollectionClient

func NewCollectionClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) CollectionClient

NewCollectionClient creates an instance of the CollectionClient client.

func NewCollectionClientWithBaseURI

func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) CollectionClient

NewCollectionClientWithBaseURI creates an instance of the CollectionClient client.

func (CollectionClient) ListMetricDefinitions

func (client CollectionClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result MetricDefinitionsListResult, err error)

ListMetricDefinitions retrieves metric defintions for the given collection.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (CollectionClient) ListMetricDefinitionsPreparer

func (client CollectionClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request.

func (CollectionClient) ListMetricDefinitionsResponder

func (client CollectionClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error)

ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always closes the http.Response Body.

func (CollectionClient) ListMetricDefinitionsSender

func (client CollectionClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error)

ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the http.Response Body if it receives an error.

func (CollectionClient) ListMetrics

func (client CollectionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string) (result MetricListResult, err error)

ListMetrics retrieves the metrics determined by the given filter for the given database account and collection.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (CollectionClient) ListMetricsPreparer

func (client CollectionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricsPreparer prepares the ListMetrics request.

func (CollectionClient) ListMetricsResponder

func (client CollectionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error)

ListMetricsResponder handles the response to the ListMetrics request. The method always closes the http.Response Body.

func (CollectionClient) ListMetricsSender

func (client CollectionClient) ListMetricsSender(req *http.Request) (*http.Response, error)

ListMetricsSender sends the ListMetrics request. The method will close the http.Response Body if it receives an error.

func (CollectionClient) ListUsages

func (client CollectionClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string) (result UsagesResult, err error)

ListUsages retrieves the usages (most recent storage data) for the given collection.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (CollectionClient) ListUsagesPreparer

func (client CollectionClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListUsagesPreparer prepares the ListUsages request.

func (CollectionClient) ListUsagesResponder

func (client CollectionClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error)

ListUsagesResponder handles the response to the ListUsages request. The method always closes the http.Response Body.

func (CollectionClient) ListUsagesSender

func (client CollectionClient) ListUsagesSender(req *http.Request) (*http.Response, error)

ListUsagesSender sends the ListUsages request. The method will close the http.Response Body if it receives an error.

type CollectionRegionClient

type CollectionRegionClient struct {
	BaseClient
}

CollectionRegionClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewCollectionRegionClient

func NewCollectionRegionClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) CollectionRegionClient

NewCollectionRegionClient creates an instance of the CollectionRegionClient client.

func NewCollectionRegionClientWithBaseURI

func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) CollectionRegionClient

NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client.

func (CollectionRegionClient) ListMetrics

func (client CollectionRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string) (result MetricListResult, err error)

ListMetrics retrieves the metrics determined by the given filter for the given database account, collection and region.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (CollectionRegionClient) ListMetricsPreparer

func (client CollectionRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricsPreparer prepares the ListMetrics request.

func (CollectionRegionClient) ListMetricsResponder

func (client CollectionRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error)

ListMetricsResponder handles the response to the ListMetrics request. The method always closes the http.Response Body.

func (CollectionRegionClient) ListMetricsSender

func (client CollectionRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error)

ListMetricsSender sends the ListMetrics request. The method will close the http.Response Body if it receives an error.

type ConsistencyPolicy

type ConsistencyPolicy struct {
	// DefaultConsistencyLevel - The default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix'
	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
	// MaxStalenessPrefix - 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"`
	// MaxIntervalInSeconds - 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"`
}

ConsistencyPolicy the consistency policy for the Cosmos DB database account.

type DatabaseAccount

type DatabaseAccount struct {
	autorest.Response `json:"-"`
	// ID - The unique resource identifier of the database account.
	ID *string `json:"id,omitempty"`
	// Name - The name of the database account.
	Name *string `json:"name,omitempty"`
	// Type - The type of Azure resource.
	Type *string `json:"type,omitempty"`
	// Location - The location of the resource group to which the resource belongs.
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'
	Kind                       DatabaseAccountKind `json:"kind,omitempty"`
	*DatabaseAccountProperties `json:"properties,omitempty"`
}

DatabaseAccount an Azure Cosmos DB database account.

func (*DatabaseAccount) UnmarshalJSON

func (da *DatabaseAccount) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for DatabaseAccount struct.

type DatabaseAccountConnectionString

type DatabaseAccountConnectionString struct {
	// ConnectionString - Value of the connection string
	ConnectionString *string `json:"connectionString,omitempty"`
	// Description - Description of the connection string
	Description *string `json:"description,omitempty"`
}

DatabaseAccountConnectionString connection string for the Cosmos DB account

type DatabaseAccountCreateUpdateParameters

type DatabaseAccountCreateUpdateParameters struct {
	// ID - The unique resource identifier of the database account.
	ID *string `json:"id,omitempty"`
	// Name - The name of the database account.
	Name *string `json:"name,omitempty"`
	// Type - The type of Azure resource.
	Type *string `json:"type,omitempty"`
	// Location - The location of the resource group to which the resource belongs.
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
	// Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'
	Kind                                   DatabaseAccountKind `json:"kind,omitempty"`
	*DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
}

DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts.

func (*DatabaseAccountCreateUpdateParameters) UnmarshalJSON

func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct.

type DatabaseAccountCreateUpdateProperties

type DatabaseAccountCreateUpdateProperties struct {
	// ConsistencyPolicy - The consistency policy for the Cosmos DB account.
	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
	// Locations - An array that contains the georeplication locations enabled for the Cosmos DB account.
	Locations                *[]Location `json:"locations,omitempty"`
	DatabaseAccountOfferType *string     `json:"databaseAccountOfferType,omitempty"`
	// IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
	IPRangeFilter *string `json:"ipRangeFilter,omitempty"`
	// EnableAutomaticFailover - 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"`
}

DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts.

type DatabaseAccountKind

type DatabaseAccountKind string

DatabaseAccountKind enumerates the values for database account kind.

const (
	// GlobalDocumentDB ...
	GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB"
	// MongoDB ...
	MongoDB DatabaseAccountKind = "MongoDB"
	// Parse ...
	Parse DatabaseAccountKind = "Parse"
)

type DatabaseAccountListConnectionStringsResult

type DatabaseAccountListConnectionStringsResult struct {
	autorest.Response `json:"-"`
	// ConnectionStrings - 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 {
	autorest.Response `json:"-"`
	// PrimaryMasterKey - Base 64 encoded value of the primary read-write key.
	PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"`
	// SecondaryMasterKey - Base 64 encoded value of the secondary read-write key.
	SecondaryMasterKey                     *string `json:"secondaryMasterKey,omitempty"`
	*DatabaseAccountListReadOnlyKeysResult `json:"properties,omitempty"`
}

DatabaseAccountListKeysResult the access keys for the given database account.

func (*DatabaseAccountListKeysResult) UnmarshalJSON

func (dalkr *DatabaseAccountListKeysResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for DatabaseAccountListKeysResult struct.

type DatabaseAccountListReadOnlyKeysResult

type DatabaseAccountListReadOnlyKeysResult struct {
	autorest.Response `json:"-"`
	// PrimaryReadonlyMasterKey - Base 64 encoded value of the primary read-only key.
	PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"`
	// SecondaryReadonlyMasterKey - Base 64 encoded value of the secondary read-only key.
	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
}

DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account.

type DatabaseAccountOfferType

type DatabaseAccountOfferType string

DatabaseAccountOfferType enumerates the values for database account offer type.

const (
	// Standard ...
	Standard DatabaseAccountOfferType = "Standard"
)

type DatabaseAccountPatchParameters

type DatabaseAccountPatchParameters struct {
	Tags *map[string]*string `json:"tags,omitempty"`
}

DatabaseAccountPatchParameters parameters for patching Azure Cosmos DB database account properties.

type DatabaseAccountProperties

type DatabaseAccountProperties struct {
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// DocumentEndpoint - The connection endpoint for the Cosmos DB database account.
	DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
	// DatabaseAccountOfferType - The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: 'Standard'
	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
	// IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
	IPRangeFilter *string `json:"ipRangeFilter,omitempty"`
	// EnableAutomaticFailover - 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"`
	// ConsistencyPolicy - The consistency policy for the Cosmos DB database account.
	ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
	// WriteLocations - An array that contains the write location for the Cosmos DB account.
	WriteLocations *[]Location `json:"writeLocations,omitempty"`
	// ReadLocations - An array that contains of the read locations enabled for the Cosmos DB account.
	ReadLocations *[]Location `json:"readLocations,omitempty"`
	// FailoverPolicies - An array that contains the regions ordered by their failover priorities.
	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
}

DatabaseAccountProperties properties for the database account.

type DatabaseAccountRegenerateKeyParameters

type DatabaseAccountRegenerateKeyParameters struct {
	// KeyKind - The access key to regenerate. Possible values include: 'Primary', 'Secondary', 'PrimaryReadonly', 'SecondaryReadonly'
	KeyKind KeyKind `json:"keyKind,omitempty"`
}

DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account.

type DatabaseAccountRegionClient

type DatabaseAccountRegionClient struct {
	BaseClient
}

DatabaseAccountRegionClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewDatabaseAccountRegionClient

func NewDatabaseAccountRegionClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseAccountRegionClient

NewDatabaseAccountRegionClient creates an instance of the DatabaseAccountRegionClient client.

func NewDatabaseAccountRegionClientWithBaseURI

func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseAccountRegionClient

NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client.

func (DatabaseAccountRegionClient) ListMetrics

func (client DatabaseAccountRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string) (result MetricListResult, err error)

ListMetrics retrieves the metrics determined by the given filter for the given database account and region.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountRegionClient) ListMetricsPreparer

func (client DatabaseAccountRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricsPreparer prepares the ListMetrics request.

func (DatabaseAccountRegionClient) ListMetricsResponder

func (client DatabaseAccountRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error)

ListMetricsResponder handles the response to the ListMetrics request. The method always closes the http.Response Body.

func (DatabaseAccountRegionClient) ListMetricsSender

func (client DatabaseAccountRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error)

ListMetricsSender sends the ListMetrics request. The method will close the http.Response Body if it receives an error.

type DatabaseAccountsClient

type DatabaseAccountsClient struct {
	BaseClient
}

DatabaseAccountsClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewDatabaseAccountsClient

func NewDatabaseAccountsClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseAccountsClient

NewDatabaseAccountsClient creates an instance of the DatabaseAccountsClient client.

func NewDatabaseAccountsClientWithBaseURI

func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseAccountsClient

NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client.

func (DatabaseAccountsClient) CheckNameExists

func (client DatabaseAccountsClient) CheckNameExists(ctx context.Context, accountName string) (result autorest.Response, err 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.

accountName is cosmos DB database account name.

func (DatabaseAccountsClient) CheckNameExistsPreparer

func (client DatabaseAccountsClient) CheckNameExistsPreparer(ctx context.Context, accountName string) (*http.Request, error)

CheckNameExistsPreparer prepares the CheckNameExists request.

func (DatabaseAccountsClient) CheckNameExistsResponder

func (client DatabaseAccountsClient) CheckNameExistsResponder(resp *http.Response) (result autorest.Response, err error)

CheckNameExistsResponder handles the response to the CheckNameExists request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) CheckNameExistsSender

func (client DatabaseAccountsClient) CheckNameExistsSender(req *http.Request) (*http.Response, error)

CheckNameExistsSender sends the CheckNameExists request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) CreateOrUpdate

func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters) (result DatabaseAccountsCreateOrUpdateFuture, err error)

CreateOrUpdate creates or updates an Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name. createUpdateParameters is the parameters to provide for the current database account.

func (DatabaseAccountsClient) CreateOrUpdatePreparer

func (client DatabaseAccountsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (DatabaseAccountsClient) CreateOrUpdateResponder

func (client DatabaseAccountsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseAccount, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) CreateOrUpdateSender

func (client DatabaseAccountsClient) CreateOrUpdateSender(req *http.Request) (future DatabaseAccountsCreateOrUpdateFuture, err error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) Delete

func (client DatabaseAccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountsDeleteFuture, err error)

Delete deletes an existing Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) DeletePreparer

func (client DatabaseAccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (DatabaseAccountsClient) DeleteResponder

func (client DatabaseAccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) DeleteSender

func (client DatabaseAccountsClient) DeleteSender(req *http.Request) (future DatabaseAccountsDeleteFuture, err error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) FailoverPriorityChange

func (client DatabaseAccountsClient) FailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies) (result DatabaseAccountsFailoverPriorityChangeFuture, err error)

FailoverPriorityChange 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.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name. failoverParameters is the new failover policies for the database account.

func (DatabaseAccountsClient) FailoverPriorityChangePreparer

func (client DatabaseAccountsClient) FailoverPriorityChangePreparer(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies) (*http.Request, error)

FailoverPriorityChangePreparer prepares the FailoverPriorityChange request.

func (DatabaseAccountsClient) FailoverPriorityChangeResponder

func (client DatabaseAccountsClient) FailoverPriorityChangeResponder(resp *http.Response) (result autorest.Response, err error)

FailoverPriorityChangeResponder handles the response to the FailoverPriorityChange request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) FailoverPriorityChangeSender

func (client DatabaseAccountsClient) FailoverPriorityChangeSender(req *http.Request) (future DatabaseAccountsFailoverPriorityChangeFuture, err error)

FailoverPriorityChangeSender sends the FailoverPriorityChange request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) Get

func (client DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccount, err error)

Get retrieves the properties of an existing Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) GetPreparer

func (client DatabaseAccountsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (DatabaseAccountsClient) GetResponder

func (client DatabaseAccountsClient) GetResponder(resp *http.Response) (result DatabaseAccount, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) GetSender

func (client DatabaseAccountsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) List

List lists all the Azure Cosmos DB database accounts available under the subscription.

func (DatabaseAccountsClient) ListByResourceGroup

func (client DatabaseAccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DatabaseAccountsListResult, err error)

ListByResourceGroup lists all the Azure Cosmos DB database accounts available under the given resource group.

resourceGroupName is name of an Azure resource group.

func (DatabaseAccountsClient) ListByResourceGroupPreparer

func (client DatabaseAccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (DatabaseAccountsClient) ListByResourceGroupResponder

func (client DatabaseAccountsClient) ListByResourceGroupResponder(resp *http.Response) (result DatabaseAccountsListResult, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListByResourceGroupSender

func (client DatabaseAccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListConnectionStrings

func (client DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListConnectionStringsResult, err error)

ListConnectionStrings lists the connection strings for the specified Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListConnectionStringsPreparer

func (client DatabaseAccountsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListConnectionStringsPreparer prepares the ListConnectionStrings request.

func (DatabaseAccountsClient) ListConnectionStringsResponder

func (client DatabaseAccountsClient) ListConnectionStringsResponder(resp *http.Response) (result DatabaseAccountListConnectionStringsResult, err error)

ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListConnectionStringsSender

func (client DatabaseAccountsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error)

ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListKeys

func (client DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListKeysResult, err error)

ListKeys lists the access keys for the specified Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListKeysPreparer

func (client DatabaseAccountsClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListKeysPreparer prepares the ListKeys request.

func (DatabaseAccountsClient) ListKeysResponder

func (client DatabaseAccountsClient) ListKeysResponder(resp *http.Response) (result DatabaseAccountListKeysResult, err error)

ListKeysResponder handles the response to the ListKeys request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListKeysSender

func (client DatabaseAccountsClient) ListKeysSender(req *http.Request) (*http.Response, error)

ListKeysSender sends the ListKeys request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListMetricDefinitions

func (client DatabaseAccountsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result MetricDefinitionsListResult, err error)

ListMetricDefinitions retrieves metric defintions for the given database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListMetricDefinitionsPreparer

func (client DatabaseAccountsClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request.

func (DatabaseAccountsClient) ListMetricDefinitionsResponder

func (client DatabaseAccountsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error)

ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListMetricDefinitionsSender

func (client DatabaseAccountsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error)

ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListMetrics

func (client DatabaseAccountsClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string) (result MetricListResult, err error)

ListMetrics retrieves the metrics determined by the given filter for the given database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListMetricsPreparer

func (client DatabaseAccountsClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricsPreparer prepares the ListMetrics request.

func (DatabaseAccountsClient) ListMetricsResponder

func (client DatabaseAccountsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error)

ListMetricsResponder handles the response to the ListMetrics request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListMetricsSender

func (client DatabaseAccountsClient) ListMetricsSender(req *http.Request) (*http.Response, error)

ListMetricsSender sends the ListMetrics request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListPreparer

func (client DatabaseAccountsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (DatabaseAccountsClient) ListReadOnlyKeys

func (client DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListReadOnlyKeysResult, err error)

ListReadOnlyKeys lists the read-only access keys for the specified Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListReadOnlyKeysPreparer

func (client DatabaseAccountsClient) ListReadOnlyKeysPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListReadOnlyKeysPreparer prepares the ListReadOnlyKeys request.

func (DatabaseAccountsClient) ListReadOnlyKeysResponder

func (client DatabaseAccountsClient) ListReadOnlyKeysResponder(resp *http.Response) (result DatabaseAccountListReadOnlyKeysResult, err error)

ListReadOnlyKeysResponder handles the response to the ListReadOnlyKeys request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListReadOnlyKeysSender

func (client DatabaseAccountsClient) ListReadOnlyKeysSender(req *http.Request) (*http.Response, error)

ListReadOnlyKeysSender sends the ListReadOnlyKeys request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListResponder

func (client DatabaseAccountsClient) ListResponder(resp *http.Response) (result DatabaseAccountsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListSender

func (client DatabaseAccountsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) ListUsages

func (client DatabaseAccountsClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string) (result UsagesResult, err error)

ListUsages retrieves the usages (most recent data) for the given database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseAccountsClient) ListUsagesPreparer

func (client DatabaseAccountsClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListUsagesPreparer prepares the ListUsages request.

func (DatabaseAccountsClient) ListUsagesResponder

func (client DatabaseAccountsClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error)

ListUsagesResponder handles the response to the ListUsages request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) ListUsagesSender

func (client DatabaseAccountsClient) ListUsagesSender(req *http.Request) (*http.Response, error)

ListUsagesSender sends the ListUsages request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) Patch

func (client DatabaseAccountsClient) Patch(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountPatchParameters) (result DatabaseAccountsPatchFuture, err error)

Patch patches the properties of an existing Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name. updateParameters is the tags parameter to patch for the current database account.

func (DatabaseAccountsClient) PatchPreparer

func (client DatabaseAccountsClient) PatchPreparer(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountPatchParameters) (*http.Request, error)

PatchPreparer prepares the Patch request.

func (DatabaseAccountsClient) PatchResponder

func (client DatabaseAccountsClient) PatchResponder(resp *http.Response) (result DatabaseAccount, err error)

PatchResponder handles the response to the Patch request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) PatchSender

func (client DatabaseAccountsClient) PatchSender(req *http.Request) (future DatabaseAccountsPatchFuture, err error)

PatchSender sends the Patch request. The method will close the http.Response Body if it receives an error.

func (DatabaseAccountsClient) RegenerateKey

func (client DatabaseAccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters) (result DatabaseAccountsRegenerateKeyFuture, err error)

RegenerateKey regenerates an access key for the specified Azure Cosmos DB database account.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name. keyToRegenerate is the name of the key to regenerate.

func (DatabaseAccountsClient) RegenerateKeyPreparer

func (client DatabaseAccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters) (*http.Request, error)

RegenerateKeyPreparer prepares the RegenerateKey request.

func (DatabaseAccountsClient) RegenerateKeyResponder

func (client DatabaseAccountsClient) RegenerateKeyResponder(resp *http.Response) (result autorest.Response, err error)

RegenerateKeyResponder handles the response to the RegenerateKey request. The method always closes the http.Response Body.

func (DatabaseAccountsClient) RegenerateKeySender

func (client DatabaseAccountsClient) RegenerateKeySender(req *http.Request) (future DatabaseAccountsRegenerateKeyFuture, err error)

RegenerateKeySender sends the RegenerateKey request. The method will close the http.Response Body if it receives an error.

type DatabaseAccountsCreateOrUpdateFuture

type DatabaseAccountsCreateOrUpdateFuture struct {
	azure.Future
	// contains filtered or unexported fields
}

DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (DatabaseAccountsCreateOrUpdateFuture) Result

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DatabaseAccountsDeleteFuture

type DatabaseAccountsDeleteFuture struct {
	azure.Future
	// contains filtered or unexported fields
}

DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (DatabaseAccountsDeleteFuture) Result

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DatabaseAccountsFailoverPriorityChangeFuture

type DatabaseAccountsFailoverPriorityChangeFuture struct {
	azure.Future
	// contains filtered or unexported fields
}

DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (DatabaseAccountsFailoverPriorityChangeFuture) Result

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DatabaseAccountsListResult

type DatabaseAccountsListResult struct {
	autorest.Response `json:"-"`
	// Value - List of database account and their properties.
	Value *[]DatabaseAccount `json:"value,omitempty"`
}

DatabaseAccountsListResult the List operation response, that contains the database accounts and their properties.

type DatabaseAccountsPatchFuture

type DatabaseAccountsPatchFuture struct {
	azure.Future
	// contains filtered or unexported fields
}

DatabaseAccountsPatchFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (DatabaseAccountsPatchFuture) Result

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DatabaseAccountsRegenerateKeyFuture

type DatabaseAccountsRegenerateKeyFuture struct {
	azure.Future
	// contains filtered or unexported fields
}

DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (DatabaseAccountsRegenerateKeyFuture) Result

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DatabaseClient

type DatabaseClient struct {
	BaseClient
}

DatabaseClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewDatabaseClient

func NewDatabaseClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseClient

NewDatabaseClient creates an instance of the DatabaseClient client.

func NewDatabaseClientWithBaseURI

func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) DatabaseClient

NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client.

func (DatabaseClient) ListMetricDefinitions

func (client DatabaseClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result MetricDefinitionsListResult, err error)

ListMetricDefinitions retrieves metric defintions for the given database.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseClient) ListMetricDefinitionsPreparer

func (client DatabaseClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request.

func (DatabaseClient) ListMetricDefinitionsResponder

func (client DatabaseClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error)

ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always closes the http.Response Body.

func (DatabaseClient) ListMetricDefinitionsSender

func (client DatabaseClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error)

ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the http.Response Body if it receives an error.

func (DatabaseClient) ListMetrics

func (client DatabaseClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string) (result MetricListResult, err error)

ListMetrics retrieves the metrics determined by the given filter for the given database account and database.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseClient) ListMetricsPreparer

func (client DatabaseClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListMetricsPreparer prepares the ListMetrics request.

func (DatabaseClient) ListMetricsResponder

func (client DatabaseClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error)

ListMetricsResponder handles the response to the ListMetrics request. The method always closes the http.Response Body.

func (DatabaseClient) ListMetricsSender

func (client DatabaseClient) ListMetricsSender(req *http.Request) (*http.Response, error)

ListMetricsSender sends the ListMetrics request. The method will close the http.Response Body if it receives an error.

func (DatabaseClient) ListUsages

func (client DatabaseClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string) (result UsagesResult, err error)

ListUsages retrieves the usages (most recent data) for the given database.

resourceGroupName is name of an Azure resource group. accountName is cosmos DB database account name.

func (DatabaseClient) ListUsagesPreparer

func (client DatabaseClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error)

ListUsagesPreparer prepares the ListUsages request.

func (DatabaseClient) ListUsagesResponder

func (client DatabaseClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error)

ListUsagesResponder handles the response to the ListUsages request. The method always closes the http.Response Body.

func (DatabaseClient) ListUsagesSender

func (client DatabaseClient) ListUsagesSender(req *http.Request) (*http.Response, error)

ListUsagesSender sends the ListUsages request. The method will close the http.Response Body if it receives an error.

type DefaultConsistencyLevel

type DefaultConsistencyLevel string

DefaultConsistencyLevel enumerates the values for default consistency level.

const (
	// BoundedStaleness ...
	BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness"
	// ConsistentPrefix ...
	ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix"
	// Eventual ...
	Eventual DefaultConsistencyLevel = "Eventual"
	// Session ...
	Session DefaultConsistencyLevel = "Session"
	// Strong ...
	Strong DefaultConsistencyLevel = "Strong"
)

type FailoverPolicies

type FailoverPolicies struct {
	// FailoverPolicies - List of failover policies.
	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
}

FailoverPolicies the list of new failover policies for the failover priority change.

type FailoverPolicy

type FailoverPolicy struct {
	// ID - The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.
	ID *string `json:"id,omitempty"`
	// LocationName - The name of the region in which the database account exists.
	LocationName *string `json:"locationName,omitempty"`
	// FailoverPriority - 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"`
}

FailoverPolicy the failover policy for a given region of a database account.

type KeyKind

type KeyKind string

KeyKind enumerates the values for key kind.

const (
	// Primary ...
	Primary KeyKind = "primary"
	// PrimaryReadonly ...
	PrimaryReadonly KeyKind = "primaryReadonly"
	// Secondary ...
	Secondary KeyKind = "secondary"
	// SecondaryReadonly ...
	SecondaryReadonly KeyKind = "secondaryReadonly"
)

type Location

type Location struct {
	// ID - The unique identifier of the region within the database account. Example: <accountName>-<locationName>.
	ID *string `json:"id,omitempty"`
	// LocationName - The name of the region.
	LocationName *string `json:"locationName,omitempty"`
	// DocumentEndpoint - The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/
	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// FailoverPriority - 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"`
}

Location a region in which the Azure Cosmos DB database account is deployed.

type Metric

type Metric struct {
	// StartTime - The start time for the metric (ISO-8601 format).
	StartTime *date.Time `json:"startTime,omitempty"`
	// EndTime - The end time for the metric (ISO-8601 format).
	EndTime *date.Time `json:"endTime,omitempty"`
	// TimeGrain - The time grain to be used to summarize the metric values.
	TimeGrain *string `json:"timeGrain,omitempty"`
	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
	Unit UnitType `json:"unit,omitempty"`
	// Name - The name information for the metric.
	Name *MetricName `json:"name,omitempty"`
	// MetricValues - The metric values for the specified time window and timestep.
	MetricValues *[]MetricValue `json:"metricValues,omitempty"`
}

Metric metric data

type MetricAvailability

type MetricAvailability struct {
	// TimeGrain - The time grain to be used to summarize the metric values.
	TimeGrain *string `json:"timeGrain,omitempty"`
	// Retention - The retention for the metric values.
	Retention *string `json:"retention,omitempty"`
}

MetricAvailability the availability of the metric.

type MetricDefinition

type MetricDefinition struct {
	// MetricAvailabilities - The list of metric availabilities for the account.
	MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
	// PrimaryAggregationType - The primary aggregation type of the metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', 'Maximum', 'Last'
	PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"`
	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
	Unit UnitType `json:"unit,omitempty"`
	// ResourceURI - The resource uri of the database.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// Name - The name information for the metric.
	Name *MetricName `json:"name,omitempty"`
}

MetricDefinition the definition of a metric.

type MetricDefinitionsListResult

type MetricDefinitionsListResult struct {
	autorest.Response `json:"-"`
	// Value - The list of metric definitions for the account.
	Value *[]MetricDefinition `json:"value,omitempty"`
}

MetricDefinitionsListResult the response to a list metric definitions request.

type MetricListResult

type MetricListResult struct {
	autorest.Response `json:"-"`
	// Value - The list of metrics for the account.
	Value *[]Metric `json:"value,omitempty"`
}

MetricListResult the response to a list metrics request.

type MetricName

type MetricName struct {
	// Value - The name of the metric.
	Value *string `json:"value,omitempty"`
	// LocalizedValue - The friendly name of the metric.
	LocalizedValue *string `json:"localizedValue,omitempty"`
}

MetricName a metric name.

type MetricValue

type MetricValue struct {
	// Count - The number of values for the metric.
	Count *float64 `json:"_count,omitempty"`
	// Average - The average value of the metric.
	Average *float64 `json:"average,omitempty"`
	// Maximum - The max value of the metric.
	Maximum *float64 `json:"maximum,omitempty"`
	// Minimum - The min value of the metric.
	Minimum *float64 `json:"minimum,omitempty"`
	// Timestamp - The metric timestamp (ISO-8601 format).
	Timestamp *date.Time `json:"timestamp,omitempty"`
	// Total - The total value of the metric.
	Total *float64 `json:"total,omitempty"`
}

MetricValue represents metrics values.

type Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation REST API operation

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.ResourceProvider
	Provider *string `json:"Provider,omitempty"`
	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
	Resource *string `json:"Resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"Operation,omitempty"`
	// Description - Description of operation
	Description *string `json:"Description,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of operations supported by the Resource Provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,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.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the azure Cosmos DB Database Service Resource Provider REST API

func NewOperationsClient

func NewOperationsClient(subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, filter string, filter1 string, databaseRid string, collectionRid string, region string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available Cosmos DB Resource Provider operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type PrimaryAggregationType

type PrimaryAggregationType string

PrimaryAggregationType enumerates the values for primary aggregation type.

const (
	// Average ...
	Average PrimaryAggregationType = "Average"
	// Last ...
	Last PrimaryAggregationType = "Last"
	// Maximum ...
	Maximum PrimaryAggregationType = "Maximum"
	// Minimimum ...
	Minimimum PrimaryAggregationType = "Minimimum"
	// None ...
	None PrimaryAggregationType = "None"
	// Total ...
	Total PrimaryAggregationType = "Total"
)

type Resource

type Resource struct {
	// ID - The unique resource identifier of the database account.
	ID *string `json:"id,omitempty"`
	// Name - The name of the database account.
	Name *string `json:"name,omitempty"`
	// Type - The type of Azure resource.
	Type *string `json:"type,omitempty"`
	// Location - The location of the resource group to which the resource belongs.
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
}

Resource a database account resource.

type UnitType

type UnitType string

UnitType enumerates the values for unit type.

const (
	// Bytes ...
	Bytes UnitType = "Bytes"
	// BytesPerSecond ...
	BytesPerSecond UnitType = "BytesPerSecond"
	// Count ...
	Count UnitType = "Count"
	// CountPerSecond ...
	CountPerSecond UnitType = "CountPerSecond"
	// Milliseconds ...
	Milliseconds UnitType = "Milliseconds"
	// Percent ...
	Percent UnitType = "Percent"
	// Seconds ...
	Seconds UnitType = "Seconds"
)

type Usage

type Usage struct {
	// Unit - The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
	Unit UnitType `json:"unit,omitempty"`
	// Name - The name information for the metric.
	Name *MetricName `json:"name,omitempty"`
	// QuotaPeriod - The quota period used to summarize the usage values.
	QuotaPeriod *string `json:"quotaPeriod,omitempty"`
	// Limit - Maximum value for this metric
	Limit *int32 `json:"limit,omitempty"`
	// CurrentValue - Current value for this metric
	CurrentValue *int32 `json:"currentValue,omitempty"`
}

Usage the usage data for a usage request.

type UsagesResult

type UsagesResult struct {
	autorest.Response `json:"-"`
	// Value - The list of usages for the database. A usage is a point in time metric
	Value *[]Usage `json:"value,omitempty"`
}

UsagesResult the response to a list usage request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL