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/2024-05-15/restorables Documentation

The restorables SDK allows for interaction with the Azure Resource Manager Service cosmosdb (API Version 2024-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/2024-05-15/restorables"

Client Initialization

client := restorables.NewRestorablesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RestorablesClient.GremlinResourcesRetrieveContinuousBackupInformation

ctx := context.TODO()
id := restorables.NewGraphID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "gremlinDatabaseValue", "graphValue")

payload := restorables.ContinuousBackupRestoreLocation{
	// ...
}


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

Example Usage: RestorablesClient.MongoDBResourcesRetrieveContinuousBackupInformation

ctx := context.TODO()
id := restorables.NewMongodbDatabaseCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "mongodbDatabaseValue", "collectionValue")

payload := restorables.ContinuousBackupRestoreLocation{
	// ...
}


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

Example Usage: RestorablesClient.RestorableDatabaseAccountsGetByLocation

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableDatabaseAccountsList

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

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

Example Usage: RestorablesClient.RestorableDatabaseAccountsListByLocation

ctx := context.TODO()
id := restorables.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

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

Example Usage: RestorablesClient.RestorableGremlinDatabasesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableGremlinGraphsList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableGremlinResourcesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableMongodbCollectionsList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableMongodbDatabasesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableMongodbResourcesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableSqlContainersList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableSqlDatabasesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableSqlResourcesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableTableResourcesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.RestorableTablesList

ctx := context.TODO()
id := restorables.NewRestorableDatabaseAccountID("12345678-1234-9876-4563-123456789012", "locationValue", "instanceIdValue")

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

Example Usage: RestorablesClient.SqlResourcesRetrieveContinuousBackupInformation

ctx := context.TODO()
id := restorables.NewContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "sqlDatabaseValue", "containerValue")

payload := restorables.ContinuousBackupRestoreLocation{
	// ...
}


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

Example Usage: RestorablesClient.TableResourcesRetrieveContinuousBackupInformation

ctx := context.TODO()
id := restorables.NewTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "tableValue")

payload := restorables.ContinuousBackupRestoreLocation{
	// ...
}


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