snapshots

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2024-05-01/snapshots Documentation

The snapshots SDK allows for interaction with Azure Resource Manager appconfiguration (API Version 2024-05-01).

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/appconfiguration/2024-05-01/snapshots"

Client Initialization

client := snapshots.NewSnapshotsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SnapshotsClient.Create

ctx := context.TODO()
id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationStoreName", "snapshotName")

payload := snapshots.Snapshot{
	// ...
}


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

Example Usage: SnapshotsClient.Get

ctx := context.TODO()
id := snapshots.NewSnapshotID("12345678-1234-9876-4563-123456789012", "example-resource-group", "configurationStoreName", "snapshotName")

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCompositionType

func PossibleValuesForCompositionType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSnapshotStatus

func PossibleValuesForSnapshotStatus() []string

func ValidateSnapshotID

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

ValidateSnapshotID checks that 'input' can be parsed as a Snapshot ID

Types

type CompositionType

type CompositionType string
const (
	CompositionTypeKey      CompositionType = "Key"
	CompositionTypeKeyLabel CompositionType = "Key_Label"
)

func (*CompositionType) UnmarshalJSON

func (s *CompositionType) UnmarshalJSON(bytes []byte) error

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Snapshot
}

type GetOperationResponse

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

type KeyValueFilter

type KeyValueFilter struct {
	Key   string  `json:"key"`
	Label *string `json:"label,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type Snapshot

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

type SnapshotId

type SnapshotId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ConfigurationStoreName string
	SnapshotName           string
}

SnapshotId is a struct representing the Resource ID for a Snapshot

func NewSnapshotID

func NewSnapshotID(subscriptionId string, resourceGroupName string, configurationStoreName string, snapshotName string) SnapshotId

NewSnapshotID returns a new SnapshotId struct

func ParseSnapshotID

func ParseSnapshotID(input string) (*SnapshotId, error)

ParseSnapshotID parses 'input' into a SnapshotId

func ParseSnapshotIDInsensitively

func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error)

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

func (*SnapshotId) FromParseResult

func (id *SnapshotId) FromParseResult(input resourceids.ParseResult) error

func (SnapshotId) ID

func (id SnapshotId) ID() string

ID returns the formatted Snapshot ID

func (SnapshotId) Segments

func (id SnapshotId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Snapshot ID

func (SnapshotId) String

func (id SnapshotId) String() string

String returns a human-readable description of this Snapshot ID

type SnapshotProperties

type SnapshotProperties struct {
	CompositionType   *CompositionType   `json:"compositionType,omitempty"`
	Created           *string            `json:"created,omitempty"`
	Etag              *string            `json:"etag,omitempty"`
	Expires           *string            `json:"expires,omitempty"`
	Filters           []KeyValueFilter   `json:"filters"`
	ItemsCount        *int64             `json:"itemsCount,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	RetentionPeriod   *int64             `json:"retentionPeriod,omitempty"`
	Size              *int64             `json:"size,omitempty"`
	Status            *SnapshotStatus    `json:"status,omitempty"`
	Tags              *map[string]string `json:"tags,omitempty"`
}

func (*SnapshotProperties) GetCreatedAsTime

func (o *SnapshotProperties) GetCreatedAsTime() (*time.Time, error)

func (*SnapshotProperties) GetExpiresAsTime

func (o *SnapshotProperties) GetExpiresAsTime() (*time.Time, error)

func (*SnapshotProperties) SetCreatedAsTime

func (o *SnapshotProperties) SetCreatedAsTime(input time.Time)

func (*SnapshotProperties) SetExpiresAsTime

func (o *SnapshotProperties) SetExpiresAsTime(input time.Time)

type SnapshotStatus

type SnapshotStatus string
const (
	SnapshotStatusArchived     SnapshotStatus = "Archived"
	SnapshotStatusFailed       SnapshotStatus = "Failed"
	SnapshotStatusProvisioning SnapshotStatus = "Provisioning"
	SnapshotStatusReady        SnapshotStatus = "Ready"
)

func (*SnapshotStatus) UnmarshalJSON

func (s *SnapshotStatus) UnmarshalJSON(bytes []byte) error

type SnapshotsClient

type SnapshotsClient struct {
	Client *resourcemanager.Client
}

func NewSnapshotsClientWithBaseURI

func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error)

func (SnapshotsClient) Create

func (c SnapshotsClient) Create(ctx context.Context, id SnapshotId, input Snapshot) (result CreateOperationResponse, err error)

Create ...

func (SnapshotsClient) CreateThenPoll

func (c SnapshotsClient) CreateThenPoll(ctx context.Context, id SnapshotId, input Snapshot) error

CreateThenPoll performs Create then polls until it's completed

func (SnapshotsClient) Get

func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOperationResponse, err error)

Get ...

Jump to

Keyboard shortcuts

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