managementpolicies

package
v0.20230613.1122626 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2022-05-01/managementpolicies Documentation

The managementpolicies SDK allows for interaction with the Azure Resource Manager Service storage (API Version 2022-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/storage/2022-05-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", "storageAccountValue")

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", "storageAccountValue")

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", "storageAccountValue")

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

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"`
	DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,omitempty"`
}

type DateAfterModification

type DateAfterModification struct {
	DaysAfterCreationGreaterThan       *float64 `json:"daysAfterCreationGreaterThan,omitempty"`
	DaysAfterLastAccessTimeGreaterThan *float64 `json:"daysAfterLastAccessTimeGreaterThan,omitempty"`
	DaysAfterLastTierChangeGreaterThan *float64 `json:"daysAfterLastTierChangeGreaterThan,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

type StorageAccountId struct {
	SubscriptionId     string
	ResourceGroupName  string
	StorageAccountName string
}

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

func NewStorageAccountID

func NewStorageAccountID(subscriptionId string, resourceGroupName string, storageAccountName 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

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