snapshotpolicy

package
v0.20240527.1094340 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy Documentation

The snapshotpolicy SDK allows for interaction with the Azure Resource Manager Service netapp (API Version 2023-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/netapp/2023-05-01/snapshotpolicy"

Client Initialization

client := snapshotpolicy.NewSnapshotPolicyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SnapshotPolicyClient.SnapshotPoliciesCreate

ctx := context.TODO()
id := snapshotpolicy.NewSnapshotPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "snapshotPolicyValue")

payload := snapshotpolicy.SnapshotPolicy{
	// ...
}


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

Example Usage: SnapshotPolicyClient.SnapshotPoliciesDelete

ctx := context.TODO()
id := snapshotpolicy.NewSnapshotPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "snapshotPolicyValue")

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

Example Usage: SnapshotPolicyClient.SnapshotPoliciesGet

ctx := context.TODO()
id := snapshotpolicy.NewSnapshotPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "snapshotPolicyValue")

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

Example Usage: SnapshotPolicyClient.SnapshotPoliciesList

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

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

Example Usage: SnapshotPolicyClient.SnapshotPoliciesUpdate

ctx := context.TODO()
id := snapshotpolicy.NewSnapshotPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "snapshotPolicyValue")

payload := snapshotpolicy.SnapshotPolicyPatch{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateNetAppAccountID

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

ValidateNetAppAccountID checks that 'input' can be parsed as a Net App Account ID

func ValidateSnapshotPolicyID

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

ValidateSnapshotPolicyID checks that 'input' can be parsed as a Snapshot Policy ID

Types

type DailySchedule

type DailySchedule struct {
	Hour            *int64 `json:"hour,omitempty"`
	Minute          *int64 `json:"minute,omitempty"`
	SnapshotsToKeep *int64 `json:"snapshotsToKeep,omitempty"`
	UsedBytes       *int64 `json:"usedBytes,omitempty"`
}

type HourlySchedule

type HourlySchedule struct {
	Minute          *int64 `json:"minute,omitempty"`
	SnapshotsToKeep *int64 `json:"snapshotsToKeep,omitempty"`
	UsedBytes       *int64 `json:"usedBytes,omitempty"`
}

type MonthlySchedule

type MonthlySchedule struct {
	DaysOfMonth     *string `json:"daysOfMonth,omitempty"`
	Hour            *int64  `json:"hour,omitempty"`
	Minute          *int64  `json:"minute,omitempty"`
	SnapshotsToKeep *int64  `json:"snapshotsToKeep,omitempty"`
	UsedBytes       *int64  `json:"usedBytes,omitempty"`
}

type NetAppAccountId

type NetAppAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
}

NetAppAccountId is a struct representing the Resource ID for a Net App Account

func NewNetAppAccountID

func NewNetAppAccountID(subscriptionId string, resourceGroupName string, netAppAccountName string) NetAppAccountId

NewNetAppAccountID returns a new NetAppAccountId struct

func ParseNetAppAccountID

func ParseNetAppAccountID(input string) (*NetAppAccountId, error)

ParseNetAppAccountID parses 'input' into a NetAppAccountId

func ParseNetAppAccountIDInsensitively

func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error)

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

func (*NetAppAccountId) FromParseResult

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

func (NetAppAccountId) ID

func (id NetAppAccountId) ID() string

ID returns the formatted Net App Account ID

func (NetAppAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Net App Account ID

func (NetAppAccountId) String

func (id NetAppAccountId) String() string

String returns a human-readable description of this Net App Account ID

type SnapshotPoliciesCreateOperationResponse

type SnapshotPoliciesCreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SnapshotPolicy
}

type SnapshotPoliciesDeleteOperationResponse

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

type SnapshotPoliciesGetOperationResponse

type SnapshotPoliciesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SnapshotPolicy
}

type SnapshotPoliciesList

type SnapshotPoliciesList struct {
	Value *[]SnapshotPolicy `json:"value,omitempty"`
}

type SnapshotPoliciesListOperationResponse

type SnapshotPoliciesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SnapshotPoliciesList
}

type SnapshotPoliciesUpdateOperationResponse

type SnapshotPoliciesUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SnapshotPolicy
}

type SnapshotPolicy

type SnapshotPolicy struct {
	Etag       *string                  `json:"etag,omitempty"`
	Id         *string                  `json:"id,omitempty"`
	Location   string                   `json:"location"`
	Name       *string                  `json:"name,omitempty"`
	Properties SnapshotPolicyProperties `json:"properties"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type SnapshotPolicyClient

type SnapshotPolicyClient struct {
	Client *resourcemanager.Client
}

func NewSnapshotPolicyClientWithBaseURI

func NewSnapshotPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyClient, error)

func (SnapshotPolicyClient) SnapshotPoliciesCreate

SnapshotPoliciesCreate ...

func (SnapshotPolicyClient) SnapshotPoliciesDelete

SnapshotPoliciesDelete ...

func (SnapshotPolicyClient) SnapshotPoliciesDeleteThenPoll

func (c SnapshotPolicyClient) SnapshotPoliciesDeleteThenPoll(ctx context.Context, id SnapshotPolicyId) error

SnapshotPoliciesDeleteThenPoll performs SnapshotPoliciesDelete then polls until it's completed

func (SnapshotPolicyClient) SnapshotPoliciesGet

SnapshotPoliciesGet ...

func (SnapshotPolicyClient) SnapshotPoliciesList

SnapshotPoliciesList ...

func (SnapshotPolicyClient) SnapshotPoliciesUpdate

SnapshotPoliciesUpdate ...

func (SnapshotPolicyClient) SnapshotPoliciesUpdateThenPoll

func (c SnapshotPolicyClient) SnapshotPoliciesUpdateThenPoll(ctx context.Context, id SnapshotPolicyId, input SnapshotPolicyPatch) error

SnapshotPoliciesUpdateThenPoll performs SnapshotPoliciesUpdate then polls until it's completed

type SnapshotPolicyId

type SnapshotPolicyId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetAppAccountName  string
	SnapshotPolicyName string
}

SnapshotPolicyId is a struct representing the Resource ID for a Snapshot Policy

func NewSnapshotPolicyID

func NewSnapshotPolicyID(subscriptionId string, resourceGroupName string, netAppAccountName string, snapshotPolicyName string) SnapshotPolicyId

NewSnapshotPolicyID returns a new SnapshotPolicyId struct

func ParseSnapshotPolicyID

func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error)

ParseSnapshotPolicyID parses 'input' into a SnapshotPolicyId

func ParseSnapshotPolicyIDInsensitively

func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error)

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

func (*SnapshotPolicyId) FromParseResult

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

func (SnapshotPolicyId) ID

func (id SnapshotPolicyId) ID() string

ID returns the formatted Snapshot Policy ID

func (SnapshotPolicyId) Segments

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

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

func (SnapshotPolicyId) String

func (id SnapshotPolicyId) String() string

String returns a human-readable description of this Snapshot Policy ID

type SnapshotPolicyPatch

type SnapshotPolicyPatch struct {
	Id         *string                   `json:"id,omitempty"`
	Location   *string                   `json:"location,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *SnapshotPolicyProperties `json:"properties,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type SnapshotPolicyProperties

type SnapshotPolicyProperties struct {
	DailySchedule     *DailySchedule   `json:"dailySchedule,omitempty"`
	Enabled           *bool            `json:"enabled,omitempty"`
	HourlySchedule    *HourlySchedule  `json:"hourlySchedule,omitempty"`
	MonthlySchedule   *MonthlySchedule `json:"monthlySchedule,omitempty"`
	ProvisioningState *string          `json:"provisioningState,omitempty"`
	WeeklySchedule    *WeeklySchedule  `json:"weeklySchedule,omitempty"`
}

type WeeklySchedule

type WeeklySchedule struct {
	Day             *string `json:"day,omitempty"`
	Hour            *int64  `json:"hour,omitempty"`
	Minute          *int64  `json:"minute,omitempty"`
	SnapshotsToKeep *int64  `json:"snapshotsToKeep,omitempty"`
	UsedBytes       *int64  `json:"usedBytes,omitempty"`
}

Jump to

Keyboard shortcuts

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