objectreplicationpolicies

package
v0.20220802.1171618 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2021-04-01/objectreplicationpolicies Documentation

The objectreplicationpolicies SDK allows for interaction with the Azure Resource Manager Service storage (API Version 2021-04-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/storage/2021-04-01/objectreplicationpolicies"

Client Initialization

client := objectreplicationpolicies.NewObjectReplicationPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ObjectReplicationPoliciesClient.CreateOrUpdate

ctx := context.TODO()
id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue")

payload := objectreplicationpolicies.ObjectReplicationPolicy{
	// ...
}


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

Example Usage: ObjectReplicationPoliciesClient.Delete

ctx := context.TODO()
id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue")

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

Example Usage: ObjectReplicationPoliciesClient.Get

ctx := context.TODO()
id := objectreplicationpolicies.NewObjectReplicationPoliciesID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "objectReplicationPolicyIdValue")

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: ObjectReplicationPoliciesClient.List

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

read, err := client.List(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 ValidateObjectReplicationPoliciesID

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

ValidateObjectReplicationPoliciesID checks that 'input' can be parsed as a Object Replication Policies ID

func ValidateStorageAccountID

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

ValidateStorageAccountID checks that 'input' can be parsed as a Storage Account ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ObjectReplicationPolicy
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ObjectReplicationPolicy
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *ObjectReplicationPolicies
}

type ObjectReplicationPolicies

type ObjectReplicationPolicies struct {
	Value *[]ObjectReplicationPolicy `json:"value,omitempty"`
}

type ObjectReplicationPoliciesClient

type ObjectReplicationPoliciesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewObjectReplicationPoliciesClientWithBaseURI

func NewObjectReplicationPoliciesClientWithBaseURI(endpoint string) ObjectReplicationPoliciesClient

func (ObjectReplicationPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (ObjectReplicationPoliciesClient) Delete

Delete ...

func (ObjectReplicationPoliciesClient) Get

Get ...

func (ObjectReplicationPoliciesClient) List

List ...

type ObjectReplicationPoliciesId

type ObjectReplicationPoliciesId struct {
	SubscriptionId            string
	ResourceGroupName         string
	AccountName               string
	ObjectReplicationPolicyId string
}

ObjectReplicationPoliciesId is a struct representing the Resource ID for a Object Replication Policies

func NewObjectReplicationPoliciesID

func NewObjectReplicationPoliciesID(subscriptionId string, resourceGroupName string, accountName string, objectReplicationPolicyId string) ObjectReplicationPoliciesId

NewObjectReplicationPoliciesID returns a new ObjectReplicationPoliciesId struct

func ParseObjectReplicationPoliciesID

func ParseObjectReplicationPoliciesID(input string) (*ObjectReplicationPoliciesId, error)

ParseObjectReplicationPoliciesID parses 'input' into a ObjectReplicationPoliciesId

func ParseObjectReplicationPoliciesIDInsensitively

func ParseObjectReplicationPoliciesIDInsensitively(input string) (*ObjectReplicationPoliciesId, error)

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

func (ObjectReplicationPoliciesId) ID

ID returns the formatted Object Replication Policies ID

func (ObjectReplicationPoliciesId) Segments

Segments returns a slice of Resource ID Segments which comprise this Object Replication Policies ID

func (ObjectReplicationPoliciesId) String

func (id ObjectReplicationPoliciesId) String() string

String returns a human-readable description of this Object Replication Policies ID

type ObjectReplicationPolicy

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

type ObjectReplicationPolicyFilter

type ObjectReplicationPolicyFilter struct {
	MinCreationTime *string   `json:"minCreationTime,omitempty"`
	PrefixMatch     *[]string `json:"prefixMatch,omitempty"`
}

type ObjectReplicationPolicyProperties

type ObjectReplicationPolicyProperties struct {
	DestinationAccount string                         `json:"destinationAccount"`
	EnabledTime        *string                        `json:"enabledTime,omitempty"`
	PolicyId           *string                        `json:"policyId,omitempty"`
	Rules              *[]ObjectReplicationPolicyRule `json:"rules,omitempty"`
	SourceAccount      string                         `json:"sourceAccount"`
}

func (*ObjectReplicationPolicyProperties) GetEnabledTimeAsTime

func (o *ObjectReplicationPolicyProperties) GetEnabledTimeAsTime() (*time.Time, error)

func (*ObjectReplicationPolicyProperties) SetEnabledTimeAsTime

func (o *ObjectReplicationPolicyProperties) SetEnabledTimeAsTime(input time.Time)

type ObjectReplicationPolicyRule

type ObjectReplicationPolicyRule struct {
	DestinationContainer string                         `json:"destinationContainer"`
	Filters              *ObjectReplicationPolicyFilter `json:"filters,omitempty"`
	RuleId               *string                        `json:"ruleId,omitempty"`
	SourceContainer      string                         `json:"sourceContainer"`
}

type StorageAccountId

type StorageAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

StorageAccountId is a struct representing the Resource ID for a Storage Account

func NewStorageAccountID

func NewStorageAccountID(subscriptionId string, resourceGroupName string, accountName string) StorageAccountId

NewStorageAccountID returns a new StorageAccountId struct

func ParseStorageAccountID

func ParseStorageAccountID(input string) (*StorageAccountId, error)

ParseStorageAccountID parses 'input' into a StorageAccountId

func ParseStorageAccountIDInsensitively

func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error)

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

func (StorageAccountId) ID

func (id StorageAccountId) ID() string

ID returns the formatted Storage Account ID

func (StorageAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Storage Account ID

func (StorageAccountId) String

func (id StorageAccountId) String() string

String returns a human-readable description of this Storage Account ID

Jump to

Keyboard shortcuts

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