cosmosdb

package
v12.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cosmosdb implements the Azure ARM Cosmosdb service API version 2015-04-08.

Azure Cosmos DB Database Service Resource Provider REST API

Deprecated: Please instead use github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Cosmosdb
	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 ConsistencyPolicy

type ConsistencyPolicy struct {
	DefaultConsistencyLevel DefaultConsistencyLevel `json:"defaultConsistencyLevel,omitempty"`
	MaxStalenessPrefix      *int64                  `json:"maxStalenessPrefix,omitempty"`
	MaxIntervalInSeconds    *int32                  `json:"maxIntervalInSeconds,omitempty"`
}

ConsistencyPolicy is the consistency policy for the Cosmos DB database account.

type DatabaseAccount

type DatabaseAccount struct {
	autorest.Response          `json:"-"`
	ID                         *string             `json:"id,omitempty"`
	Name                       *string             `json:"name,omitempty"`
	Type                       *string             `json:"type,omitempty"`
	Location                   *string             `json:"location,omitempty"`
	Tags                       *map[string]*string `json:"tags,omitempty"`
	Kind                       DatabaseAccountKind `json:"kind,omitempty"`
	*DatabaseAccountProperties `json:"properties,omitempty"`
}

DatabaseAccount is an Azure Cosmos DB database account.

type DatabaseAccountConnectionString

type DatabaseAccountConnectionString struct {
	ConnectionString *string `json:"connectionString,omitempty"`
	Description      *string `json:"description,omitempty"`
}

DatabaseAccountConnectionString is connection string for the Cosmos DB account

type DatabaseAccountCreateUpdateParameters

type DatabaseAccountCreateUpdateParameters struct {
	ID                                     *string             `json:"id,omitempty"`
	Name                                   *string             `json:"name,omitempty"`
	Type                                   *string             `json:"type,omitempty"`
	Location                               *string             `json:"location,omitempty"`
	Tags                                   *map[string]*string `json:"tags,omitempty"`
	Kind                                   DatabaseAccountKind `json:"kind,omitempty"`
	*DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"`
}

DatabaseAccountCreateUpdateParameters is parameters to create and update Cosmos DB database accounts.

type DatabaseAccountCreateUpdateProperties

type DatabaseAccountCreateUpdateProperties struct {
	ConsistencyPolicy        *ConsistencyPolicy `json:"consistencyPolicy,omitempty"`
	Locations                *[]Location        `json:"locations,omitempty"`
	DatabaseAccountOfferType *string            `json:"databaseAccountOfferType,omitempty"`
	IPRangeFilter            *string            `json:"ipRangeFilter,omitempty"`
	EnableAutomaticFailover  *bool              `json:"enableAutomaticFailover,omitempty"`
}

DatabaseAccountCreateUpdateProperties is 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 specifies the global document db state for database account kind.
	GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB"
	// MongoDB specifies the mongo db state for database account kind.
	MongoDB DatabaseAccountKind = "MongoDB"
	// Parse specifies the parse state for database account kind.
	Parse DatabaseAccountKind = "Parse"
)

type DatabaseAccountListConnectionStringsResult

type DatabaseAccountListConnectionStringsResult struct {
	autorest.Response `json:"-"`
	ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"`
}

DatabaseAccountListConnectionStringsResult is the connection strings for the given database account.

type DatabaseAccountListKeysResult

type DatabaseAccountListKeysResult struct {
	autorest.Response                      `json:"-"`
	PrimaryMasterKey                       *string `json:"primaryMasterKey,omitempty"`
	SecondaryMasterKey                     *string `json:"secondaryMasterKey,omitempty"`
	*DatabaseAccountListReadOnlyKeysResult `json:"properties,omitempty"`
}

DatabaseAccountListKeysResult is the access keys for the given database account.

type DatabaseAccountListReadOnlyKeysResult

type DatabaseAccountListReadOnlyKeysResult struct {
	autorest.Response          `json:"-"`
	PrimaryReadonlyMasterKey   *string `json:"primaryReadonlyMasterKey,omitempty"`
	SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"`
}

DatabaseAccountListReadOnlyKeysResult is 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 specifies the standard state for database account offer type.
	Standard DatabaseAccountOfferType = "Standard"
)

type DatabaseAccountPatchParameters

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

DatabaseAccountPatchParameters is parameters for patching Azure Cosmos DB database account properties.

type DatabaseAccountProperties

type DatabaseAccountProperties struct {
	ProvisioningState        *string                  `json:"provisioningState,omitempty"`
	DocumentEndpoint         *string                  `json:"documentEndpoint,omitempty"`
	DatabaseAccountOfferType DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"`
	IPRangeFilter            *string                  `json:"ipRangeFilter,omitempty"`
	EnableAutomaticFailover  *bool                    `json:"enableAutomaticFailover,omitempty"`
	ConsistencyPolicy        *ConsistencyPolicy       `json:"consistencyPolicy,omitempty"`
	WriteLocations           *[]Location              `json:"writeLocations,omitempty"`
	ReadLocations            *[]Location              `json:"readLocations,omitempty"`
	FailoverPolicies         *[]FailoverPolicy        `json:"failoverPolicies,omitempty"`
}

DatabaseAccountProperties is properties for the database account.

type DatabaseAccountRegenerateKeyParameters

type DatabaseAccountRegenerateKeyParameters struct {
	KeyKind KeyKind `json:"keyKind,omitempty"`
}

DatabaseAccountRegenerateKeyParameters is parameters to regenerate the keys within the database account.

type DatabaseAccountsClient

type DatabaseAccountsClient struct {
	ManagementClient
}

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

func NewDatabaseAccountsClient

func NewDatabaseAccountsClient(subscriptionID string) DatabaseAccountsClient

