managedrestorabledroppeddatabasebackupshorttermretentionpolicies

package
v0.20230901.1170029 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2017-03-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies Documentation

The managedrestorabledroppeddatabasebackupshorttermretentionpolicies SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2017-03-01-preview).

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-sdk/resource-manager/sql/2017-03-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies"

Client Initialization

client := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.CreateOrUpdate

ctx := context.TODO()
id := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "restorableDroppedDatabaseIdValue")

payload := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{
	// ...
}


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

Example Usage: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get

ctx := context.TODO()
id := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "restorableDroppedDatabaseIdValue")

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

Example Usage: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.ListByRestorableDroppedDatabase

ctx := context.TODO()
id := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "restorableDroppedDatabaseIdValue")

// alternatively `client.ListByRestorableDroppedDatabase(ctx, id)` can be used to do batched pagination
items, err := client.ListByRestorableDroppedDatabaseComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Update

ctx := context.TODO()
id := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.NewRestorableDroppedDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "restorableDroppedDatabaseIdValue")

payload := managedrestorabledroppeddatabasebackupshorttermretentionpolicies.ManagedBackupShortTermRetentionPolicy{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRestorableDroppedDatabaseID

func ValidateRestorableDroppedDatabaseID(input interface{}, key string) (warnings []string, errors []error)

ValidateRestorableDroppedDatabaseID checks that 'input' can be parsed as a Restorable Dropped Database ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedBackupShortTermRetentionPolicy
}

type ListByRestorableDroppedDatabaseCompleteResult

type ListByRestorableDroppedDatabaseCompleteResult struct {
	Items []ManagedBackupShortTermRetentionPolicy
}

type ListByRestorableDroppedDatabaseOperationResponse

type ListByRestorableDroppedDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedBackupShortTermRetentionPolicy
}

type ManagedBackupShortTermRetentionPolicy

type ManagedBackupShortTermRetentionPolicy struct {
	Id         *string                                          `json:"id,omitempty"`
	Name       *string                                          `json:"name,omitempty"`
	Properties *ManagedBackupShortTermRetentionPolicyProperties `json:"properties,omitempty"`
	Type       *string                                          `json:"type,omitempty"`
}

type ManagedBackupShortTermRetentionPolicyOperationPredicate

type ManagedBackupShortTermRetentionPolicyOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ManagedBackupShortTermRetentionPolicyOperationPredicate) Matches

type ManagedBackupShortTermRetentionPolicyProperties

type ManagedBackupShortTermRetentionPolicyProperties struct {
	RetentionDays *int64 `json:"retentionDays,omitempty"`
}

type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient

type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI

func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error)

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get

Get ...

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabase

ListByRestorableDroppedDatabase ...

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabaseComplete

ListByRestorableDroppedDatabaseComplete retrieves all the results into a single object

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabaseCompleteMatchingPredicate

ListByRestorableDroppedDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Update

Update ...

func (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type RestorableDroppedDatabaseId

type RestorableDroppedDatabaseId struct {
	SubscriptionId              string
	ResourceGroupName           string
	ManagedInstanceName         string
	RestorableDroppedDatabaseId string
}

RestorableDroppedDatabaseId is a struct representing the Resource ID for a Restorable Dropped Database

func NewRestorableDroppedDatabaseID

func NewRestorableDroppedDatabaseID(subscriptionId string, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseId string) RestorableDroppedDatabaseId

NewRestorableDroppedDatabaseID returns a new RestorableDroppedDatabaseId struct

func ParseRestorableDroppedDatabaseID

func ParseRestorableDroppedDatabaseID(input string) (*RestorableDroppedDatabaseId, error)

ParseRestorableDroppedDatabaseID parses 'input' into a RestorableDroppedDatabaseId

func ParseRestorableDroppedDatabaseIDInsensitively

func ParseRestorableDroppedDatabaseIDInsensitively(input string) (*RestorableDroppedDatabaseId, error)

ParseRestorableDroppedDatabaseIDInsensitively parses 'input' case-insensitively into a RestorableDroppedDatabaseId note: this method should only be used for API response data and not user input

func (RestorableDroppedDatabaseId) ID

ID returns the formatted Restorable Dropped Database ID

func (RestorableDroppedDatabaseId) Segments

Segments returns a slice of Resource ID Segments which comprise this Restorable Dropped Database ID

func (RestorableDroppedDatabaseId) String

func (id RestorableDroppedDatabaseId) String() string

String returns a human-readable description of this Restorable Dropped Database ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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