armcosmos

package module
v1.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 16 Imported by: 5

README

Azure Cosmos DB Module for Go

PkgGoDev

The armcosmos module provides operations for working with Azure Cosmos DB.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Cosmos DB module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Cosmos DB. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Cosmos DB modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armcosmos.NewDatabaseClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armcosmos.NewDatabaseClient(<subscription ID>, cred, &options)

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Cosmos DB label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

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.

const (
	APITypeCassandra APIType = "Cassandra"
	APITypeGremlin   APIType = "Gremlin"
	APITypeGremlinV2 APIType = "GremlinV2"
	APITypeMongoDB   APIType = "MongoDB"
	APITypeSQL       APIType = "Sql"
	APITypeTable     APIType = "Table"
)

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 {
	// 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"`

	// 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'. 'Ldap' is in preview.

const (
	AuthenticationMethodCassandra AuthenticationMethod = "Cassandra"
	AuthenticationMethodLdap      AuthenticationMethod = "Ldap"
	AuthenticationMethodNone      AuthenticationMethod = "None"
)

func PossibleAuthenticationMethodValues

func PossibleAuthenticationMethodValues() []AuthenticationMethod

PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type.

type AuthenticationMethodLdapProperties added in v0.4.0

type AuthenticationMethodLdapProperties struct {
	// Distinguished name of the object to start the recursive search of users from.
	SearchBaseDistinguishedName *string `json:"searchBaseDistinguishedName,omitempty"`

	// Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login.
	SearchFilterTemplate *string        `json:"searchFilterTemplate,omitempty"`
	ServerCertificates   []*Certificate `json:"serverCertificates,omitempty"`

	// Hostname of the LDAP server.
	ServerHostname *string `json:"serverHostname,omitempty"`

	// Port of the LDAP server.
	ServerPort *int32 `json:"serverPort,omitempty"`

	// Distinguished name of the look up user account, who can look up user details on authentication.
	ServiceUserDistinguishedName *string `json:"serviceUserDistinguishedName,omitempty"`

	// Password of the look up user.
	ServiceUserPassword *string `json:"serviceUserPassword,omitempty"`
}

AuthenticationMethodLdapProperties - Ldap authentication method properties. This feature is in preview.

func (AuthenticationMethodLdapProperties) MarshalJSON added in v0.4.0

func (a AuthenticationMethodLdapProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AuthenticationMethodLdapProperties.

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 AzureBlobDataTransferDataSourceSink added in v0.4.0

type AzureBlobDataTransferDataSourceSink struct {
	// REQUIRED
	Component *DataTransferComponent `json:"component,omitempty"`

	// REQUIRED
	ContainerName *string `json:"containerName,omitempty"`
	EndpointURL   *string `json:"endpointUrl,omitempty"`
}

AzureBlobDataTransferDataSourceSink - An Azure Blob Storage data source/sink

func (*AzureBlobDataTransferDataSourceSink) GetDataTransferDataSourceSink added in v0.4.0

func (a *AzureBlobDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink

GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type AzureBlobDataTransferDataSourceSink.

func (AzureBlobDataTransferDataSourceSink) MarshalJSON added in v0.4.0

func (a AzureBlobDataTransferDataSourceSink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBlobDataTransferDataSourceSink.

func (*AzureBlobDataTransferDataSourceSink) UnmarshalJSON added in v0.4.0

func (a *AzureBlobDataTransferDataSourceSink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobDataTransferDataSourceSink.

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 BackupResource

type BackupResource struct {
	Properties *BackupResourceProperties `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"`
}

BackupResource - A restorable backup of a Cassandra cluster.

type BackupResourceProperties

type BackupResourceProperties struct {
	// The time this backup was taken, formatted like 2021-01-21T17:35:21
	Timestamp *time.Time `json:"timestamp,omitempty"`
}

func (BackupResourceProperties) MarshalJSON

func (b BackupResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupResourceProperties.

func (*BackupResourceProperties) UnmarshalJSON

func (b *BackupResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceProperties.

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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

BeginDelete - Deletes a managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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

BeginInvokeCommand - Invoke a command like nodetool for cassandra maintenance If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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("00000000-0000-0000-0000-000000000000", 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{
			Arguments: map[string]*string{
				"status": to.Ptr(""),
			},
			Command: to.Ptr("nodetool"),
			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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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("00000000-0000-0000-0000-000000000000", 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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

Get - Get the properties of a managed Cassandra cluster. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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) GetBackup

func (client *CassandraClustersClient) GetBackup(ctx context.Context, resourceGroupName string, clusterName string, backupID string, options *CassandraClustersClientGetBackupOptions) (CassandraClustersClientGetBackupResponse, error)

GetBackup - Get the properties of an individual backup of this cluster that is available to restore. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - Managed Cassandra cluster name. backupID - Id of a restorable backup of a Cassandra cluster. options - CassandraClustersClientGetBackupOptions contains the optional parameters for the CassandraClustersClient.GetBackup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBManagedCassandraBackup.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.GetBackup(ctx,
		"cassandra-prod-rg",
		"cassandra-prod",
		"1611250348",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CassandraClustersClient) NewListBackupsPager added in v0.5.0

func (client *CassandraClustersClient) NewListBackupsPager(resourceGroupName string, clusterName string, options *CassandraClustersClientListBackupsOptions) *runtime.Pager[CassandraClustersClientListBackupsResponse]

NewListBackupsPager - List the backups of this cluster that are available to restore. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - Managed Cassandra cluster name. options - CassandraClustersClientListBackupsOptions contains the optional parameters for the CassandraClustersClient.ListBackups method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBManagedCassandraBackupsList.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)
	}
	pager := client.NewListBackupsPager("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:

func (*CassandraClustersClient) NewListByResourceGroupPager added in v0.5.0

NewListByResourceGroupPager - List all managed Cassandra clusters in this resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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

NewListBySubscriptionPager - List all managed Cassandra clusters in this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 CassandraClustersClientGetBackupOptions added in v0.4.0

type CassandraClustersClientGetBackupOptions struct {
}

CassandraClustersClientGetBackupOptions contains the optional parameters for the CassandraClustersClient.GetBackup method.

type CassandraClustersClientGetBackupResponse added in v0.4.0

type CassandraClustersClientGetBackupResponse struct {
	BackupResource
}

CassandraClustersClientGetBackupResponse contains the response from method CassandraClustersClient.GetBackup.

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 CassandraClustersClientListBackupsOptions added in v0.4.0

type CassandraClustersClientListBackupsOptions struct {
}

CassandraClustersClientListBackupsOptions contains the optional parameters for the CassandraClustersClient.ListBackups method.

type CassandraClustersClientListBackupsResponse added in v0.4.0

type CassandraClustersClientListBackupsResponse struct {
	ListBackups
}

CassandraClustersClientListBackupsResponse contains the response from method CassandraClustersClient.ListBackups.

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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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("subid", 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 CassandraDataTransferDataSourceSink added in v0.4.0

type CassandraDataTransferDataSourceSink struct {
	// REQUIRED
	Component *DataTransferComponent `json:"component,omitempty"`

	// REQUIRED
	KeyspaceName *string `json:"keyspaceName,omitempty"`

	// REQUIRED
	TableName *string `json:"tableName,omitempty"`
}

CassandraDataTransferDataSourceSink - A CosmosDB Cassandra API data source/sink

func (*CassandraDataTransferDataSourceSink) GetDataTransferDataSourceSink added in v0.4.0

func (c *CassandraDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink

GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type CassandraDataTransferDataSourceSink.

func (CassandraDataTransferDataSourceSink) MarshalJSON added in v0.4.0

func (c CassandraDataTransferDataSourceSink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CassandraDataTransferDataSourceSink.

func (*CassandraDataTransferDataSourceSink) UnmarshalJSON added in v0.4.0

func (c *CassandraDataTransferDataSourceSink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CassandraDataTransferDataSourceSink.

type CassandraKeyspaceCreateUpdateParameters

type CassandraKeyspaceCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB Cassandra keyspace.
	Properties *CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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 {
	// 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"`

	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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"),
							}},
					},
					AnalyticalStorageTTL: to.Ptr[int32](500),
					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) BeginCreateUpdateCassandraView

func (client *CassandraResourcesClient) BeginCreateUpdateCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, createUpdateCassandraViewParameters CassandraViewCreateUpdateParameters, options *CassandraResourcesClientBeginCreateUpdateCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientCreateUpdateCassandraViewResponse], error)

BeginCreateUpdateCassandraView - Create or update an Azure Cosmos DB Cassandra View If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. createUpdateCassandraViewParameters - The parameters to provide for the current Cassandra View. options - CassandraResourcesClientBeginCreateUpdateCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewCreateUpdate.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.BeginCreateUpdateCassandraView(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		armcosmos.CassandraViewCreateUpdateParameters{
			Tags: map[string]*string{},
			Properties: &armcosmos.CassandraViewCreateUpdateProperties{
				Options: &armcosmos.CreateUpdateOptions{},
				Resource: &armcosmos.CassandraViewResource{
					ID:             to.Ptr("viewname"),
					ViewDefinition: to.Ptr("SELECT columna, columnb, columnc FROM keyspacename.srctablename WHERE columna IS NOT NULL AND columnc IS NOT NULL PRIMARY (columnc, columna)"),
				},
			},
		},
		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

BeginDeleteCassandraKeyspace - Deletes an existing Azure Cosmos DB Cassandra keyspace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginDeleteCassandraView

func (client *CassandraResourcesClient) BeginDeleteCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginDeleteCassandraViewOptions) (*runtime.Poller[CassandraResourcesClientDeleteCassandraViewResponse], error)

BeginDeleteCassandraView - Deletes an existing Azure Cosmos DB Cassandra view. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. options - CassandraResourcesClientBeginDeleteCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewDelete.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.BeginDeleteCassandraView(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginMigrateCassandraViewToAutoscale

func (client *CassandraResourcesClient) BeginMigrateCassandraViewToAutoscale(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions) (*runtime.Poller[CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse], error)

BeginMigrateCassandraViewToAutoscale - Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. options - CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewMigrateToAutoscale.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.BeginMigrateCassandraViewToAutoscale(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		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) BeginMigrateCassandraViewToManualThroughput

BeginMigrateCassandraViewToManualThroughput - Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. options - CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewMigrateToManualThroughput.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.BeginMigrateCassandraViewToManualThroughput(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginUpdateCassandraViewThroughput

func (client *CassandraResourcesClient) BeginUpdateCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, updateThroughputParameters ThroughputSettingsUpdateParameters, options *CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions) (*runtime.Poller[CassandraResourcesClientUpdateCassandraViewThroughputResponse], error)

BeginUpdateCassandraViewThroughput - Update RUs per second of an Azure Cosmos DB Cassandra view If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. updateThroughputParameters - The RUs per second of the parameters to provide for the current Cassandra view. options - CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraViewThroughput method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewThroughputUpdate.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.BeginUpdateCassandraViewThroughput(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		armcosmos.ThroughputSettingsUpdateParameters{
			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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) GetCassandraView

func (client *CassandraResourcesClient) GetCassandraView(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewOptions) (CassandraResourcesClientGetCassandraViewResponse, error)

GetCassandraView - Gets the Cassandra view under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. options - CassandraResourcesClientGetCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraView method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewGet.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.GetCassandraView(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*CassandraResourcesClient) GetCassandraViewThroughput

func (client *CassandraResourcesClient) GetCassandraViewThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, viewName string, options *CassandraResourcesClientGetCassandraViewThroughputOptions) (CassandraResourcesClientGetCassandraViewThroughputResponse, error)

GetCassandraViewThroughput - Gets the RUs per second of the Cassandra view 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 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. viewName - Cosmos DB view name. options - CassandraResourcesClientGetCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraViewThroughput method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewThroughputGet.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.GetCassandraViewThroughput(ctx,
		"rg1",
		"ddb1",
		"keyspacename",
		"viewname",
		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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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:

func (*CassandraResourcesClient) NewListCassandraViewsPager added in v0.5.0

func (client *CassandraResourcesClient) NewListCassandraViewsPager(resourceGroupName string, accountName string, keyspaceName string, options *CassandraResourcesClientListCassandraViewsOptions) *runtime.Pager[CassandraResourcesClientListCassandraViewsResponse]

NewListCassandraViewsPager - Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. keyspaceName - Cosmos DB keyspace name. options - CassandraResourcesClientListCassandraViewsOptions contains the optional parameters for the CassandraResourcesClient.ListCassandraViews method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBCassandraViewList.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.NewListCassandraViewsPager("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 CassandraResourcesClientBeginCreateUpdateCassandraViewOptions added in v0.4.0

type CassandraResourcesClientBeginCreateUpdateCassandraViewOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CassandraResourcesClientBeginCreateUpdateCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginCreateUpdateCassandraView 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 CassandraResourcesClientBeginDeleteCassandraViewOptions added in v0.4.0

type CassandraResourcesClientBeginDeleteCassandraViewOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CassandraResourcesClientBeginDeleteCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.BeginDeleteCassandraView 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 CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions added in v0.4.0

type CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CassandraResourcesClientBeginMigrateCassandraViewToAutoscaleOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToAutoscale method.

type CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions added in v0.4.0

type CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CassandraResourcesClientBeginMigrateCassandraViewToManualThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginMigrateCassandraViewToManualThroughput 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 CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions added in v0.4.0

type CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CassandraResourcesClientBeginUpdateCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.BeginUpdateCassandraViewThroughput 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 CassandraResourcesClientCreateUpdateCassandraViewResponse added in v0.4.0

type CassandraResourcesClientCreateUpdateCassandraViewResponse struct {
	CassandraViewGetResults
}

CassandraResourcesClientCreateUpdateCassandraViewResponse contains the response from method CassandraResourcesClient.CreateUpdateCassandraView.

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 CassandraResourcesClientDeleteCassandraViewResponse added in v0.4.0

type CassandraResourcesClientDeleteCassandraViewResponse struct {
}

CassandraResourcesClientDeleteCassandraViewResponse contains the response from method CassandraResourcesClient.DeleteCassandraView.

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 CassandraResourcesClientGetCassandraViewOptions added in v0.4.0

type CassandraResourcesClientGetCassandraViewOptions struct {
}

CassandraResourcesClientGetCassandraViewOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraView method.

type CassandraResourcesClientGetCassandraViewResponse added in v0.4.0

type CassandraResourcesClientGetCassandraViewResponse struct {
	CassandraViewGetResults
}

CassandraResourcesClientGetCassandraViewResponse contains the response from method CassandraResourcesClient.GetCassandraView.

type CassandraResourcesClientGetCassandraViewThroughputOptions added in v0.4.0

type CassandraResourcesClientGetCassandraViewThroughputOptions struct {
}

CassandraResourcesClientGetCassandraViewThroughputOptions contains the optional parameters for the CassandraResourcesClient.GetCassandraViewThroughput method.

type CassandraResourcesClientGetCassandraViewThroughputResponse added in v0.4.0

type CassandraResourcesClientGetCassandraViewThroughputResponse struct {
	ThroughputSettingsGetResults
}

CassandraResourcesClientGetCassandraViewThroughputResponse contains the response from method CassandraResourcesClient.GetCassandraViewThroughput.

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 CassandraResourcesClientListCassandraViewsOptions added in v0.4.0

type CassandraResourcesClientListCassandraViewsOptions struct {
}

CassandraResourcesClientListCassandraViewsOptions contains the optional parameters for the CassandraResourcesClient.ListCassandraViews method.

type CassandraResourcesClientListCassandraViewsResponse added in v0.4.0

type CassandraResourcesClientListCassandraViewsResponse struct {
	CassandraViewListResult
}

CassandraResourcesClientListCassandraViewsResponse contains the response from method CassandraResourcesClient.ListCassandraViews.

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 CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse added in v0.4.0

type CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse struct {
	ThroughputSettingsGetResults
}

CassandraResourcesClientMigrateCassandraViewToAutoscaleResponse contains the response from method CassandraResourcesClient.MigrateCassandraViewToAutoscale.

type CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse added in v0.4.0

type CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse struct {
	ThroughputSettingsGetResults
}

CassandraResourcesClientMigrateCassandraViewToManualThroughputResponse contains the response from method CassandraResourcesClient.MigrateCassandraViewToManualThroughput.

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 CassandraResourcesClientUpdateCassandraViewThroughputResponse added in v0.4.0

type CassandraResourcesClientUpdateCassandraViewThroughputResponse struct {
	ThroughputSettingsGetResults
}

CassandraResourcesClientUpdateCassandraViewThroughputResponse contains the response from method CassandraResourcesClient.UpdateCassandraViewThroughput.

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"`

	// 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"`

	// 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 {
	// 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"`

	// 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 CassandraViewCreateUpdateParameters

type CassandraViewCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB Cassandra view.
	Properties *CassandraViewCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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"`
}

CassandraViewCreateUpdateParameters - Parameters to create and update Cosmos DB Cassandra view.

func (CassandraViewCreateUpdateParameters) MarshalJSON

func (c CassandraViewCreateUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CassandraViewCreateUpdateParameters.

type CassandraViewCreateUpdateProperties

type CassandraViewCreateUpdateProperties struct {
	// REQUIRED; The standard JSON format of a Cassandra view
	Resource *CassandraViewResource `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"`
}

CassandraViewCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra view.

type CassandraViewGetProperties

type CassandraViewGetProperties struct {
	Options  *CassandraViewGetPropertiesOptions  `json:"options,omitempty"`
	Resource *CassandraViewGetPropertiesResource `json:"resource,omitempty"`
}

CassandraViewGetProperties - The properties of an Azure Cosmos DB Cassandra view

type CassandraViewGetPropertiesOptions

type CassandraViewGetPropertiesOptions 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 CassandraViewGetPropertiesResource

type CassandraViewGetPropertiesResource struct {
	// REQUIRED; Name of the Cosmos DB Cassandra view
	ID *string `json:"id,omitempty"`

	// REQUIRED; View Definition of the Cosmos DB Cassandra view
	ViewDefinition *string `json:"viewDefinition,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 CassandraViewGetResults

type CassandraViewGetResults 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"`

	// The properties of an Azure Cosmos DB Cassandra view
	Properties *CassandraViewGetProperties `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"`
}

CassandraViewGetResults - An Azure Cosmos DB Cassandra view.

func (CassandraViewGetResults) MarshalJSON

func (c CassandraViewGetResults) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CassandraViewGetResults.

type CassandraViewListResult

type CassandraViewListResult struct {
	// READ-ONLY; List of Cassandra views and their properties.
	Value []*CassandraViewGetResults `json:"value,omitempty" azure:"ro"`
}

CassandraViewListResult - The List operation response, that contains the Cassandra views and their properties.

type CassandraViewResource

type CassandraViewResource struct {
	// REQUIRED; Name of the Cosmos DB Cassandra view
	ID *string `json:"id,omitempty"`

	// REQUIRED; View Definition of the Cosmos DB Cassandra view
	ViewDefinition *string `json:"viewDefinition,omitempty"`
}

CassandraViewResource - Cosmos DB Cassandra view resource object

type Certificate

type Certificate struct {
	// PEM formatted public key.
	Pem *string `json:"pem,omitempty"`
}

type ClientEncryptionIncludedPath added in v0.4.0

type ClientEncryptionIncludedPath struct {
	// REQUIRED; The identifier of the Client Encryption Key to be used to encrypt the path.
	ClientEncryptionKeyID *string `json:"clientEncryptionKeyId,omitempty"`

	// REQUIRED; The encryption algorithm which will be used. Eg - AEADAES256CBCHMAC_SHA256.
	EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty"`

	// REQUIRED; The type of encryption to be performed. Eg - Deterministic, Randomized.
	EncryptionType *string `json:"encryptionType,omitempty"`

	// REQUIRED; Path that needs to be encrypted.
	Path *string `json:"path,omitempty"`
}

ClientEncryptionIncludedPath - .

type ClientEncryptionKeyCreateUpdateParameters added in v0.4.0

type ClientEncryptionKeyCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update ClientEncryptionKey.
	Properties *ClientEncryptionKeyCreateUpdateProperties `json:"properties,omitempty"`
}

ClientEncryptionKeyCreateUpdateParameters - Parameters to create and update ClientEncryptionKey.

type ClientEncryptionKeyCreateUpdateProperties added in v0.4.0

type ClientEncryptionKeyCreateUpdateProperties struct {
	// REQUIRED; The standard JSON format of a ClientEncryptionKey
	Resource *ClientEncryptionKeyResource `json:"resource,omitempty"`
}

ClientEncryptionKeyCreateUpdateProperties - Properties to create and update ClientEncryptionKey.

type ClientEncryptionKeyGetProperties added in v0.4.0

type ClientEncryptionKeyGetProperties struct {
	Resource *ClientEncryptionKeyGetPropertiesResource `json:"resource,omitempty"`
}

ClientEncryptionKeyGetProperties - The properties of a ClientEncryptionKey resource

type ClientEncryptionKeyGetPropertiesResource added in v0.4.0

type ClientEncryptionKeyGetPropertiesResource struct {
	// Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.
	EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty"`

	// Name of the ClientEncryptionKey
	ID *string `json:"id,omitempty"`

	// Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.
	KeyWrapMetadata *KeyWrapMetadata `json:"keyWrapMetadata,omitempty"`

	// Wrapped (encrypted) form of the key represented as a byte array.
	WrappedDataEncryptionKey []byte `json:"wrappedDataEncryptionKey,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 (ClientEncryptionKeyGetPropertiesResource) MarshalJSON added in v0.4.0

MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyGetPropertiesResource.

func (*ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON added in v0.4.0

func (c *ClientEncryptionKeyGetPropertiesResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyGetPropertiesResource.

type ClientEncryptionKeyGetResults added in v0.4.0

type ClientEncryptionKeyGetResults struct {
	// The properties of a ClientEncryptionKey
	Properties *ClientEncryptionKeyGetProperties `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"`
}

ClientEncryptionKeyGetResults - Client Encryption Key.

type ClientEncryptionKeyResource added in v0.4.0

type ClientEncryptionKeyResource struct {
	// Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data.
	EncryptionAlgorithm *string `json:"encryptionAlgorithm,omitempty"`

	// Name of the ClientEncryptionKey
	ID *string `json:"id,omitempty"`

	// Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key.
	KeyWrapMetadata *KeyWrapMetadata `json:"keyWrapMetadata,omitempty"`

	// Wrapped (encrypted) form of the key represented as a byte array.
	WrappedDataEncryptionKey []byte `json:"wrappedDataEncryptionKey,omitempty"`
}

ClientEncryptionKeyResource - Cosmos DB client encryption key resource object.

func (ClientEncryptionKeyResource) MarshalJSON added in v0.4.0

func (c ClientEncryptionKeyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClientEncryptionKeyResource.

func (*ClientEncryptionKeyResource) UnmarshalJSON added in v0.4.0

func (c *ClientEncryptionKeyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClientEncryptionKeyResource.

type ClientEncryptionKeysListResult added in v0.4.0

type ClientEncryptionKeysListResult struct {
	// READ-ONLY; List of client encryption keys and their properties.
	Value []*ClientEncryptionKeyGetResults `json:"value,omitempty" azure:"ro"`
}

ClientEncryptionKeysListResult - The List operation response, that contains the client encryption keys and their properties.

type ClientEncryptionPolicy added in v0.4.0

type ClientEncryptionPolicy struct {
	// REQUIRED; Paths of the item that need encryption along with path-specific settings.
	IncludedPaths []*ClientEncryptionIncludedPath `json:"includedPaths,omitempty"`

	// Version of the client encryption policy definition. Please note, user passed value is ignored. Default policy version is
	// 1.
	PolicyFormatVersion *int32 `json:"policyFormatVersion,omitempty"`
}

ClientEncryptionPolicy - Cosmos DB client encryption policy.

func (ClientEncryptionPolicy) MarshalJSON added in v0.4.0

func (c ClientEncryptionPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClientEncryptionPolicy.

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'. 'Ldap' is in preview.
	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.
	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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 at which that snapshot of these usage statistics were taken.
	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"`

	// Configuration values for continuous mode backup
	ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,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 ContinuousModeProperties added in v0.4.0

type ContinuousModeProperties struct {
	// Enum to indicate type of Continuos backup mode
	Tier *ContinuousTier `json:"tier,omitempty"`
}

ContinuousModeProperties - Configuration values for periodic mode backup

type ContinuousTier added in v0.4.0

type ContinuousTier string

ContinuousTier - Enum to indicate type of Continuous backup tier.

const (
	ContinuousTierContinuous30Days ContinuousTier = "Continuous30Days"
	ContinuousTierContinuous7Days  ContinuousTier = "Continuous7Days"
)

func PossibleContinuousTierValues added in v0.4.0

func PossibleContinuousTierValues() []ContinuousTier

PossibleContinuousTierValues returns the possible values for the ContinuousTier const type.

type CorsPolicy

type CorsPolicy struct {
	// REQUIRED; The origin domains that are permitted to make a request against the service via CORS.
	AllowedOrigins *string `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 CreateJobRequest added in v0.4.0

type CreateJobRequest struct {
	// REQUIRED; Data Transfer Create Job Properties
	Properties *DataTransferJobProperties `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"`
}

CreateJobRequest - Parameters to create Data Transfer Job

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 {
	// Ldap authentication method properties. This feature is in preview.
	AuthenticationMethodLdapProperties *AuthenticationMethodLdapProperties `json:"authenticationMethodLdapProperties,omitempty"`

	// If the data center has Availability Zone feature, 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 DataTransferComponent added in v0.4.0

type DataTransferComponent string
const (
	DataTransferComponentAzureBlobStorage  DataTransferComponent = "AzureBlobStorage"
	DataTransferComponentCosmosDBCassandra DataTransferComponent = "CosmosDBCassandra"
	DataTransferComponentCosmosDBSQL       DataTransferComponent = "CosmosDBSql"
)

func PossibleDataTransferComponentValues added in v0.4.0

func PossibleDataTransferComponentValues() []DataTransferComponent

PossibleDataTransferComponentValues returns the possible values for the DataTransferComponent const type.

type DataTransferDataSourceSink added in v0.4.0

type DataTransferDataSourceSink struct {
	// REQUIRED
	Component *DataTransferComponent `json:"component,omitempty"`
}

DataTransferDataSourceSink - Base class for all DataTransfer source/sink

func (*DataTransferDataSourceSink) GetDataTransferDataSourceSink added in v0.4.0

func (d *DataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink

GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type DataTransferDataSourceSink.

type DataTransferDataSourceSinkClassification added in v0.4.0

type DataTransferDataSourceSinkClassification interface {
	// GetDataTransferDataSourceSink returns the DataTransferDataSourceSink content of the underlying type.
	GetDataTransferDataSourceSink() *DataTransferDataSourceSink
}

DataTransferDataSourceSinkClassification provides polymorphic access to related types. Call the interface's GetDataTransferDataSourceSink() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureBlobDataTransferDataSourceSink, *CassandraDataTransferDataSourceSink, *DataTransferDataSourceSink, *SQLDataTransferDataSourceSink

type DataTransferJobFeedResults added in v0.4.0

type DataTransferJobFeedResults struct {
	// READ-ONLY; URL to get the next set of Data Transfer job list results if there are any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of Data Transfer jobs and their properties.
	Value []*DataTransferJobGetResults `json:"value,omitempty" azure:"ro"`
}

DataTransferJobFeedResults - The List operation response, that contains the Data Transfer jobs and their properties.

type DataTransferJobGetResults added in v0.4.0

type DataTransferJobGetResults struct {
	// The properties of a DataTransfer Job
	Properties *DataTransferJobProperties `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"`
}

DataTransferJobGetResults - A Cosmos DB Data Transfer Job

type DataTransferJobProperties added in v0.4.0

type DataTransferJobProperties struct {
	// REQUIRED; Destination DataStore details
	Destination DataTransferDataSourceSinkClassification `json:"destination,omitempty"`

	// REQUIRED; Source DataStore details
	Source DataTransferDataSourceSinkClassification `json:"source,omitempty"`

	// Worker count
	WorkerCount *int32 `json:"workerCount,omitempty"`

	// READ-ONLY; Error response for Faulted job
	Error *ErrorResponse `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; Job Name
	JobName *string `json:"jobName,omitempty" azure:"ro"`

	// READ-ONLY; Last Updated Time (ISO-8601 format).
	LastUpdatedUTCTime *time.Time `json:"lastUpdatedUtcTime,omitempty" azure:"ro"`

	// READ-ONLY; Processed Count.
	ProcessedCount *int64 `json:"processedCount,omitempty" azure:"ro"`

	// READ-ONLY; Job Status
	Status *string `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; Total Count.
	TotalCount *int64 `json:"totalCount,omitempty" azure:"ro"`
}

DataTransferJobProperties - The properties of a DataTransfer Job

func (DataTransferJobProperties) MarshalJSON added in v0.4.0

func (d DataTransferJobProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataTransferJobProperties.

func (*DataTransferJobProperties) UnmarshalJSON added in v0.4.0

func (d *DataTransferJobProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferJobProperties.

type DataTransferJobsClient added in v0.4.0

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

DataTransferJobsClient contains the methods for the DataTransferJobs group. Don't use this type directly, use NewDataTransferJobsClient() instead.

func NewDataTransferJobsClient added in v0.4.0

func NewDataTransferJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataTransferJobsClient, error)

NewDataTransferJobsClient creates a new instance of DataTransferJobsClient 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 (*DataTransferJobsClient) Cancel

func (client *DataTransferJobsClient) Cancel(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientCancelOptions) (DataTransferJobsClientCancelResponse, error)

Cancel - Cancels a Data Transfer Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. jobName - Name of the Data Transfer Job options - DataTransferJobsClientCancelOptions contains the optional parameters for the DataTransferJobsClient.Cancel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCancel.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.NewDataTransferJobsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Cancel(ctx,
		"rg1",
		"ddb1",
		"j1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataTransferJobsClient) Create added in v0.4.0

func (client *DataTransferJobsClient) Create(ctx context.Context, resourceGroupName string, accountName string, jobName string, jobCreateParameters CreateJobRequest, options *DataTransferJobsClientCreateOptions) (DataTransferJobsClientCreateResponse, error)

Create - Creates a Data Transfer Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. jobName - Name of the Data Transfer Job options - DataTransferJobsClientCreateOptions contains the optional parameters for the DataTransferJobsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobCreate.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.NewDataTransferJobsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"rg1",
		"ddb1",
		"j1",
		armcosmos.CreateJobRequest{
			Properties: &armcosmos.DataTransferJobProperties{
				Destination: &armcosmos.AzureBlobDataTransferDataSourceSink{
					Component:     to.Ptr(armcosmos.DataTransferComponentAzureBlobStorage),
					ContainerName: to.Ptr("blob_container"),
					EndpointURL:   to.Ptr("https://blob.windows.net"),
				},
				Source: &armcosmos.CassandraDataTransferDataSourceSink{
					Component:    to.Ptr(armcosmos.DataTransferComponentCosmosDBCassandra),
					KeyspaceName: to.Ptr("keyspace"),
					TableName:    to.Ptr("table"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataTransferJobsClient) Get added in v0.4.0

func (client *DataTransferJobsClient) Get(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientGetOptions) (DataTransferJobsClientGetResponse, error)

Get - Get a Data Transfer Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. jobName - Name of the Data Transfer Job options - DataTransferJobsClientGetOptions contains the optional parameters for the DataTransferJobsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobGet.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.NewDataTransferJobsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rg1",
		"ddb1",
		"j1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataTransferJobsClient) NewListByDatabaseAccountPager added in v0.5.0

NewListByDatabaseAccountPager - Get a list of Data Transfer jobs. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - DataTransferJobsClientListByDatabaseAccountOptions contains the optional parameters for the DataTransferJobsClient.ListByDatabaseAccount method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobFeed.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.NewDataTransferJobsClient("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:

func (*DataTransferJobsClient) Pause

func (client *DataTransferJobsClient) Pause(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientPauseOptions) (DataTransferJobsClientPauseResponse, error)

Pause - Pause a Data Transfer Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. jobName - Name of the Data Transfer Job options - DataTransferJobsClientPauseOptions contains the optional parameters for the DataTransferJobsClient.Pause method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobPause.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.NewDataTransferJobsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Pause(ctx,
		"rg1",
		"ddb1",
		"j1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataTransferJobsClient) Resume

func (client *DataTransferJobsClient) Resume(ctx context.Context, resourceGroupName string, accountName string, jobName string, options *DataTransferJobsClientResumeOptions) (DataTransferJobsClientResumeResponse, error)

Resume - Resumes a Data Transfer Job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. jobName - Name of the Data Transfer Job options - DataTransferJobsClientResumeOptions contains the optional parameters for the DataTransferJobsClient.Resume method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/data-transfer-service/CosmosDBDataTransferJobResume.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.NewDataTransferJobsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Resume(ctx,
		"rg1",
		"ddb1",
		"j1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type DataTransferJobsClientCancelOptions

type DataTransferJobsClientCancelOptions struct {
}

DataTransferJobsClientCancelOptions contains the optional parameters for the DataTransferJobsClient.Cancel method.

type DataTransferJobsClientCancelResponse

type DataTransferJobsClientCancelResponse struct {
	DataTransferJobGetResults
}

DataTransferJobsClientCancelResponse contains the response from method DataTransferJobsClient.Cancel.

type DataTransferJobsClientCreateOptions added in v0.4.0

type DataTransferJobsClientCreateOptions struct {
}

DataTransferJobsClientCreateOptions contains the optional parameters for the DataTransferJobsClient.Create method.

type DataTransferJobsClientCreateResponse added in v0.4.0

type DataTransferJobsClientCreateResponse struct {
	DataTransferJobGetResults
}

DataTransferJobsClientCreateResponse contains the response from method DataTransferJobsClient.Create.

type DataTransferJobsClientGetOptions added in v0.4.0

type DataTransferJobsClientGetOptions struct {
}

DataTransferJobsClientGetOptions contains the optional parameters for the DataTransferJobsClient.Get method.

type DataTransferJobsClientGetResponse added in v0.4.0

type DataTransferJobsClientGetResponse struct {
	DataTransferJobGetResults
}

DataTransferJobsClientGetResponse contains the response from method DataTransferJobsClient.Get.

type DataTransferJobsClientListByDatabaseAccountOptions added in v0.4.0

type DataTransferJobsClientListByDatabaseAccountOptions struct {
}

DataTransferJobsClientListByDatabaseAccountOptions contains the optional parameters for the DataTransferJobsClient.ListByDatabaseAccount method.

type DataTransferJobsClientListByDatabaseAccountResponse added in v0.4.0

type DataTransferJobsClientListByDatabaseAccountResponse struct {
	DataTransferJobFeedResults
}

DataTransferJobsClientListByDatabaseAccountResponse contains the response from method DataTransferJobsClient.ListByDatabaseAccount.

type DataTransferJobsClientPauseOptions

type DataTransferJobsClientPauseOptions struct {
}

DataTransferJobsClientPauseOptions contains the optional parameters for the DataTransferJobsClient.Pause method.

type DataTransferJobsClientPauseResponse

type DataTransferJobsClientPauseResponse struct {
	DataTransferJobGetResults
}

DataTransferJobsClientPauseResponse contains the response from method DataTransferJobsClient.Pause.

type DataTransferJobsClientResumeOptions

type DataTransferJobsClientResumeOptions struct {
}

DataTransferJobsClientResumeOptions contains the optional parameters for the DataTransferJobsClient.Resume method.

type DataTransferJobsClientResumeResponse

type DataTransferJobsClientResumeResponse struct {
	DataTransferJobGetResults
}

DataTransferJobsClientResumeResponse contains the response from method DataTransferJobsClient.Resume.

type DataTransferRegionalServiceResource

type DataTransferRegionalServiceResource struct {
	// READ-ONLY; The location name.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The regional service name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

DataTransferRegionalServiceResource - Resource for a regional service location.

type DataTransferServiceResource

type DataTransferServiceResource struct {
	// Properties for DataTransferServiceResource.
	Properties *DataTransferServiceResourceProperties `json:"properties,omitempty"`
}

DataTransferServiceResource - Describes the service response property.

type DataTransferServiceResourceProperties

type DataTransferServiceResourceProperties struct {
	// REQUIRED; ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// READ-ONLY; Time of the last state change (ISO-8601 format).
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; An array that contains all of the locations for the service.
	Locations []*DataTransferRegionalServiceResource `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

DataTransferServiceResourceProperties - Properties for DataTransferServiceResource.

func (*DataTransferServiceResourceProperties) GetServiceResourceProperties added in v0.4.0

func (d *DataTransferServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties

GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type DataTransferServiceResourceProperties.

func (DataTransferServiceResourceProperties) MarshalJSON

func (d DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataTransferServiceResourceProperties.

func (*DataTransferServiceResourceProperties) UnmarshalJSON

func (d *DataTransferServiceResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataTransferServiceResourceProperties.

type DataType

type DataType string

DataType - The datatype for which the indexing behavior is applied to.

const (
	DataTypeLineString   DataType = "LineString"
	DataTypeMultiPolygon DataType = "MultiPolygon"
	DataTypeNumber       DataType = "Number"
	DataTypePoint        DataType = "Point"
	DataTypePolygon      DataType = "Polygon"
	DataTypeString       DataType = "String"
)

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"`

	// The Object representing the different Diagnostic log settings for the Cosmos DB Account.
	DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,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"`

	// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account
	EnableMaterializedViews *bool `json:"enableMaterializedViews,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"`

	// The Object representing the different Diagnostic log settings for the Cosmos DB Account.
	DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,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"`

	// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account
	EnableMaterializedViews *bool `json:"enableMaterializedViews,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 2022-02-15-preview 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/preview/2022-02-15-preview/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"`

	// The Object representing the different Diagnostic log settings for the Cosmos DB Account.
	DiagnosticLogSettings *DiagnosticLogSettings `json:"diagnosticLogSettings,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"`

	// Flag to indicate whether to enable MaterializedViews on the Cosmos DB account
	EnableMaterializedViews *bool `json:"enableMaterializedViews,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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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{
			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"),
			Tags:     map[string]*string{},
			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),
				EnableMaterializedViews:  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

BeginDelete - Deletes an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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.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),
				},
				DefaultIdentity: to.Ptr("FirstPartyIdentity"),
				DiagnosticLogSettings: &armcosmos.DiagnosticLogSettings{
					EnableFullTextQuery: to.Ptr(armcosmos.EnableFullTextQueryTrue),
				},
				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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

NewListMetricDefinitionsPager - Retrieves metric definitions for the given database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 DiagnosticLogSettings

type DiagnosticLogSettings struct {
	// Describe the level of detail with which queries are to be logged.
	EnableFullTextQuery *EnableFullTextQuery `json:"enableFullTextQuery,omitempty"`
}

DiagnosticLogSettings - Indicates what diagnostic log settings are to be enabled.

type EnableFullTextQuery

type EnableFullTextQuery string

EnableFullTextQuery - Describe the level of detail with which queries are to be logged.

const (
	EnableFullTextQueryNone  EnableFullTextQuery = "None"
	EnableFullTextQueryTrue  EnableFullTextQuery = "True"
	EnableFullTextQueryFalse EnableFullTextQuery = "False"
)

func PossibleEnableFullTextQueryValues

func PossibleEnableFullTextQueryValues() []EnableFullTextQuery

PossibleEnableFullTextQueryValues returns the possible values for the EnableFullTextQuery 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 GraphAPIComputeRegionalServiceResource

type GraphAPIComputeRegionalServiceResource struct {
	// READ-ONLY; The regional endpoint for GraphAPICompute.
	GraphAPIComputeEndpoint *string `json:"graphApiComputeEndpoint,omitempty" azure:"ro"`

	// READ-ONLY; The location name.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The regional service name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

GraphAPIComputeRegionalServiceResource - Resource for a regional service location.

type GraphAPIComputeServiceResource

type GraphAPIComputeServiceResource struct {
	// Properties for GraphAPIComputeServiceResource.
	Properties *GraphAPIComputeServiceResourceProperties `json:"properties,omitempty"`
}

GraphAPIComputeServiceResource - Describes the service response property for GraphAPICompute.

type GraphAPIComputeServiceResourceProperties

type GraphAPIComputeServiceResourceProperties struct {
	// REQUIRED; ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// GraphAPICompute endpoint for the service.
	GraphAPIComputeEndpoint *string `json:"graphApiComputeEndpoint,omitempty"`

	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// READ-ONLY; Time of the last state change (ISO-8601 format).
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; An array that contains all of the locations for the service.
	Locations []*GraphAPIComputeRegionalServiceResource `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

GraphAPIComputeServiceResourceProperties - Properties for GraphAPIComputeServiceResource.

func (*GraphAPIComputeServiceResourceProperties) GetServiceResourceProperties added in v0.4.0

func (g *GraphAPIComputeServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties

GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type GraphAPIComputeServiceResourceProperties.

func (GraphAPIComputeServiceResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type GraphAPIComputeServiceResourceProperties.

func (*GraphAPIComputeServiceResourceProperties) UnmarshalJSON

func (g *GraphAPIComputeServiceResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GraphAPIComputeServiceResourceProperties.

type GraphResource

type GraphResource struct {
	// REQUIRED; Name of the Cosmos DB Graph
	ID *string `json:"id,omitempty"`
}

GraphResource - Cosmos DB Graph resource object

type GraphResourceCreateUpdateParameters

type GraphResourceCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB Graph resource.
	Properties *GraphResourceCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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"`
}

GraphResourceCreateUpdateParameters - Parameters to create and update Cosmos DB Graph resource.

func (GraphResourceCreateUpdateParameters) MarshalJSON

func (g GraphResourceCreateUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GraphResourceCreateUpdateParameters.

type GraphResourceCreateUpdateProperties

type GraphResourceCreateUpdateProperties struct {
	// REQUIRED; The standard JSON format of a Graph resource
	Resource *GraphResource `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"`
}

GraphResourceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Graph resource.

type GraphResourceGetProperties

type GraphResourceGetProperties struct {
	Options  *GraphResourceGetPropertiesOptions  `json:"options,omitempty"`
	Resource *GraphResourceGetPropertiesResource `json:"resource,omitempty"`
}

GraphResourceGetProperties - The properties of an Azure Cosmos DB SQL database

type GraphResourceGetPropertiesOptions

type GraphResourceGetPropertiesOptions 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 GraphResourceGetPropertiesResource

type GraphResourceGetPropertiesResource struct {
	// REQUIRED; Name of the Cosmos DB Graph
	ID *string `json:"id,omitempty"`
}

type GraphResourceGetResults

type GraphResourceGetResults 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"`

	// The properties of an Azure Cosmos DB Graph resource.
	Properties *GraphResourceGetProperties `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"`
}

GraphResourceGetResults - An Azure Cosmos DB Graph resource.

func (GraphResourceGetResults) MarshalJSON

func (g GraphResourceGetResults) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GraphResourceGetResults.

type GraphResourcesClient

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

GraphResourcesClient contains the methods for the GraphResources group. Don't use this type directly, use NewGraphResourcesClient() instead.

func NewGraphResourcesClient

func NewGraphResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphResourcesClient, error)

NewGraphResourcesClient creates a new instance of GraphResourcesClient 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 (*GraphResourcesClient) BeginCreateUpdateGraph

func (client *GraphResourcesClient) BeginCreateUpdateGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, createUpdateGraphParameters GraphResourceCreateUpdateParameters, options *GraphResourcesClientBeginCreateUpdateGraphOptions) (*runtime.Poller[GraphResourcesClientCreateUpdateGraphResponse], error)

BeginCreateUpdateGraph - Create or update an Azure Cosmos DB Graph. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. graphName - Cosmos DB graph resource name. createUpdateGraphParameters - The parameters to provide for the current graph. options - GraphResourcesClientBeginCreateUpdateGraphOptions contains the optional parameters for the GraphResourcesClient.BeginCreateUpdateGraph method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBGraphResourceCreateUpdate.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.NewGraphResourcesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateUpdateGraph(ctx,
		"rg1",
		"ddb1",
		"graphName",
		armcosmos.GraphResourceCreateUpdateParameters{
			Location: to.Ptr("West US"),
			Tags:     map[string]*string{},
			Properties: &armcosmos.GraphResourceCreateUpdateProperties{
				Options: &armcosmos.CreateUpdateOptions{},
				Resource: &armcosmos.GraphResource{
					ID: to.Ptr("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 (*GraphResourcesClient) BeginDeleteGraphResource

func (client *GraphResourcesClient) BeginDeleteGraphResource(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientBeginDeleteGraphResourceOptions) (*runtime.Poller[GraphResourcesClientDeleteGraphResourceResponse], error)

BeginDeleteGraphResource - Deletes an existing Azure Cosmos DB Graph Resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. graphName - Cosmos DB graph resource name. options - GraphResourcesClientBeginDeleteGraphResourceOptions contains the optional parameters for the GraphResourcesClient.BeginDeleteGraphResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBGraphResourceDelete.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.NewGraphResourcesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteGraphResource(ctx,
		"rg1",
		"ddb1",
		"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 (*GraphResourcesClient) GetGraph

func (client *GraphResourcesClient) GetGraph(ctx context.Context, resourceGroupName string, accountName string, graphName string, options *GraphResourcesClientGetGraphOptions) (GraphResourcesClientGetGraphResponse, error)

GetGraph - Gets the Graph resource 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 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. graphName - Cosmos DB graph resource name. options - GraphResourcesClientGetGraphOptions contains the optional parameters for the GraphResourcesClient.GetGraph method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBGraphResourceGet.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.NewGraphResourcesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetGraph(ctx,
		"rg1",
		"ddb1",
		"graphName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*GraphResourcesClient) NewListGraphsPager added in v0.5.0

func (client *GraphResourcesClient) NewListGraphsPager(resourceGroupName string, accountName string, options *GraphResourcesClientListGraphsOptions) *runtime.Pager[GraphResourcesClientListGraphsResponse]

NewListGraphsPager - Lists the graphs under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - GraphResourcesClientListGraphsOptions contains the optional parameters for the GraphResourcesClient.ListGraphs method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBGraphResourceList.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.NewGraphResourcesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListGraphsPager("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 GraphResourcesClientBeginCreateUpdateGraphOptions added in v0.4.0

type GraphResourcesClientBeginCreateUpdateGraphOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GraphResourcesClientBeginCreateUpdateGraphOptions contains the optional parameters for the GraphResourcesClient.BeginCreateUpdateGraph method.

type GraphResourcesClientBeginDeleteGraphResourceOptions added in v0.4.0

type GraphResourcesClientBeginDeleteGraphResourceOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GraphResourcesClientBeginDeleteGraphResourceOptions contains the optional parameters for the GraphResourcesClient.BeginDeleteGraphResource method.

type GraphResourcesClientCreateUpdateGraphResponse added in v0.4.0

type GraphResourcesClientCreateUpdateGraphResponse struct {
	GraphResourceGetResults
}

GraphResourcesClientCreateUpdateGraphResponse contains the response from method GraphResourcesClient.CreateUpdateGraph.

type GraphResourcesClientDeleteGraphResourceResponse added in v0.4.0

type GraphResourcesClientDeleteGraphResourceResponse struct {
}

GraphResourcesClientDeleteGraphResourceResponse contains the response from method GraphResourcesClient.DeleteGraphResource.

type GraphResourcesClientGetGraphOptions added in v0.4.0

type GraphResourcesClientGetGraphOptions struct {
}

GraphResourcesClientGetGraphOptions contains the optional parameters for the GraphResourcesClient.GetGraph method.

type GraphResourcesClientGetGraphResponse added in v0.4.0

type GraphResourcesClientGetGraphResponse struct {
	GraphResourceGetResults
}

GraphResourcesClientGetGraphResponse contains the response from method GraphResourcesClient.GetGraph.

type GraphResourcesClientListGraphsOptions added in v0.4.0

type GraphResourcesClientListGraphsOptions struct {
}

GraphResourcesClientListGraphsOptions contains the optional parameters for the GraphResourcesClient.ListGraphs method.

type GraphResourcesClientListGraphsResponse added in v0.4.0

type GraphResourcesClientListGraphsResponse struct {
	GraphResourcesListResult
}

GraphResourcesClientListGraphsResponse contains the response from method GraphResourcesClient.ListGraphs.

type GraphResourcesListResult

type GraphResourcesListResult struct {
	// READ-ONLY; List of Graph resource and their properties.
	Value []*GraphResourceGetResults `json:"value,omitempty" azure:"ro"`
}

GraphResourcesListResult - The List operation response, that contains the Graph resource and their properties.

type GremlinDatabaseCreateUpdateParameters

type GremlinDatabaseCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB Gremlin database.
	Properties *GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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 {
	// 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"`

	// 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 GremlinDatabaseRestoreResource added in v0.4.0

type GremlinDatabaseRestoreResource struct {
	// The name of the gremlin database available for restore.
	DatabaseName *string `json:"databaseName,omitempty"`

	// The names of the graphs available for restore.
	GraphNames []*string `json:"graphNames,omitempty"`
}

GremlinDatabaseRestoreResource - Specific Gremlin Databases to restore.

func (GremlinDatabaseRestoreResource) MarshalJSON added in v0.4.0

func (g GremlinDatabaseRestoreResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GremlinDatabaseRestoreResource.

type GremlinGraphCreateUpdateParameters

type GremlinGraphCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB Gremlin graph.
	Properties *GremlinGraphCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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 {
	// 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"`

	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginRetrieveContinuousBackupInformation added in v0.4.0

BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a gremlin graph. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. databaseName - Cosmos DB database name. graphName - Cosmos DB graph name. location - The name of the continuous backup restore location. options - GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the GremlinResourcesClient.BeginRetrieveContinuousBackupInformation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBGremlinGraphBackupInformation.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.BeginRetrieveContinuousBackupInformation(ctx,
		"rgName",
		"ddb1",
		"databaseName",
		"graphName",
		armcosmos.ContinuousBackupRestoreLocation{
			Location: to.Ptr("North Europe"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions added in v0.4.0

type GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

GremlinResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the GremlinResourcesClient.BeginRetrieveContinuousBackupInformation method.

type GremlinResourcesClientBeginUpdateGremlinDatabaseThroughputOptions 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 GremlinResourcesClientRetrieveContinuousBackupInformationResponse added in v0.4.0

type GremlinResourcesClientRetrieveContinuousBackupInformationResponse struct {
	BackupInformation
}

GremlinResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method GremlinResourcesClient.RetrieveContinuousBackupInformation.

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.

const (
	IndexKindHash    IndexKind = "Hash"
	IndexKindRange   IndexKind = "Range"
	IndexKindSpatial IndexKind = "Spatial"
)

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.

const (
	KeyKindPrimary           KeyKind = "primary"
	KeyKindPrimaryReadonly   KeyKind = "primaryReadonly"
	KeyKindSecondary         KeyKind = "secondary"
	KeyKindSecondaryReadonly KeyKind = "secondaryReadonly"
)

func PossibleKeyKindValues

func PossibleKeyKindValues() []KeyKind

PossibleKeyKindValues returns the possible values for the KeyKind const type.

type KeyWrapMetadata added in v0.4.0

type KeyWrapMetadata struct {
	// Algorithm used in wrapping and unwrapping of the data encryption key.
	Algorithm *string `json:"algorithm,omitempty"`

	// The name of associated KeyEncryptionKey (aka CustomerManagedKey).
	Name *string `json:"name,omitempty"`

	// ProviderName of KeyStoreProvider.
	Type *string `json:"type,omitempty"`

	// Reference / link to the KeyEncryptionKey.
	Value *string `json:"value,omitempty"`
}

KeyWrapMetadata - Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key.

type ListBackups

type ListBackups struct {
	// READ-ONLY; Container for array of backups.
	Value []*BackupResource `json:"value,omitempty" azure:"ro"`
}

ListBackups - List of restorable backups for a Cassandra cluster.

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; The current status of location in Azure.
	Status *string `json:"status,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

Get - Get the properties of an existing Cosmos DB location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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

NewListPager - List Cosmos DB locations and their properties If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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 ManagedCassandraReaperStatus struct {
	Healthy *bool `json:"healthy,omitempty"`

	// Dictionary of
	RepairRunIDs map[string]*string `json:"repairRunIds,omitempty"`

	// Dictionary of
	RepairSchedules map[string]*string `json:"repairSchedules,omitempty"`
}

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 MaterializedViewsBuilderRegionalServiceResource added in v0.4.0

type MaterializedViewsBuilderRegionalServiceResource struct {
	// READ-ONLY; The location name.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The regional service name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

MaterializedViewsBuilderRegionalServiceResource - Resource for a regional service location.

type MaterializedViewsBuilderServiceResource added in v0.4.0

type MaterializedViewsBuilderServiceResource struct {
	// Properties for MaterializedViewsBuilderServiceResource.
	Properties *MaterializedViewsBuilderServiceResourceProperties `json:"properties,omitempty"`
}

MaterializedViewsBuilderServiceResource - Describes the service response property for MaterializedViewsBuilder.

type MaterializedViewsBuilderServiceResourceProperties added in v0.4.0

type MaterializedViewsBuilderServiceResourceProperties struct {
	// REQUIRED; ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// READ-ONLY; Time of the last state change (ISO-8601 format).
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; An array that contains all of the locations for the service.
	Locations []*MaterializedViewsBuilderRegionalServiceResource `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

MaterializedViewsBuilderServiceResourceProperties - Properties for MaterializedViewsBuilderServiceResource.

func (*MaterializedViewsBuilderServiceResourceProperties) GetServiceResourceProperties added in v0.4.0

GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type MaterializedViewsBuilderServiceResourceProperties.

func (MaterializedViewsBuilderServiceResourceProperties) MarshalJSON added in v0.4.0

MarshalJSON implements the json.Marshaller interface for type MaterializedViewsBuilderServiceResourceProperties.

func (*MaterializedViewsBuilderServiceResourceProperties) UnmarshalJSON added in v0.4.0

UnmarshalJSON implements the json.Unmarshaller interface for type MaterializedViewsBuilderServiceResourceProperties.

type MergeParameters added in v0.4.0

type MergeParameters struct {
	// Specifies whether the operation is a real merge operation or a simulation.
	IsDryRun *bool `json:"isDryRun,omitempty"`
}

MergeParameters - The properties of an Azure Cosmos DB merge operations

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

func (m *Metric) UnmarshalJSON(data []byte) error

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"`

	// 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"`

	// 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 {
	// 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"`

	// 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"`

	// 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"`

	// 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 {
	// 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"`

	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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{
					AnalyticalStorageTTL: to.Ptr[int32](500),
					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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginCreateUpdateMongoRoleDefinition added in v0.4.0

func (client *MongoDBResourcesClient) BeginCreateUpdateMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoRoleDefinitionParameters MongoRoleDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse], error)

BeginCreateUpdateMongoRoleDefinition - Creates or updates an Azure Cosmos DB Mongo Role Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. createUpdateMongoRoleDefinitionParameters - The properties required to create or update a Role Definition. options - MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateUpdateMongoRoleDefinition(ctx,
		"myMongoRoleDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		armcosmos.MongoRoleDefinitionCreateUpdateParameters{
			Properties: &armcosmos.MongoRoleDefinitionResource{
				DatabaseName: to.Ptr("sales"),
				Privileges: []*armcosmos.Privilege{
					{
						Actions: []*string{
							to.Ptr("insert"),
							to.Ptr("find")},
						Resource: &armcosmos.PrivilegeResource{
							Collection: to.Ptr("sales"),
							Db:         to.Ptr("sales"),
						},
					}},
				RoleName: to.Ptr("myRoleName"),
				Roles: []*armcosmos.Role{
					{
						Db:   to.Ptr("sales"),
						Role: to.Ptr("myInheritedRole"),
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition added in v0.4.0

func (client *MongoDBResourcesClient) BeginCreateUpdateMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, createUpdateMongoUserDefinitionParameters MongoUserDefinitionCreateUpdateParameters, options *MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse], error)

BeginCreateUpdateMongoUserDefinition - Creates or updates an Azure Cosmos DB Mongo User Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. createUpdateMongoUserDefinitionParameters - The properties required to create or update a User Definition. options - MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateUpdateMongoUserDefinition(ctx,
		"myMongoUserDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		armcosmos.MongoUserDefinitionCreateUpdateParameters{
			Properties: &armcosmos.MongoUserDefinitionResource{
				CustomData:   to.Ptr("My custom data"),
				DatabaseName: to.Ptr("sales"),
				Mechanisms:   to.Ptr("SCRAM-SHA-256"),
				Password:     to.Ptr("myPassword"),
				Roles: []*armcosmos.Role{
					{
						Db:   to.Ptr("sales"),
						Role: to.Ptr("myReadRole"),
					}},
				UserName: to.Ptr("myUserName"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginDeleteMongoRoleDefinition added in v0.4.0

func (client *MongoDBResourcesClient) BeginDeleteMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoRoleDefinitionResponse], error)

BeginDeleteMongoRoleDefinition - Deletes an existing Azure Cosmos DB Mongo Role Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoRoleDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteMongoRoleDefinition(ctx,
		"myMongoRoleDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*MongoDBResourcesClient) BeginDeleteMongoUserDefinition added in v0.4.0

func (client *MongoDBResourcesClient) BeginDeleteMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions) (*runtime.Poller[MongoDBResourcesClientDeleteMongoUserDefinitionResponse], error)

BeginDeleteMongoUserDefinition - Deletes an existing Azure Cosmos DB Mongo User Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoUserDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBUserDefinitionDelete.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDeleteMongoUserDefinition(ctx,
		"myMongoUserDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*MongoDBResourcesClient) BeginListMongoDBCollectionPartitionMerge added in v0.4.0

func (client *MongoDBResourcesClient) BeginListMongoDBCollectionPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, mergeParameters MergeParameters, options *MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions) (*runtime.Poller[MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse], error)

BeginListMongoDBCollectionPartitionMerge - Merges the partitions of a MongoDB Collection If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. mergeParameters - The parameters for the merge operation. options - MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions contains the optional parameters for the MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.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.BeginListMongoDBCollectionPartitionMerge(ctx,
		"rgName",
		"ddb1",
		"databaseName",
		"collectionName",
		armcosmos.MergeParameters{
			IsDryRun: 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 (*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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginMongoDBContainerRedistributeThroughput

func (client *MongoDBResourcesClient) BeginMongoDBContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, redistributeThroughputParameters RedistributeThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse], error)

BeginMongoDBContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB MongoDB container If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current MongoDB container. options - MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.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.BeginMongoDBContainerRedistributeThroughput(ctx,
		"rg1",
		"ddb1",
		"databaseName",
		"collectionName",
		armcosmos.RedistributeThroughputParameters{
			Properties: &armcosmos.RedistributeThroughputProperties{
				Resource: &armcosmos.RedistributeThroughputPropertiesResource{
					SourcePhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{
						{
							ID:         to.Ptr("2"),
							Throughput: to.Ptr[float64](5000),
						},
						{
							ID: to.Ptr("3"),
						}},
					TargetPhysicalPartitionThroughputInfo: []*armcosmos.PhysicalPartitionThroughputInfoResource{
						{
							ID:         to.Ptr("0"),
							Throughput: to.Ptr[float64](5000),
						},
						{
							ID:         to.Ptr("1"),
							Throughput: to.Ptr[float64](5000),
						}},
					ThroughputPolicy: to.Ptr(armcosmos.ThroughputPolicyTypeCustom),
				},
			},
		},
		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) BeginMongoDBContainerRetrieveThroughputDistribution

func (client *MongoDBResourcesClient) BeginMongoDBContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, retrieveThroughputParameters RetrieveThroughputParameters, options *MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse], error)

BeginMongoDBContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB MongoDB container If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current MongoDB container. options - MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.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.BeginMongoDBContainerRetrieveThroughputDistribution(ctx,
		"rg1",
		"ddb1",
		"databaseName",
		"collectionName",
		armcosmos.RetrieveThroughputParameters{
			Properties: &armcosmos.RetrieveThroughputProperties{
				Resource: &armcosmos.RetrieveThroughputPropertiesResource{
					PhysicalPartitionIDs: []*armcosmos.PhysicalPartitionID{
						{
							ID: to.Ptr("0"),
						},
						{
							ID: to.Ptr("1"),
						}},
				},
			},
		},
		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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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) GetMongoRoleDefinition added in v0.4.0

func (client *MongoDBResourcesClient) GetMongoRoleDefinition(ctx context.Context, mongoRoleDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientGetMongoRoleDefinitionOptions) (MongoDBResourcesClientGetMongoRoleDefinitionResponse, error)

GetMongoRoleDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoRoleDefinitionID - The ID for the Role Definition {dbName.roleName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientGetMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoRoleDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionGet.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetMongoRoleDefinition(ctx,
		"myMongoRoleDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MongoDBResourcesClient) GetMongoUserDefinition added in v0.4.0

func (client *MongoDBResourcesClient) GetMongoUserDefinition(ctx context.Context, mongoUserDefinitionID string, resourceGroupName string, accountName string, options *MongoDBResourcesClientGetMongoUserDefinitionOptions) (MongoDBResourcesClientGetMongoUserDefinitionResponse, error)

GetMongoUserDefinition - Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview mongoUserDefinitionID - The ID for the User Definition {dbName.userName}. resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientGetMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoUserDefinition method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBUserDefinitionGet.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetMongoUserDefinition(ctx,
		"myMongoUserDefinitionId",
		"myResourceGroupName",
		"myAccountName",
		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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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:

func (*MongoDBResourcesClient) NewListMongoRoleDefinitionsPager added in v0.5.0

NewListMongoRoleDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo Role Definitions. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoRoleDefinitions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBRoleDefinitionList.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListMongoRoleDefinitionsPager("myResourceGroupName",
		"myAccountName",
		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) NewListMongoUserDefinitionsPager added in v0.5.0

NewListMongoUserDefinitionsPager - Retrieves the list of all Azure Cosmos DB Mongo User Definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoUserDefinitions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBUserDefinitionList.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("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListMongoUserDefinitionsPager("myResourceGroupName",
		"myAccountName",
		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 MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions added in v0.4.0

type MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginCreateUpdateMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoRoleDefinition method.

type MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions added in v0.4.0

type MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginCreateUpdateMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginCreateUpdateMongoUserDefinition method.

type MongoDBResourcesClientBeginDeleteMongoDBCollectionOptions 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 MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions added in v0.4.0

type MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginDeleteMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoRoleDefinition method.

type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions added in v0.4.0

type MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginDeleteMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.BeginDeleteMongoUserDefinition method.

type MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions added in v0.4.0

type MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginListMongoDBCollectionPartitionMergeOptions contains the optional parameters for the MongoDBResourcesClient.BeginListMongoDBCollectionPartitionMerge 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 MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions

type MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginMongoDBContainerRedistributeThroughputOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBContainerRedistributeThroughput method.

type MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions

type MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MongoDBResourcesClientBeginMongoDBContainerRetrieveThroughputDistributionOptions contains the optional parameters for the MongoDBResourcesClient.BeginMongoDBContainerRetrieveThroughputDistribution 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 MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse added in v0.4.0

type MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse struct {
	MongoRoleDefinitionGetResults
}

MongoDBResourcesClientCreateUpdateMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.CreateUpdateMongoRoleDefinition.

type MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse added in v0.4.0

type MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse struct {
	MongoUserDefinitionGetResults
}

MongoDBResourcesClientCreateUpdateMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.CreateUpdateMongoUserDefinition.

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 MongoDBResourcesClientDeleteMongoRoleDefinitionResponse added in v0.4.0

type MongoDBResourcesClientDeleteMongoRoleDefinitionResponse struct {
}

MongoDBResourcesClientDeleteMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.DeleteMongoRoleDefinition.

type MongoDBResourcesClientDeleteMongoUserDefinitionResponse added in v0.4.0

type MongoDBResourcesClientDeleteMongoUserDefinitionResponse struct {
}

MongoDBResourcesClientDeleteMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.DeleteMongoUserDefinition.

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 MongoDBResourcesClientGetMongoRoleDefinitionOptions added in v0.4.0

type MongoDBResourcesClientGetMongoRoleDefinitionOptions struct {
}

MongoDBResourcesClientGetMongoRoleDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoRoleDefinition method.

type MongoDBResourcesClientGetMongoRoleDefinitionResponse added in v0.4.0

type MongoDBResourcesClientGetMongoRoleDefinitionResponse struct {
	MongoRoleDefinitionGetResults
}

MongoDBResourcesClientGetMongoRoleDefinitionResponse contains the response from method MongoDBResourcesClient.GetMongoRoleDefinition.

type MongoDBResourcesClientGetMongoUserDefinitionOptions added in v0.4.0

type MongoDBResourcesClientGetMongoUserDefinitionOptions struct {
}

MongoDBResourcesClientGetMongoUserDefinitionOptions contains the optional parameters for the MongoDBResourcesClient.GetMongoUserDefinition method.

type MongoDBResourcesClientGetMongoUserDefinitionResponse added in v0.4.0

type MongoDBResourcesClientGetMongoUserDefinitionResponse struct {
	MongoUserDefinitionGetResults
}

MongoDBResourcesClientGetMongoUserDefinitionResponse contains the response from method MongoDBResourcesClient.GetMongoUserDefinition.

type MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse added in v0.4.0

type MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse struct {
	PhysicalPartitionStorageInfoCollection
}

MongoDBResourcesClientListMongoDBCollectionPartitionMergeResponse contains the response from method MongoDBResourcesClient.ListMongoDBCollectionPartitionMerge.

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 MongoDBResourcesClientListMongoRoleDefinitionsOptions added in v0.4.0

type MongoDBResourcesClientListMongoRoleDefinitionsOptions struct {
}

MongoDBResourcesClientListMongoRoleDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoRoleDefinitions method.

type MongoDBResourcesClientListMongoRoleDefinitionsResponse added in v0.4.0

type MongoDBResourcesClientListMongoRoleDefinitionsResponse struct {
	MongoRoleDefinitionListResult
}

MongoDBResourcesClientListMongoRoleDefinitionsResponse contains the response from method MongoDBResourcesClient.ListMongoRoleDefinitions.

type MongoDBResourcesClientListMongoUserDefinitionsOptions added in v0.4.0

type MongoDBResourcesClientListMongoUserDefinitionsOptions struct {
}

MongoDBResourcesClientListMongoUserDefinitionsOptions contains the optional parameters for the MongoDBResourcesClient.ListMongoUserDefinitions method.

type MongoDBResourcesClientListMongoUserDefinitionsResponse added in v0.4.0

type MongoDBResourcesClientListMongoUserDefinitionsResponse struct {
	MongoUserDefinitionListResult
}

MongoDBResourcesClientListMongoUserDefinitionsResponse contains the response from method MongoDBResourcesClient.ListMongoUserDefinitions.

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 MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse

type MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse struct {
	PhysicalPartitionThroughputInfoResult
}

MongoDBResourcesClientMongoDBContainerRedistributeThroughputResponse contains the response from method MongoDBResourcesClient.MongoDBContainerRedistributeThroughput.

type MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse

type MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse struct {
	PhysicalPartitionThroughputInfoResult
}

MongoDBResourcesClientMongoDBContainerRetrieveThroughputDistributionResponse contains the response from method MongoDBResourcesClient.MongoDBContainerRetrieveThroughputDistribution.

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 MongoRoleDefinitionCreateUpdateParameters added in v0.4.0

type MongoRoleDefinitionCreateUpdateParameters struct {
	// Properties to create and update an Azure Cosmos DB Mongo Role Definition.
	Properties *MongoRoleDefinitionResource `json:"properties,omitempty"`
}

MongoRoleDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB Mongo Role Definition.

type MongoRoleDefinitionGetResults added in v0.4.0

type MongoRoleDefinitionGetResults struct {
	// Properties related to the Mongo Role Definition.
	Properties *MongoRoleDefinitionResource `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"`
}

MongoRoleDefinitionGetResults - An Azure Cosmos DB Mongo Role Definition.

type MongoRoleDefinitionListResult added in v0.4.0

type MongoRoleDefinitionListResult struct {
	// READ-ONLY; List of Mongo Role Definitions and their properties.
	Value []*MongoRoleDefinitionGetResults `json:"value,omitempty" azure:"ro"`
}

MongoRoleDefinitionListResult - The relevant Mongo Role Definitions.

type MongoRoleDefinitionResource added in v0.4.0

type MongoRoleDefinitionResource struct {
	// The database name for which access is being granted for this Role Definition.
	DatabaseName *string `json:"databaseName,omitempty"`

	// A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire
	// database account or any underlying Database / Collection. Scopes higher than
	// Database are not enforceable as privilege.
	Privileges []*Privilege `json:"privileges,omitempty"`

	// A user-friendly name for the Role Definition. Must be unique for the database account.
	RoleName *string `json:"roleName,omitempty"`

	// The set of roles inherited by this Role Definition.
	Roles []*Role `json:"roles,omitempty"`

	// Indicates whether the Role Definition was built-in or user created.
	Type *MongoRoleDefinitionType `json:"type,omitempty"`
}

MongoRoleDefinitionResource - Azure Cosmos DB Mongo Role Definition resource object.

func (MongoRoleDefinitionResource) MarshalJSON added in v0.4.0

func (m MongoRoleDefinitionResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MongoRoleDefinitionResource.

type MongoRoleDefinitionType added in v0.4.0

type MongoRoleDefinitionType string

MongoRoleDefinitionType - Indicates whether the Role Definition was built-in or user created.

const (
	MongoRoleDefinitionTypeBuiltInRole MongoRoleDefinitionType = "BuiltInRole"
	MongoRoleDefinitionTypeCustomRole  MongoRoleDefinitionType = "CustomRole"
)

func PossibleMongoRoleDefinitionTypeValues added in v0.4.0

func PossibleMongoRoleDefinitionTypeValues() []MongoRoleDefinitionType

PossibleMongoRoleDefinitionTypeValues returns the possible values for the MongoRoleDefinitionType const type.

type MongoUserDefinitionCreateUpdateParameters added in v0.4.0

type MongoUserDefinitionCreateUpdateParameters struct {
	// Properties to create and update an Azure Cosmos DB Mongo User Definition.
	Properties *MongoUserDefinitionResource `json:"properties,omitempty"`
}

MongoUserDefinitionCreateUpdateParameters - Parameters to create and update an Azure Cosmos DB Mongo User Definition.

type MongoUserDefinitionGetResults added in v0.4.0

type MongoUserDefinitionGetResults struct {
	// Properties related to the User Definition.
	Properties *MongoUserDefinitionResource `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"`
}

MongoUserDefinitionGetResults - An Azure Cosmos DB User Definition

type MongoUserDefinitionListResult added in v0.4.0

type MongoUserDefinitionListResult struct {
	// READ-ONLY; List of User Definition and their properties
	Value []*MongoUserDefinitionGetResults `json:"value,omitempty" azure:"ro"`
}

MongoUserDefinitionListResult - The relevant User Definition.

type MongoUserDefinitionResource added in v0.4.0

type MongoUserDefinitionResource struct {
	// A custom definition for the USer Definition.
	CustomData *string `json:"customData,omitempty"`

	// The database name for which access is being granted for this User Definition.
	DatabaseName *string `json:"databaseName,omitempty"`

	// The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256.
	Mechanisms *string `json:"mechanisms,omitempty"`

	// The password for User Definition. Response does not contain user password.
	Password *string `json:"password,omitempty"`

	// The set of roles inherited by the User Definition.
	Roles []*Role `json:"roles,omitempty"`

	// The user name for User Definition.
	UserName *string `json:"userName,omitempty"`
}

MongoUserDefinitionResource - Azure Cosmos DB Mongo User Definition resource object.

func (MongoUserDefinitionResource) MarshalJSON added in v0.4.0

func (m MongoUserDefinitionResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MongoUserDefinitionResource.

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.

const (
	NodeStateJoining NodeState = "Joining"
	NodeStateLeaving NodeState = "Leaving"
	NodeStateMoving  NodeState = "Moving"
	NodeStateNormal  NodeState = "Normal"
	NodeStateStopped NodeState = "Stopped"
)

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

BeginRegenerateAuthToken - Regenerates the auth token for the notebook workspace If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 PhysicalPartitionID

type PhysicalPartitionID struct {
	// REQUIRED; Id of a physical partition
	ID *string `json:"id,omitempty"`
}

PhysicalPartitionID - PhysicalPartitionId object

type PhysicalPartitionStorageInfo added in v0.4.0

type PhysicalPartitionStorageInfo struct {
	// READ-ONLY; The unique identifier of the partition.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The storage in KB for the physical partition.
	StorageInKB *float64 `json:"storageInKB,omitempty" azure:"ro"`
}

PhysicalPartitionStorageInfo - The storage of a physical partition

type PhysicalPartitionStorageInfoCollection added in v0.4.0

type PhysicalPartitionStorageInfoCollection struct {
	// READ-ONLY; List of physical partitions and their properties.
	PhysicalPartitionStorageInfoCollection []*PhysicalPartitionStorageInfo `json:"physicalPartitionStorageInfoCollection,omitempty" azure:"ro"`
}

PhysicalPartitionStorageInfoCollection - List of physical partitions and their properties returned by a merge operation.

type PhysicalPartitionThroughputInfoProperties

type PhysicalPartitionThroughputInfoProperties struct {
	// Array of physical partition throughput info objects
	PhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"physicalPartitionThroughputInfo,omitempty"`
}

PhysicalPartitionThroughputInfoProperties - The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object

func (PhysicalPartitionThroughputInfoProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoProperties.

type PhysicalPartitionThroughputInfoResource

type PhysicalPartitionThroughputInfoResource struct {
	// REQUIRED; Id of a physical partition
	ID *string `json:"id,omitempty"`

	// Throughput of a physical partition
	Throughput *float64 `json:"throughput,omitempty"`
}

PhysicalPartitionThroughputInfoResource - PhysicalPartitionThroughputInfo object

type PhysicalPartitionThroughputInfoResult

type PhysicalPartitionThroughputInfoResult 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"`

	// The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object
	Properties *PhysicalPartitionThroughputInfoResultProperties `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"`
}

PhysicalPartitionThroughputInfoResult - An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object.

func (PhysicalPartitionThroughputInfoResult) MarshalJSON

func (p PhysicalPartitionThroughputInfoResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResult.

type PhysicalPartitionThroughputInfoResultProperties

type PhysicalPartitionThroughputInfoResultProperties struct {
	// properties of physical partition throughput info
	Resource *PhysicalPartitionThroughputInfoResultPropertiesResource `json:"resource,omitempty"`
}

PhysicalPartitionThroughputInfoResultProperties - The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object

type PhysicalPartitionThroughputInfoResultPropertiesResource

type PhysicalPartitionThroughputInfoResultPropertiesResource struct {
	// Array of physical partition throughput info objects
	PhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"physicalPartitionThroughputInfo,omitempty"`
}

PhysicalPartitionThroughputInfoResultPropertiesResource - properties of physical partition throughput info

func (PhysicalPartitionThroughputInfoResultPropertiesResource) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PhysicalPartitionThroughputInfoResultPropertiesResource.

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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 Privilege added in v0.4.0

type Privilege struct {
	// An array of actions that are allowed.
	Actions []*string `json:"actions,omitempty"`

	// An Azure Cosmos DB Mongo DB Resource.
	Resource *PrivilegeResource `json:"resource,omitempty"`
}

Privilege - The set of data plane operations permitted through this Role Definition.

func (Privilege) MarshalJSON added in v0.4.0

func (p Privilege) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Privilege.

type PrivilegeResource added in v0.4.0

type PrivilegeResource struct {
	// The collection name the role is applied.
	Collection *string `json:"collection,omitempty"`

	// The database name the role is applied.
	Db *string `json:"db,omitempty"`
}

PrivilegeResource - An Azure Cosmos DB Mongo DB Resource.

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 RedistributeThroughputParameters

type RedistributeThroughputParameters struct {
	// REQUIRED; Properties to redistribute throughput parameters object
	Properties *RedistributeThroughputProperties `json:"properties,omitempty"`

	// 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"`

	// 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"`
}

RedistributeThroughputParameters - Cosmos DB redistribute throughput parameters object

func (RedistributeThroughputParameters) MarshalJSON

func (r RedistributeThroughputParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputParameters.

type RedistributeThroughputProperties

type RedistributeThroughputProperties struct {
	// REQUIRED; The standard JSON format of a resource throughput
	Resource *RedistributeThroughputPropertiesResource `json:"resource,omitempty"`
}

RedistributeThroughputProperties - Properties to redistribute throughput for Azure Cosmos DB resource.

type RedistributeThroughputPropertiesResource

type RedistributeThroughputPropertiesResource struct {
	// REQUIRED; Array of PhysicalPartitionThroughputInfoResource objects.
	SourcePhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"sourcePhysicalPartitionThroughputInfo,omitempty"`

	// REQUIRED; Array of PhysicalPartitionThroughputInfoResource objects.
	TargetPhysicalPartitionThroughputInfo []*PhysicalPartitionThroughputInfoResource `json:"targetPhysicalPartitionThroughputInfo,omitempty"`

	// REQUIRED; ThroughputPolicy to apply for throughput redistribution
	ThroughputPolicy *ThroughputPolicyType `json:"throughputPolicy,omitempty"`
}

RedistributeThroughputPropertiesResource - Resource to redistribute throughput for Azure Cosmos DB resource

func (RedistributeThroughputPropertiesResource) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RedistributeThroughputPropertiesResource.

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 RegionalServiceResource

type RegionalServiceResource struct {
	// READ-ONLY; The location name.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The regional service name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

RegionalServiceResource - Resource for a regional service location.

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"`

	// The least recent time at which the database account can be restored to (ISO-8601 format).
	OldestRestorableTime *time.Time `json:"oldestRestorableTime,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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 RestorableGremlinDatabaseGetResult added in v0.4.0

type RestorableGremlinDatabaseGetResult struct {
	// The properties of a Gremlin database event.
	Properties *RestorableGremlinDatabaseProperties `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"`
}

RestorableGremlinDatabaseGetResult - An Azure Cosmos DB Gremlin database event

type RestorableGremlinDatabaseProperties added in v0.4.0

type RestorableGremlinDatabaseProperties struct {
	// The resource of an Azure Cosmos DB Gremlin database event
	Resource *RestorableGremlinDatabasePropertiesResource `json:"resource,omitempty"`
}

RestorableGremlinDatabaseProperties - The properties of an Azure Cosmos DB Gremlin database event

type RestorableGremlinDatabasePropertiesResource added in v0.4.0

type RestorableGremlinDatabasePropertiesResource 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 Gremlin database.
	OwnerID *string `json:"ownerId,omitempty" azure:"ro"`

	// READ-ONLY; The resource ID of this Gremlin database.
	OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"`

	// READ-ONLY; A system generated property. A unique identifier.
	Rid *string `json:"_rid,omitempty" azure:"ro"`
}

RestorableGremlinDatabasePropertiesResource - The resource of an Azure Cosmos DB Gremlin database event

type RestorableGremlinDatabasesClient added in v0.4.0

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

RestorableGremlinDatabasesClient contains the methods for the RestorableGremlinDatabases group. Don't use this type directly, use NewRestorableGremlinDatabasesClient() instead.

func NewRestorableGremlinDatabasesClient added in v0.4.0

func NewRestorableGremlinDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinDatabasesClient, error)

NewRestorableGremlinDatabasesClient creates a new instance of RestorableGremlinDatabasesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableGremlinDatabasesClient) NewListPager added in v0.5.0

NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview location - Cosmos DB region, with spaces between words and each word capitalized. instanceID - The instanceId GUID of a restorable database account. options - RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBRestorableGremlinDatabaseList.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.NewRestorableGremlinDatabasesClient("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 RestorableGremlinDatabasesClientListOptions added in v0.4.0

type RestorableGremlinDatabasesClientListOptions struct {
}

RestorableGremlinDatabasesClientListOptions contains the optional parameters for the RestorableGremlinDatabasesClient.List method.

type RestorableGremlinDatabasesClientListResponse added in v0.4.0

type RestorableGremlinDatabasesClientListResponse struct {
	RestorableGremlinDatabasesListResult
}

RestorableGremlinDatabasesClientListResponse contains the response from method RestorableGremlinDatabasesClient.List.

type RestorableGremlinDatabasesListResult added in v0.4.0

type RestorableGremlinDatabasesListResult struct {
	// READ-ONLY; List of Gremlin database events and their properties.
	Value []*RestorableGremlinDatabaseGetResult `json:"value,omitempty" azure:"ro"`
}

RestorableGremlinDatabasesListResult - The List operation response, that contains the Gremlin database events and their properties.

type RestorableGremlinGraphGetResult added in v0.4.0

type RestorableGremlinGraphGetResult struct {
	// The properties of a Gremlin graph event.
	Properties *RestorableGremlinGraphProperties `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"`
}

RestorableGremlinGraphGetResult - An Azure Cosmos DB Gremlin graph event

type RestorableGremlinGraphProperties added in v0.4.0

type RestorableGremlinGraphProperties struct {
	// The resource of an Azure Cosmos DB Gremlin graph event
	Resource *RestorableGremlinGraphPropertiesResource `json:"resource,omitempty"`
}

RestorableGremlinGraphProperties - The properties of an Azure Cosmos DB Gremlin graph event

type RestorableGremlinGraphPropertiesResource added in v0.4.0

type RestorableGremlinGraphPropertiesResource struct {
	// READ-ONLY; The time when this graph event happened.
	EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; The operation type of this graph event.
	OperationType *OperationType `json:"operationType,omitempty" azure:"ro"`

	// READ-ONLY; The name of this Gremlin graph.
	OwnerID *string `json:"ownerId,omitempty" azure:"ro"`

	// READ-ONLY; The resource ID of this Gremlin graph.
	OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"`

	// READ-ONLY; A system generated property. A unique identifier.
	Rid *string `json:"_rid,omitempty" azure:"ro"`
}

RestorableGremlinGraphPropertiesResource - The resource of an Azure Cosmos DB Gremlin graph event

type RestorableGremlinGraphsClient added in v0.4.0

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

RestorableGremlinGraphsClient contains the methods for the RestorableGremlinGraphs group. Don't use this type directly, use NewRestorableGremlinGraphsClient() instead.

func NewRestorableGremlinGraphsClient added in v0.4.0

func NewRestorableGremlinGraphsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinGraphsClient, error)

NewRestorableGremlinGraphsClient creates a new instance of RestorableGremlinGraphsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableGremlinGraphsClient) NewListPager added in v0.5.0

NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific database. This helps in scenario where container was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview location - Cosmos DB region, with spaces between words and each word capitalized. instanceID - The instanceId GUID of a restorable database account. options - RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBRestorableGremlinGraphList.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.NewRestorableGremlinGraphsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("WestUS",
		"98a570f2-63db-4117-91f0-366327b7b353",
		&armcosmos.RestorableGremlinGraphsClientListOptions{RestorableGremlinDatabaseRid: to.Ptr("PD5DALigDgw="),
			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 RestorableGremlinGraphsClientListOptions added in v0.4.0

type RestorableGremlinGraphsClientListOptions struct {
	// Restorable Gremlin graphs event feed end time.
	EndTime *string
	// The resource ID of the Gremlin database.
	RestorableGremlinDatabaseRid *string
	// Restorable Gremlin graphs event feed start time.
	StartTime *string
}

RestorableGremlinGraphsClientListOptions contains the optional parameters for the RestorableGremlinGraphsClient.List method.

type RestorableGremlinGraphsClientListResponse added in v0.4.0

type RestorableGremlinGraphsClientListResponse struct {
	RestorableGremlinGraphsListResult
}

RestorableGremlinGraphsClientListResponse contains the response from method RestorableGremlinGraphsClient.List.

type RestorableGremlinGraphsListResult added in v0.4.0

type RestorableGremlinGraphsListResult struct {
	// READ-ONLY; List of Gremlin graph events and their properties.
	Value []*RestorableGremlinGraphGetResult `json:"value,omitempty" azure:"ro"`
}

RestorableGremlinGraphsListResult - The List operation response, that contains the Gremlin graph events and their properties.

type RestorableGremlinResourcesClient added in v0.4.0

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

RestorableGremlinResourcesClient contains the methods for the RestorableGremlinResources group. Don't use this type directly, use NewRestorableGremlinResourcesClient() instead.

func NewRestorableGremlinResourcesClient added in v0.4.0

func NewRestorableGremlinResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableGremlinResourcesClient, error)

NewRestorableGremlinResourcesClient creates a new instance of RestorableGremlinResourcesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableGremlinResourcesClient) NewListPager added in v0.5.0

NewListPager - Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview location - Cosmos DB region, with spaces between words and each word capitalized. instanceID - The instanceId GUID of a restorable database account. options - RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBRestorableGremlinResourceList.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.NewRestorableGremlinResourcesClient("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.RestorableGremlinResourcesClientListOptions{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 RestorableGremlinResourcesClientListOptions added in v0.4.0

type RestorableGremlinResourcesClientListOptions struct {
	// The location where the restorable resources are located.
	RestoreLocation *string
	// The timestamp when the restorable resources existed.
	RestoreTimestampInUTC *string
}

RestorableGremlinResourcesClientListOptions contains the optional parameters for the RestorableGremlinResourcesClient.List method.

type RestorableGremlinResourcesClientListResponse added in v0.4.0

type RestorableGremlinResourcesClientListResponse struct {
	RestorableGremlinResourcesListResult
}

RestorableGremlinResourcesClientListResponse contains the response from method RestorableGremlinResourcesClient.List.

type RestorableGremlinResourcesListResult added in v0.4.0

type RestorableGremlinResourcesListResult struct {
	// READ-ONLY; List of restorable Gremlin resources, including the gremlin database and graph names.
	Value []*GremlinDatabaseRestoreResource `json:"value,omitempty" azure:"ro"`
}

RestorableGremlinResourcesListResult - The List operation response, that contains the restorable Gremlin resources.

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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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="),
			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 RestorableMongodbCollectionsClientListOptions added in v0.3.0

type RestorableMongodbCollectionsClientListOptions struct {
	// Restorable MongoDB collections event feed end time.
	EndTime *string
	// The resource ID of the MongoDB database.
	RestorableMongodbDatabaseRid *string
	// Restorable MongoDB collections event feed start time.
	StartTime *string
}

RestorableMongodbCollectionsClientListOptions contains the optional parameters for the RestorableMongodbCollectionsClient.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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 client encryption policy for the container.
	ClientEncryptionPolicy *ClientEncryptionPolicy `json:"clientEncryptionPolicy,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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 {
	// Restorable Sql containers event feed end time.
	EndTime *string
	// The resource ID of the SQL database.
	RestorableSQLDatabaseRid *string
	// Restorable Sql containers event feed start time.
	StartTime *string
}

RestorableSQLContainersClientListOptions contains the optional parameters for the RestorableSQLContainersClient.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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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 RestorableTableGetResult added in v0.4.0

type RestorableTableGetResult struct {
	// The properties of a Table event.
	Properties *RestorableTableProperties `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"`
}

RestorableTableGetResult - An Azure Cosmos DB Table event

type RestorableTableProperties added in v0.4.0

type RestorableTableProperties struct {
	// The resource of an Azure Cosmos DB Table event
	Resource *RestorableTablePropertiesResource `json:"resource,omitempty"`
}

RestorableTableProperties - The properties of an Azure Cosmos DB Table event

type RestorableTablePropertiesResource added in v0.4.0

type RestorableTablePropertiesResource struct {
	// READ-ONLY; The time when this table event happened.
	EventTimestamp *string `json:"eventTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; The operation type of this table event.
	OperationType *OperationType `json:"operationType,omitempty" azure:"ro"`

	// READ-ONLY; The name of this Table.
	OwnerID *string `json:"ownerId,omitempty" azure:"ro"`

	// READ-ONLY; The resource ID of this Table.
	OwnerResourceID *string `json:"ownerResourceId,omitempty" azure:"ro"`

	// READ-ONLY; A system generated property. A unique identifier.
	Rid *string `json:"_rid,omitempty" azure:"ro"`
}

RestorableTablePropertiesResource - The resource of an Azure Cosmos DB Table event

type RestorableTableResourcesClient added in v0.4.0

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

RestorableTableResourcesClient contains the methods for the RestorableTableResources group. Don't use this type directly, use NewRestorableTableResourcesClient() instead.

func NewRestorableTableResourcesClient added in v0.4.0

func NewRestorableTableResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTableResourcesClient, error)

NewRestorableTableResourcesClient creates a new instance of RestorableTableResourcesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableTableResourcesClient) NewListPager added in v0.5.0

NewListPager - Return a list of tables that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview location - Cosmos DB region, with spaces between words and each word capitalized. instanceID - The instanceId GUID of a restorable database account. options - RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBRestorableTableResourceList.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.NewRestorableTableResourcesClient("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.RestorableTableResourcesClientListOptions{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 RestorableTableResourcesClientListOptions added in v0.4.0

type RestorableTableResourcesClientListOptions struct {
	// The location where the restorable resources are located.
	RestoreLocation *string
	// The timestamp when the restorable resources existed.
	RestoreTimestampInUTC *string
}

RestorableTableResourcesClientListOptions contains the optional parameters for the RestorableTableResourcesClient.List method.

type RestorableTableResourcesClientListResponse added in v0.4.0

type RestorableTableResourcesClientListResponse struct {
	RestorableTableResourcesListResult
}

RestorableTableResourcesClientListResponse contains the response from method RestorableTableResourcesClient.List.

type RestorableTableResourcesListResult added in v0.4.0

type RestorableTableResourcesListResult struct {
	// READ-ONLY; List of restorable table names.
	Value []*string `json:"value,omitempty" azure:"ro"`
}

RestorableTableResourcesListResult - List of restorable table names.

type RestorableTablesClient added in v0.4.0

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

RestorableTablesClient contains the methods for the RestorableTables group. Don't use this type directly, use NewRestorableTablesClient() instead.

func NewRestorableTablesClient added in v0.4.0

func NewRestorableTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTablesClient, error)

NewRestorableTablesClient creates a new instance of RestorableTablesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RestorableTablesClient) NewListPager added in v0.5.0

NewListPager - Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/…/read' permission If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview location - Cosmos DB region, with spaces between words and each word capitalized. instanceID - The instanceId GUID of a restorable database account. options - RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBRestorableTableList.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.NewRestorableTablesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("WestUS",
		"98a570f2-63db-4117-91f0-366327b7b353",
		&armcosmos.RestorableTablesClientListOptions{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 RestorableTablesClientListOptions added in v0.4.0

type RestorableTablesClientListOptions struct {
	// Restorable Tables event feed end time.
	EndTime *string
	// Restorable Tables event feed start time.
	StartTime *string
}

RestorableTablesClientListOptions contains the optional parameters for the RestorableTablesClient.List method.

type RestorableTablesClientListResponse added in v0.4.0

type RestorableTablesClientListResponse struct {
	RestorableTablesListResult
}

RestorableTablesClientListResponse contains the response from method RestorableTablesClient.List.

type RestorableTablesListResult added in v0.4.0

type RestorableTablesListResult struct {
	// READ-ONLY; List of Table events and their properties.
	Value []*RestorableTableGetResult `json:"value,omitempty" azure:"ro"`
}

RestorableTablesListResult - The List operation response, that contains the Table events and their properties.

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"`

	// List of specific gremlin databases available for restore.
	GremlinDatabasesToRestore []*GremlinDatabaseRestoreResource `json:"gremlinDatabasesToRestore,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"`

	// List of specific tables available for restore.
	TablesToRestore []*string `json:"tablesToRestore,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 RetrieveThroughputParameters

type RetrieveThroughputParameters struct {
	// REQUIRED; Properties to retrieve throughput parameters object
	Properties *RetrieveThroughputProperties `json:"properties,omitempty"`

	// 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"`

	// 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"`
}

RetrieveThroughputParameters - Cosmos DB retrieve throughput parameters object

func (RetrieveThroughputParameters) MarshalJSON

func (r RetrieveThroughputParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RetrieveThroughputParameters.

type RetrieveThroughputProperties

type RetrieveThroughputProperties struct {
	// REQUIRED; The standard JSON format of a resource throughput
	Resource *RetrieveThroughputPropertiesResource `json:"resource,omitempty"`
}

RetrieveThroughputProperties - Properties to retrieve throughput for Azure Cosmos DB resource.

type RetrieveThroughputPropertiesResource

type RetrieveThroughputPropertiesResource struct {
	// REQUIRED; Array of PhysicalPartitionId objects.
	PhysicalPartitionIDs []*PhysicalPartitionID `json:"physicalPartitionIds,omitempty"`
}

RetrieveThroughputPropertiesResource - Resource to retrieve throughput information for Cosmos DB resource

func (RetrieveThroughputPropertiesResource) MarshalJSON

func (r RetrieveThroughputPropertiesResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RetrieveThroughputPropertiesResource.

type Role added in v0.4.0

type Role struct {
	// The database name the role is applied.
	Db *string `json:"db,omitempty"`

	// The role name.
	Role *string `json:"role,omitempty"`
}

Role - The set of roles permitted through this Role Definition.

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"`

	// 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"`

	// 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 client encryption policy for the container.
	ClientEncryptionPolicy *ClientEncryptionPolicy `json:"clientEncryptionPolicy,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 {
	// 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"`

	// 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 client encryption policy for the container.
	ClientEncryptionPolicy *ClientEncryptionPolicy `json:"clientEncryptionPolicy,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 SQLDataTransferDataSourceSink added in v0.4.0

type SQLDataTransferDataSourceSink struct {
	// REQUIRED
	Component *DataTransferComponent `json:"component,omitempty"`

	// REQUIRED
	ContainerName *string `json:"containerName,omitempty"`

	// REQUIRED
	DatabaseName *string `json:"databaseName,omitempty"`
}

SQLDataTransferDataSourceSink - A CosmosDB Cassandra API data source/sink

func (*SQLDataTransferDataSourceSink) GetDataTransferDataSourceSink added in v0.4.0

func (s *SQLDataTransferDataSourceSink) GetDataTransferDataSourceSink() *DataTransferDataSourceSink

GetDataTransferDataSourceSink implements the DataTransferDataSourceSinkClassification interface for type SQLDataTransferDataSourceSink.

func (SQLDataTransferDataSourceSink) MarshalJSON added in v0.4.0

func (s SQLDataTransferDataSourceSink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SQLDataTransferDataSourceSink.

func (*SQLDataTransferDataSourceSink) UnmarshalJSON added in v0.4.0

func (s *SQLDataTransferDataSourceSink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SQLDataTransferDataSourceSink.

type SQLDatabaseCreateUpdateParameters

type SQLDatabaseCreateUpdateParameters struct {
	// REQUIRED; Properties to create and update Azure Cosmos DB SQL database.
	Properties *SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"`

	// 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"`

	// 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 {
	// 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"`

	// 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 SQLDedicatedGatewayRegionalServiceResource

type SQLDedicatedGatewayRegionalServiceResource struct {
	// READ-ONLY; The location name.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The regional service name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The regional endpoint for SqlDedicatedGateway.
	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

SQLDedicatedGatewayRegionalServiceResource - Resource for a regional service location.

type SQLDedicatedGatewayServiceResource

type SQLDedicatedGatewayServiceResource struct {
	// Properties for SqlDedicatedGatewayServiceResource.
	Properties *SQLDedicatedGatewayServiceResourceProperties `json:"properties,omitempty"`
}

SQLDedicatedGatewayServiceResource - Describes the service response property for SqlDedicatedGateway.

type SQLDedicatedGatewayServiceResourceProperties

type SQLDedicatedGatewayServiceResourceProperties struct {
	// REQUIRED; ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// SqlDedicatedGateway endpoint for the service.
	SQLDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"`

	// READ-ONLY; Time of the last state change (ISO-8601 format).
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; An array that contains all of the locations for the service.
	Locations []*SQLDedicatedGatewayRegionalServiceResource `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

SQLDedicatedGatewayServiceResourceProperties - Properties for SqlDedicatedGatewayServiceResource.

func (*SQLDedicatedGatewayServiceResourceProperties) GetServiceResourceProperties added in v0.4.0

GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type SQLDedicatedGatewayServiceResourceProperties.

func (SQLDedicatedGatewayServiceResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type SQLDedicatedGatewayServiceResourceProperties.

func (*SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON

func (s *SQLDedicatedGatewayServiceResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SQLDedicatedGatewayServiceResourceProperties.

type SQLResourcesClient

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

SQLResourcesClient contains the methods for the SQLResources group. Don't use this type directly, use NewSQLResourcesClient() instead.

func NewSQLResourcesClient

func NewSQLResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLResourcesClient, error)

NewSQLResourcesClient creates a new instance of SQLResourcesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SQLResourcesClient) BeginCreateUpdateClientEncryptionKey added in v0.4.0

func (client *SQLResourcesClient) BeginCreateUpdateClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, createUpdateClientEncryptionKeyParameters ClientEncryptionKeyCreateUpdateParameters, options *SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions) (*runtime.Poller[SQLResourcesClientCreateUpdateClientEncryptionKeyResponse], error)

BeginCreateUpdateClientEncryptionKey - Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure Powershell (instead of directly). If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. databaseName - Cosmos DB database name. clientEncryptionKeyName - Cosmos DB ClientEncryptionKey name. createUpdateClientEncryptionKeyParameters - The parameters to provide for the client encryption key. options - SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateClientEncryptionKey method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlClientEncryptionKeyCreateUpdate.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.BeginCreateUpdateClientEncryptionKey(ctx,
		"rgName",
		"accountName",
		"databaseName",
		"cekName",
		armcosmos.ClientEncryptionKeyCreateUpdateParameters{
			Properties: &armcosmos.ClientEncryptionKeyCreateUpdateProperties{
				Resource: &armcosmos.ClientEncryptionKeyResource{
					EncryptionAlgorithm: to.Ptr("AEAD_AES_256_CBC_HMAC_SHA256"),
					ID:                  to.Ptr("cekName"),
					KeyWrapMetadata: &armcosmos.KeyWrapMetadata{
						Name:      to.Ptr("customerManagedKey"),
						Type:      to.Ptr("AzureKeyVault"),
						Algorithm: to.Ptr("RSA-OAEP"),
						Value:     to.Ptr("AzureKeyVault Key URL"),
					},
					WrappedDataEncryptionKey: []byte("This is actually an array of bytes. This request/response is being presented as a string for readability in the example"),
				},
			},
		},
		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) 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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) BeginListSQLContainerPartitionMerge added in v0.4.0

func (client *SQLResourcesClient) BeginListSQLContainerPartitionMerge(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, mergeParameters MergeParameters, options *SQLResourcesClientBeginListSQLContainerPartitionMergeOptions) (*runtime.Poller[SQLResourcesClientListSQLContainerPartitionMergeResponse], error)

BeginListSQLContainerPartitionMerge - Merges the partitions of a SQL Container If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. mergeParameters - The parameters for the merge operation. options - SQLResourcesClientBeginListSQLContainerPartitionMergeOptions contains the optional parameters for the SQLResourcesClient.BeginListSQLContainerPartitionMerge 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginSQLContainerRedistributeThroughput

func (client *SQLResourcesClient) BeginSQLContainerRedistributeThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, redistributeThroughputParameters RedistributeThroughputParameters, options *SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRedistributeThroughputResponse], error)

BeginSQLContainerRedistributeThroughput - Redistribute throughput for an Azure Cosmos DB SQL container If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. redistributeThroughputParameters - The parameters to provide for redistributing throughput for the current SQL container. options - SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRedistributeThroughput method.

func (*SQLResourcesClient) BeginSQLContainerRetrieveThroughputDistribution

func (client *SQLResourcesClient) BeginSQLContainerRetrieveThroughputDistribution(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, retrieveThroughputParameters RetrieveThroughputParameters, options *SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions) (*runtime.Poller[SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse], error)

BeginSQLContainerRetrieveThroughputDistribution - Retrieve throughput distribution for an Azure Cosmos DB SQL container If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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. retrieveThroughputParameters - The parameters to provide for retrieving throughput distribution for the current SQL container. options - SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution method.

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 2022-02-15-preview 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 2022-02-15-preview 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) GetClientEncryptionKey added in v0.4.0

func (client *SQLResourcesClient) GetClientEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, databaseName string, clientEncryptionKeyName string, options *SQLResourcesClientGetClientEncryptionKeyOptions) (SQLResourcesClientGetClientEncryptionKeyResponse, error)

GetClientEncryptionKey - Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. databaseName - Cosmos DB database name. clientEncryptionKeyName - Cosmos DB ClientEncryptionKey name. options - SQLResourcesClientGetClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.GetClientEncryptionKey method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlClientEncryptionKeyGet.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.NewSQLResourcesClient("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetClientEncryptionKey(ctx,
		"rgName",
		"accountName",
		"databaseName",
		"cekName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SQLResourcesClient) GetSQLContainer

func (client *SQLResourcesClient) GetSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, options *SQLResourcesClientGetSQLContainerOptions) (SQLResourcesClientGetSQLContainerResponse, error)

GetSQLContainer - Gets the SQL container under an existing Azure Cosmos DB database account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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) NewListClientEncryptionKeysPager added in v0.5.0

func (client *SQLResourcesClient) NewListClientEncryptionKeysPager(resourceGroupName string, accountName string, databaseName string, options *SQLResourcesClientListClientEncryptionKeysOptions) *runtime.Pager[SQLResourcesClientListClientEncryptionKeysResponse]

NewListClientEncryptionKeysPager - Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. databaseName - Cosmos DB database name. options - SQLResourcesClientListClientEncryptionKeysOptions contains the optional parameters for the SQLResourcesClient.ListClientEncryptionKeys method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlClientEncryptionKeysList.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.NewSQLResourcesClient("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListClientEncryptionKeysPager("rgName",
		"accountName",
		"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 (*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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 2022-02-15-preview 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 SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions added in v0.4.0

type SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SQLResourcesClientBeginCreateUpdateClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.BeginCreateUpdateClientEncryptionKey method.

type SQLResourcesClientBeginCreateUpdateSQLContainerOptions 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 SQLResourcesClientBeginListSQLContainerPartitionMergeOptions added in v0.4.0

type SQLResourcesClientBeginListSQLContainerPartitionMergeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SQLResourcesClientBeginListSQLContainerPartitionMergeOptions contains the optional parameters for the SQLResourcesClient.BeginListSQLContainerPartitionMerge 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 SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions

type SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SQLResourcesClientBeginSQLContainerRedistributeThroughputOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRedistributeThroughput method.

type SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions

type SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

SQLResourcesClientBeginSQLContainerRetrieveThroughputDistributionOptions contains the optional parameters for the SQLResourcesClient.BeginSQLContainerRetrieveThroughputDistribution 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 SQLResourcesClientCreateUpdateClientEncryptionKeyResponse added in v0.4.0

type SQLResourcesClientCreateUpdateClientEncryptionKeyResponse struct {
	ClientEncryptionKeyGetResults
}

SQLResourcesClientCreateUpdateClientEncryptionKeyResponse contains the response from method SQLResourcesClient.CreateUpdateClientEncryptionKey.

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 SQLResourcesClientGetClientEncryptionKeyOptions added in v0.4.0

type SQLResourcesClientGetClientEncryptionKeyOptions struct {
}

SQLResourcesClientGetClientEncryptionKeyOptions contains the optional parameters for the SQLResourcesClient.GetClientEncryptionKey method.

type SQLResourcesClientGetClientEncryptionKeyResponse added in v0.4.0

type SQLResourcesClientGetClientEncryptionKeyResponse struct {
	ClientEncryptionKeyGetResults
}

SQLResourcesClientGetClientEncryptionKeyResponse contains the response from method SQLResourcesClient.GetClientEncryptionKey.

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 SQLResourcesClientListClientEncryptionKeysOptions added in v0.4.0

type SQLResourcesClientListClientEncryptionKeysOptions struct {
}

SQLResourcesClientListClientEncryptionKeysOptions contains the optional parameters for the SQLResourcesClient.ListClientEncryptionKeys method.

type SQLResourcesClientListClientEncryptionKeysResponse added in v0.4.0

type SQLResourcesClientListClientEncryptionKeysResponse struct {
	ClientEncryptionKeysListResult
}

SQLResourcesClientListClientEncryptionKeysResponse contains the response from method SQLResourcesClient.ListClientEncryptionKeys.

type SQLResourcesClientListSQLContainerPartitionMergeResponse added in v0.4.0

type SQLResourcesClientListSQLContainerPartitionMergeResponse struct {
	PhysicalPartitionStorageInfoCollection
}

SQLResourcesClientListSQLContainerPartitionMergeResponse contains the response from method SQLResourcesClient.ListSQLContainerPartitionMerge.

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 SQLResourcesClientSQLContainerRedistributeThroughputResponse

type SQLResourcesClientSQLContainerRedistributeThroughputResponse struct {
	PhysicalPartitionThroughputInfoResult
}

SQLResourcesClientSQLContainerRedistributeThroughputResponse contains the response from method SQLResourcesClient.SQLContainerRedistributeThroughput.

type SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse

type SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse struct {
	PhysicalPartitionThroughputInfoResult
}

SQLResourcesClientSQLContainerRetrieveThroughputDistributionResponse contains the response from method SQLResourcesClient.SQLContainerRetrieveThroughputDistribution.

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"`

	// 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"`

	// 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

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 {
	// 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"`

	// 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"`

	// 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"`

	// 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 {
	// 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"`

	// 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"`

	// 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"`

	// 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

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 {
	// 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"`

	// 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 ServiceClient

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

ServiceClient contains the methods for the Service group. Don't use this type directly, use NewServiceClient() instead.

func NewServiceClient

func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error)

NewServiceClient creates a new instance of ServiceClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ServiceClient) BeginCreate

func (client *ServiceClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, serviceName string, createUpdateParameters ServiceResourceCreateUpdateParameters, options *ServiceClientBeginCreateOptions) (*runtime.Poller[ServiceClientCreateResponse], error)

BeginCreate - Creates a service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. serviceName - Cosmos DB service name. createUpdateParameters - The Service resource parameters. options - ServiceClientBeginCreateOptions contains the optional parameters for the ServiceClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBDataTransferServiceCreate.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.NewServiceClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"rg1",
		"ddb1",
		"DataTransfer",
		armcosmos.ServiceResourceCreateUpdateParameters{
			Properties: &armcosmos.ServiceResourceCreateUpdateProperties{
				InstanceCount: to.Ptr[int32](1),
				InstanceSize:  to.Ptr(armcosmos.ServiceSizeCosmosD4S),
				ServiceType:   to.Ptr(armcosmos.ServiceTypeDataTransfer),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ServiceClient) BeginDelete

func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*runtime.Poller[ServiceClientDeleteResponse], error)

BeginDelete - Deletes service with the given serviceName. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. serviceName - Cosmos DB service name. options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBDataTransferServiceDelete.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.NewServiceClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rg1",
		"ddb1",
		"DataTransfer",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ServiceClient) Get

func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, accountName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error)

Get - Gets the status of service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. serviceName - Cosmos DB service name. options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBDataTransferServiceGet.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.NewServiceClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rg1",
		"ddb1",
		"DataTransfer",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ServiceClient) NewListPager added in v0.5.0

func (client *ServiceClient) NewListPager(resourceGroupName string, accountName string, options *ServiceClientListOptions) *runtime.Pager[ServiceClientListResponse]

NewListPager - Gets the status of service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. options - ServiceClientListOptions contains the optional parameters for the ServiceClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBServicesList.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.NewServiceClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("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 ServiceClientBeginCreateOptions added in v0.4.0

type ServiceClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServiceClientBeginCreateOptions contains the optional parameters for the ServiceClient.BeginCreate method.

type ServiceClientBeginDeleteOptions added in v0.4.0

type ServiceClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.

type ServiceClientCreateResponse added in v0.4.0

type ServiceClientCreateResponse struct {
	ServiceResource
}

ServiceClientCreateResponse contains the response from method ServiceClient.Create.

type ServiceClientDeleteResponse added in v0.4.0

type ServiceClientDeleteResponse struct {
}

ServiceClientDeleteResponse contains the response from method ServiceClient.Delete.

type ServiceClientGetOptions added in v0.4.0

type ServiceClientGetOptions struct {
}

ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.

type ServiceClientGetResponse added in v0.4.0

type ServiceClientGetResponse struct {
	ServiceResource
}

ServiceClientGetResponse contains the response from method ServiceClient.Get.

type ServiceClientListOptions added in v0.4.0

type ServiceClientListOptions struct {
}

ServiceClientListOptions contains the optional parameters for the ServiceClient.List method.

type ServiceClientListResponse added in v0.4.0

type ServiceClientListResponse struct {
	ServiceResourceListResult
}

ServiceClientListResponse contains the response from method ServiceClient.List.

type ServiceResource

type ServiceResource struct {
	// Services response resource.
	Properties ServiceResourcePropertiesClassification `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"`
}

ServiceResource - Properties for the database account.

func (ServiceResource) MarshalJSON

func (s ServiceResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceResource.

func (*ServiceResource) UnmarshalJSON

func (s *ServiceResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.

type ServiceResourceCreateUpdateParameters

type ServiceResourceCreateUpdateParameters struct {
	// Properties in ServiceResourceCreateUpdateParameters.
	Properties *ServiceResourceCreateUpdateProperties `json:"properties,omitempty"`
}

ServiceResourceCreateUpdateParameters - Parameters for Create or Update Request for ServiceResource

type ServiceResourceCreateUpdateProperties

type ServiceResourceCreateUpdateProperties struct {
	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`
}

ServiceResourceCreateUpdateProperties - Properties in ServiceResourceCreateUpdateParameters.

type ServiceResourceListResult

type ServiceResourceListResult struct {
	// READ-ONLY; List of Service Resource and their properties.
	Value []*ServiceResource `json:"value,omitempty" azure:"ro"`
}

ServiceResourceListResult - The List operation response, that contains the Service Resource and their properties.

type ServiceResourceProperties

type ServiceResourceProperties struct {
	// REQUIRED; ServiceType for the service.
	ServiceType *ServiceType `json:"serviceType,omitempty"`

	// OPTIONAL; Contains additional key/value pairs not defined in the schema.
	AdditionalProperties map[string]interface{}

	// Instance count for the service.
	InstanceCount *int32 `json:"instanceCount,omitempty"`

	// Instance type for the service.
	InstanceSize *ServiceSize `json:"instanceSize,omitempty"`

	// READ-ONLY; Time of the last state change (ISO-8601 format).
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; Describes the status of a service.
	Status *ServiceStatus `json:"status,omitempty" azure:"ro"`
}

ServiceResourceProperties - Services response resource.

func (*ServiceResourceProperties) GetServiceResourceProperties

func (s *ServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties

GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type ServiceResourceProperties.

func (ServiceResourceProperties) MarshalJSON added in v0.4.0

func (s ServiceResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceResourceProperties.

func (*ServiceResourceProperties) UnmarshalJSON

func (s *ServiceResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceProperties.

type ServiceResourcePropertiesClassification

type ServiceResourcePropertiesClassification interface {
	// GetServiceResourceProperties returns the ServiceResourceProperties content of the underlying type.
	GetServiceResourceProperties() *ServiceResourceProperties
}

ServiceResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetServiceResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DataTransferServiceResourceProperties, *GraphAPIComputeServiceResourceProperties, *MaterializedViewsBuilderServiceResourceProperties, - *SQLDedicatedGatewayServiceResourceProperties, *ServiceResourceProperties

type ServiceSize

type ServiceSize string

ServiceSize - Instance type for the service.

const (
	ServiceSizeCosmosD16S ServiceSize = "Cosmos.D16s"
	ServiceSizeCosmosD4S  ServiceSize = "Cosmos.D4s"
	ServiceSizeCosmosD8S  ServiceSize = "Cosmos.D8s"
)

func PossibleServiceSizeValues

func PossibleServiceSizeValues() []ServiceSize

PossibleServiceSizeValues returns the possible values for the ServiceSize const type.

type ServiceStatus

type ServiceStatus string

ServiceStatus - Describes the status of a service.

const (
	ServiceStatusCreating ServiceStatus = "Creating"
	ServiceStatusDeleting ServiceStatus = "Deleting"
	ServiceStatusError    ServiceStatus = "Error"
	ServiceStatusRunning  ServiceStatus = "Running"
	ServiceStatusStopped  ServiceStatus = "Stopped"
	ServiceStatusUpdating ServiceStatus = "Updating"
)

func PossibleServiceStatusValues

func PossibleServiceStatusValues() []ServiceStatus

PossibleServiceStatusValues returns the possible values for the ServiceStatus const type.

type ServiceType

type ServiceType string

ServiceType - ServiceType for the service.

const (
	ServiceTypeDataTransfer             ServiceType = "DataTransfer"
	ServiceTypeGraphAPICompute          ServiceType = "GraphAPICompute"
	ServiceTypeMaterializedViewsBuilder ServiceType = "MaterializedViewsBuilder"
	ServiceTypeSQLDedicatedGateway      ServiceType = "SqlDedicatedGateway"
)

func PossibleServiceTypeValues

func PossibleServiceTypeValues() []ServiceType

PossibleServiceTypeValues returns the possible values for the ServiceType const type.

type SpatialSpec

type SpatialSpec struct {
	// The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)
	Path *string `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"`

	// 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"`

	// 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 {
	// 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"`

	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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

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 2022-02-15-preview 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/preview/2022-02-15-preview/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) BeginRetrieveContinuousBackupInformation added in v0.4.0

BeginRetrieveContinuousBackupInformation - Retrieves continuous backup information for a table. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-02-15-preview resourceGroupName - The name of the resource group. The name is case insensitive. accountName - Cosmos DB database account name. tableName - Cosmos DB table name. location - The name of the continuous backup restore location. options - TableResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the TableResourcesClient.BeginRetrieveContinuousBackupInformation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBTableBackupInformation.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.BeginRetrieveContinuousBackupInformation(ctx,
		"rgName",
		"ddb1",
		"tableName1",
		armcosmos.ContinuousBackupRestoreLocation{
			Location: to.Ptr("North Europe"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// 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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 2022-02-15-preview 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/preview/2022-02-15-preview/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 TableResourcesClientBeginRetrieveContinuousBackupInformationOptions added in v0.4.0

type TableResourcesClientBeginRetrieveContinuousBackupInformationOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TableResourcesClientBeginRetrieveContinuousBackupInformationOptions contains the optional parameters for the TableResourcesClient.BeginRetrieveContinuousBackupInformation method.

type TableResourcesClientBeginUpdateTableThroughputOptions 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 TableResourcesClientRetrieveContinuousBackupInformationResponse added in v0.4.0

type TableResourcesClientRetrieveContinuousBackupInformationResponse struct {
	BackupInformation
}

TableResourcesClientRetrieveContinuousBackupInformationResponse contains the response from method TableResourcesClient.RetrieveContinuousBackupInformation.

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 ThroughputPolicyType

type ThroughputPolicyType string

ThroughputPolicyType - ThroughputPolicy to apply for throughput redistribution

const (
	ThroughputPolicyTypeCustom ThroughputPolicyType = "custom"
	ThroughputPolicyTypeEqual  ThroughputPolicyType = "equal"
	ThroughputPolicyTypeNone   ThroughputPolicyType = "none"
)

func PossibleThroughputPolicyTypeValues

func PossibleThroughputPolicyTypeValues() []ThroughputPolicyType

PossibleThroughputPolicyTypeValues returns the possible values for the ThroughputPolicyType const type.

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 {
	// 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"`

	// 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"`

	// 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"`

	// 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

func (u UniqueKey) MarshalJSON() ([]byte, error)

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.

const (
	UnitTypeBytes          UnitType = "Bytes"
	UnitTypeBytesPerSecond UnitType = "BytesPerSecond"
	UnitTypeCount          UnitType = "Count"
	UnitTypeCountPerSecond UnitType = "CountPerSecond"
	UnitTypeMilliseconds   UnitType = "Milliseconds"
	UnitTypePercent        UnitType = "Percent"
	UnitTypeSeconds        UnitType = "Seconds"
)

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

Jump to

Keyboard shortcuts

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