package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

# README

github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/managedcassandras Documentation

The managedcassandras SDK allows for interaction with the Azure Resource Manager Service cosmosdb (API Version 2022-05-15).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/managedcassandras"

Client Initialization

client := managedcassandras.NewManagedCassandrasClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedCassandrasClient.CassandraClustersCreateUpdate

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

payload := managedcassandras.ClusterResource{
	// ...
}


if err := client.CassandraClustersCreateUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraClustersDeallocate

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

if err := client.CassandraClustersDeallocateThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraClustersDelete

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

if err := client.CassandraClustersDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraClustersGet

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

read, err := client.CassandraClustersGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraClustersInvokeCommand

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

payload := managedcassandras.CommandPostBody{
	// ...
}


if err := client.CassandraClustersInvokeCommandThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraClustersListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

read, err := client.CassandraClustersListByResourceGroup(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraClustersListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

read, err := client.CassandraClustersListBySubscription(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraClustersStart

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

if err := client.CassandraClustersStartThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraClustersStatus

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

read, err := client.CassandraClustersStatus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraClustersUpdate

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

payload := managedcassandras.ClusterResource{
	// ...
}


if err := client.CassandraClustersUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraDataCentersCreateUpdate

ctx := context.TODO()
id := managedcassandras.NewDataCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue", "dataCenterValue")

payload := managedcassandras.DataCenterResource{
	// ...
}


if err := client.CassandraDataCentersCreateUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraDataCentersDelete

ctx := context.TODO()
id := managedcassandras.NewDataCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue", "dataCenterValue")

if err := client.CassandraDataCentersDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ManagedCassandrasClient.CassandraDataCentersGet

ctx := context.TODO()
id := managedcassandras.NewDataCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue", "dataCenterValue")

read, err := client.CassandraDataCentersGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraDataCentersList

ctx := context.TODO()
id := managedcassandras.NewCassandraClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue")

read, err := client.CassandraDataCentersList(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedCassandrasClient.CassandraDataCentersUpdate

ctx := context.TODO()
id := managedcassandras.NewDataCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cassandraClusterValue", "dataCenterValue")

payload := managedcassandras.DataCenterResource{
	// ...
}


if err := client.CassandraDataCentersUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}