managementpolicies

package
v0.20220712.1062733 Latest Latest
Warning

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

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

README

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

The managementpolicies 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/managementpolicies"

Client Initialization

client := managementpolicies.NewManagementPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagementPoliciesClient.CreateOrUpdate

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

payload := managementpolicies.ManagementPolicy{
	// ...
}


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: ManagementPoliciesClient.Delete

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

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: ManagementPoliciesClient.Get

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

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 PossibleValuesForRuleType

func PossibleValuesForRuleType() []string

func ValidateStorageAccountID added in v0.20220627.1082008

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        *ManagementPolicy
}

type DateAfterCreation

type DateAfterCreation struct {
	DaysAfterCreationGreaterThan float64 `json:"daysAfterCreationGreaterThan"`
}

type DateAfterModification

type DateAfterModification struct {
	DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"`
	DaysAfterModificationGreaterThan   *float64 `json:"daysAfterModificationGreaterThan,omitempty"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ManagementPoliciesClient

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

func NewManagementPoliciesClientWithBaseURI

func NewManagementPoliciesClientWithBaseURI(endpoint string) ManagementPoliciesClient

func (ManagementPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagementPoliciesClient) Delete

Delete ...

func (ManagementPoliciesClient) Get

Get ...

type ManagementPolicy

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

type ManagementPolicyAction

type ManagementPolicyAction struct {
	BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"`
	Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"`
	Version  *ManagementPolicyVersion  `json:"version,omitempty"`
}

type ManagementPolicyBaseBlob

type ManagementPolicyBaseBlob struct {
	Delete                      *DateAfterModification `json:"delete,omitempty"`
	EnableAutoTierToHotFromCool *bool                  `json:"enableAutoTierToHotFromCool,omitempty"`
	TierToArchive               *DateAfterModification `json:"tierToArchive,omitempty"`
	TierToCool                  *DateAfterModification `json:"tierToCool,omitempty"`
}

type ManagementPolicyDefinition

type ManagementPolicyDefinition struct {
	Actions ManagementPolicyAction  `json:"actions"`
	Filters *ManagementPolicyFilter `json:"filters,omitempty"`
}

type ManagementPolicyFilter

type ManagementPolicyFilter struct {
	BlobIndexMatch *[]TagFilter `json:"blobIndexMatch,omitempty"`
	BlobTypes      []string     `json:"blobTypes"`
	PrefixMatch    *[]string    `json:"prefixMatch,omitempty"`
}

type ManagementPolicyProperties

type ManagementPolicyProperties struct {
	LastModifiedTime *string                `json:"lastModifiedTime,omitempty"`
	Policy           ManagementPolicySchema `json:"policy"`
}

func (*ManagementPolicyProperties) GetLastModifiedTimeAsTime

func (o *ManagementPolicyProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*ManagementPolicyProperties) SetLastModifiedTimeAsTime

func (o *ManagementPolicyProperties) SetLastModifiedTimeAsTime(input time.Time)

type ManagementPolicyRule

type ManagementPolicyRule struct {
	Definition ManagementPolicyDefinition `json:"definition"`
	Enabled    *bool                      `json:"enabled,omitempty"`
	Name       string                     `json:"name"`
	Type       RuleType                   `json:"type"`
}

type ManagementPolicySchema

type ManagementPolicySchema struct {
	Rules []ManagementPolicyRule `json:"rules"`
}

type ManagementPolicySnapShot

type ManagementPolicySnapShot struct {
	Delete        *DateAfterCreation `json:"delete,omitempty"`
	TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"`
	TierToCool    *DateAfterCreation `json:"tierToCool,omitempty"`
}

type ManagementPolicyVersion

type ManagementPolicyVersion struct {
	Delete        *DateAfterCreation `json:"delete,omitempty"`
	TierToArchive *DateAfterCreation `json:"tierToArchive,omitempty"`
	TierToCool    *DateAfterCreation `json:"tierToCool,omitempty"`
}

type RuleType

type RuleType string
const (
	RuleTypeLifecycle RuleType = "Lifecycle"
)

type StorageAccountId added in v0.20220627.1082008

type StorageAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

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

func NewStorageAccountID added in v0.20220627.1082008

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

NewStorageAccountID returns a new StorageAccountId struct

func ParseStorageAccountID added in v0.20220627.1082008

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

ParseStorageAccountID parses 'input' into a StorageAccountId

func ParseStorageAccountIDInsensitively added in v0.20220627.1082008

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 added in v0.20220627.1082008

func (id StorageAccountId) ID() string

ID returns the formatted Storage Account ID

func (StorageAccountId) Segments added in v0.20220627.1082008

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

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

func (StorageAccountId) String added in v0.20220627.1082008

func (id StorageAccountId) String() string

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

type TagFilter

type TagFilter struct {
	Name  string `json:"name"`
	Op    string `json:"op"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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