NewDatabaseAccountsClient creates an instance of the DatabaseAccountsClient client.

func NewDatabaseAccountsClientWithBaseURI

func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountsClient

NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client.

func (DatabaseAccountsClient) CheckNameExists

func (client DatabaseAccountsClient) CheckNameExists(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(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(resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters, cancel <-chan struct{}) (<-chan DatabaseAccount, <-chan error)

CreateOrUpdate creates or updates an Azure Cosmos DB database account. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

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(resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters, cancel <-chan struct{}) (*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) (*http.Response, 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(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error)

Delete deletes an existing Azure Cosmos DB database account. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

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

func (DatabaseAccountsClient) DeletePreparer

func (client DatabaseAccountsClient) DeletePreparer(resourceGroupName string, accountName string, cancel <-chan struct{}) (*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) (*http.Response, 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(resourceGroupName string, accountName string, failoverParameters FailoverPolicies, cancel <-chan struct{}) (<-chan autorest.Response, <-chan 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. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

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(resourceGroupName string, accountName string, failoverParameters FailoverPolicies, cancel <-chan struct{}) (*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) (*http.Response, 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(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(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

func (client DatabaseAccountsClient) List() (result DatabaseAccountsListResult, err error)

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

func (DatabaseAccountsClient) ListByResourceGroup

func (client DatabaseAccountsClient) ListByResourceGroup(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(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(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(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(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(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) ListPreparer

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

ListPreparer prepares the List request.

func (DatabaseAccountsClient) ListReadOnlyKeys

func (client DatabaseAccountsClient) ListReadOnlyKeys(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(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) Patch

func (client DatabaseAccountsClient) Patch(resourceGroupName string, accountName string, updateParameters DatabaseAccountPatchParameters, cancel <-chan struct{}) (<-chan DatabaseAccount, <-chan error)

Patch patches the properties of an existing Azure Cosmos DB database account. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

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(resourceGroupName string, accountName string, updateParameters DatabaseAccountPatchParameters, cancel <-chan struct{}) (*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) (*http.Response, 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(resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error)

RegenerateKey regenerates an access key for the specified Azure Cosmos DB database account. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

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(resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters, cancel <-chan struct{}) (*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) (*http.Response, error)

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

type DatabaseAccountsListResult

type DatabaseAccountsListResult struct {
	autorest.Response `json:"-"`
	Value             *[]DatabaseAccount `json:"value,omitempty"`
}

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

type DefaultConsistencyLevel

type DefaultConsistencyLevel string

DefaultConsistencyLevel enumerates the values for default consistency level.

const (
	// BoundedStaleness specifies the bounded staleness state for default consistency level.
	BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness"
	// ConsistentPrefix specifies the consistent prefix state for default consistency level.
	ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix"
	// Eventual specifies the eventual state for default consistency level.
	Eventual DefaultConsistencyLevel = "Eventual"
	// Session specifies the session state for default consistency level.
	Session DefaultConsistencyLevel = "Session"
	// Strong specifies the strong state for default consistency level.
	Strong DefaultConsistencyLevel = "Strong"
)

type FailoverPolicies

type FailoverPolicies struct {
	FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"`
}

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

type FailoverPolicy

type FailoverPolicy struct {
	ID               *string `json:"id,omitempty"`
	LocationName     *string `json:"locationName,omitempty"`
	FailoverPriority *int32  `json:"failoverPriority,omitempty"`
}

FailoverPolicy is 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 specifies the primary state for key kind.
	Primary KeyKind = "primary"
	// PrimaryReadonly specifies the primary readonly state for key kind.
	PrimaryReadonly KeyKind = "primaryReadonly"
	// Secondary specifies the secondary state for key kind.
	Secondary KeyKind = "secondary"
	// SecondaryReadonly specifies the secondary readonly state for key kind.
	SecondaryReadonly KeyKind = "secondaryReadonly"
)

type Location

type Location struct {
	ID                *string `json:"id,omitempty"`
	LocationName      *string `json:"locationName,omitempty"`
	DocumentEndpoint  *string `json:"documentEndpoint,omitempty"`
	ProvisioningState *string `json:"provisioningState,omitempty"`
	FailoverPriority  *int32  `json:"failoverPriority,omitempty"`
}

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

type ManagementClient

type ManagementClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

ManagementClient is the base client for Cosmosdb.

func New

func New(subscriptionID string) ManagementClient

New creates an instance of the ManagementClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient

NewWithBaseURI creates an instance of the ManagementClient client.

type Operation

type Operation struct {
	Name    *string           `json:"name,omitempty"`
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation is REST API operation

type OperationDisplay

type OperationDisplay struct {
	Provider    *string `json:"Provider,omitempty"`
	Resource    *string `json:"Resource,omitempty"`
	Operation   *string `json:"Operation,omitempty"`
	Description *string `json:"Description,omitempty"`
}

OperationDisplay is the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	Value             *[]Operation `json:"value,omitempty"`
	NextLink          *string      `json:"nextLink,omitempty"`
}

OperationListResult is 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) OperationListResultPreparer

func (client OperationListResult) OperationListResultPreparer() (*http.Request, error)

OperationListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type OperationsClient

type OperationsClient struct {
	ManagementClient
}

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

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List() (result OperationListResult, err error)

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

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error)

ListComplete gets all elements from the list without paging.

func (OperationsClient) ListNextResults

func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer() (*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 Resource

type Resource struct {
	ID       *string             `json:"id,omitempty"`
	Name     *string             `json:"name,omitempty"`
	Type     *string             `json:"type,omitempty"`
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
}

Resource is a database account resource.

Jump to

Keyboard shortcuts

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