blobinventorypolicies

package
v0.20231214.1160726 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2022-09-01/blobinventorypolicies Documentation

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

Client Initialization

client := blobinventorypolicies.NewBlobInventoryPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BlobInventoryPoliciesClient.CreateOrUpdate

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

payload := blobinventorypolicies.BlobInventoryPolicy{
	// ...
}


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

ctx := context.TODO()
id := blobinventorypolicies.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: BlobInventoryPoliciesClient.Get

ctx := context.TODO()
id := blobinventorypolicies.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
}

Example Usage: BlobInventoryPoliciesClient.List

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

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 PossibleValuesForFormat

func PossibleValuesForFormat() []string

func PossibleValuesForInventoryRuleType

func PossibleValuesForInventoryRuleType() []string

func PossibleValuesForObjectType

func PossibleValuesForObjectType() []string

func PossibleValuesForSchedule

func PossibleValuesForSchedule() []string

Types

type BlobInventoryPoliciesClient

type BlobInventoryPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewBlobInventoryPoliciesClientWithBaseURI

func NewBlobInventoryPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobInventoryPoliciesClient, error)

func (BlobInventoryPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (BlobInventoryPoliciesClient) Delete

Delete ...

func (BlobInventoryPoliciesClient) Get

Get ...

func (BlobInventoryPoliciesClient) List

List ...

type BlobInventoryPolicy

type BlobInventoryPolicy struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *BlobInventoryPolicyProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData         `json:"systemData,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type BlobInventoryPolicyDefinition

type BlobInventoryPolicyDefinition struct {
	Filters      *BlobInventoryPolicyFilter `json:"filters,omitempty"`
	Format       Format                     `json:"format"`
	ObjectType   ObjectType                 `json:"objectType"`
	Schedule     Schedule                   `json:"schedule"`
	SchemaFields []string                   `json:"schemaFields"`
}

type BlobInventoryPolicyFilter

type BlobInventoryPolicyFilter struct {
	BlobTypes           *[]string `json:"blobTypes,omitempty"`
	ExcludePrefix       *[]string `json:"excludePrefix,omitempty"`
	IncludeBlobVersions *bool     `json:"includeBlobVersions,omitempty"`
	IncludeDeleted      *bool     `json:"includeDeleted,omitempty"`
	IncludeSnapshots    *bool     `json:"includeSnapshots,omitempty"`
	PrefixMatch         *[]string `json:"prefixMatch,omitempty"`
}

type BlobInventoryPolicyProperties

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

func (*BlobInventoryPolicyProperties) GetLastModifiedTimeAsTime

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

func (*BlobInventoryPolicyProperties) SetLastModifiedTimeAsTime

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

type BlobInventoryPolicyRule

type BlobInventoryPolicyRule struct {
	Definition  BlobInventoryPolicyDefinition `json:"definition"`
	Destination string                        `json:"destination"`
	Enabled     bool                          `json:"enabled"`
	Name        string                        `json:"name"`
}

type BlobInventoryPolicySchema

type BlobInventoryPolicySchema struct {
	Destination *string                   `json:"destination,omitempty"`
	Enabled     bool                      `json:"enabled"`
	Rules       []BlobInventoryPolicyRule `json:"rules"`
	Type        InventoryRuleType         `json:"type"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BlobInventoryPolicy
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type Format

type Format string
const (
	FormatCsv     Format = "Csv"
	FormatParquet Format = "Parquet"
)

func (*Format) UnmarshalJSON added in v0.20231114.1115341

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

type GetOperationResponse

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

type InventoryRuleType

type InventoryRuleType string
const (
	InventoryRuleTypeInventory InventoryRuleType = "Inventory"
)

func (*InventoryRuleType) UnmarshalJSON added in v0.20231114.1115341

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

type ListBlobInventoryPolicy

type ListBlobInventoryPolicy struct {
	Value *[]BlobInventoryPolicy `json:"value,omitempty"`
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ListBlobInventoryPolicy
}

type ObjectType

type ObjectType string
const (
	ObjectTypeBlob      ObjectType = "Blob"
	ObjectTypeContainer ObjectType = "Container"
)

func (*ObjectType) UnmarshalJSON added in v0.20231114.1115341

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

type Schedule

type Schedule string
const (
	ScheduleDaily  Schedule = "Daily"
	ScheduleWeekly Schedule = "Weekly"
)

func (*Schedule) UnmarshalJSON added in v0.20231114.1115341

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

Jump to

Keyboard shortcuts

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