storageaccounts

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/storageaccounts Documentation

The storageaccounts SDK allows for interaction with Azure Resource Manager databoxedge (API Version 2022-03-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/databoxedge/2022-03-01/storageaccounts"

Client Initialization

client := storageaccounts.NewStorageAccountsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StorageAccountsClient.CreateOrUpdate

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

payload := storageaccounts.StorageAccount{
	// ...
}


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

Example Usage: StorageAccountsClient.Delete

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

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

Example Usage: StorageAccountsClient.Get

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

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: StorageAccountsClient.ListByDataBoxEdgeDevice

ctx := context.TODO()
id := storageaccounts.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceName")

// alternatively `client.ListByDataBoxEdgeDevice(ctx, id)` can be used to do batched pagination
items, err := client.ListByDataBoxEdgeDeviceComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDataPolicy

func PossibleValuesForDataPolicy() []string

func PossibleValuesForStorageAccountStatus

func PossibleValuesForStorageAccountStatus() []string

func ValidateDataBoxEdgeDeviceID

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

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device 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 {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageAccount
}

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

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

func (*DataBoxEdgeDeviceId) FromParseResult

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

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type DataPolicy

type DataPolicy string
const (
	DataPolicyCloud DataPolicy = "Cloud"
	DataPolicyLocal DataPolicy = "Local"
)

func (*DataPolicy) UnmarshalJSON

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByDataBoxEdgeDeviceCompleteResult

type ListByDataBoxEdgeDeviceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StorageAccount
}

type ListByDataBoxEdgeDeviceCustomPager added in v0.20240628.1153531

type ListByDataBoxEdgeDeviceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByDataBoxEdgeDeviceCustomPager) NextPageLink() *odata.Link

type ListByDataBoxEdgeDeviceOperationResponse

type ListByDataBoxEdgeDeviceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StorageAccount
}

type StorageAccount

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

type StorageAccountId

type StorageAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	StorageAccountName    string
}

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

func NewStorageAccountID

func NewStorageAccountID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName 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) FromParseResult

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

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 StorageAccountOperationPredicate

type StorageAccountOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (StorageAccountOperationPredicate) Matches

type StorageAccountProperties

type StorageAccountProperties struct {
	BlobEndpoint               *string               `json:"blobEndpoint,omitempty"`
	ContainerCount             *int64                `json:"containerCount,omitempty"`
	DataPolicy                 DataPolicy            `json:"dataPolicy"`
	Description                *string               `json:"description,omitempty"`
	StorageAccountCredentialId *string               `json:"storageAccountCredentialId,omitempty"`
	StorageAccountStatus       *StorageAccountStatus `json:"storageAccountStatus,omitempty"`
}

type StorageAccountStatus

type StorageAccountStatus string
const (
	StorageAccountStatusNeedsAttention StorageAccountStatus = "NeedsAttention"
	StorageAccountStatusOK             StorageAccountStatus = "OK"
	StorageAccountStatusOffline        StorageAccountStatus = "Offline"
	StorageAccountStatusUnknown        StorageAccountStatus = "Unknown"
	StorageAccountStatusUpdating       StorageAccountStatus = "Updating"
)

func (*StorageAccountStatus) UnmarshalJSON

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

type StorageAccountsClient

type StorageAccountsClient struct {
	Client *resourcemanager.Client
}

func NewStorageAccountsClientWithBaseURI

func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error)

func (StorageAccountsClient) CreateOrUpdate

CreateOrUpdate ...

func (StorageAccountsClient) CreateOrUpdateThenPoll

func (c StorageAccountsClient) CreateOrUpdateThenPoll(ctx context.Context, id StorageAccountId, input StorageAccount) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (StorageAccountsClient) Delete

Delete ...

func (StorageAccountsClient) DeleteThenPoll

func (c StorageAccountsClient) DeleteThenPoll(ctx context.Context, id StorageAccountId) error

DeleteThenPoll performs Delete then polls until it's completed

func (StorageAccountsClient) Get

Get ...

func (StorageAccountsClient) ListByDataBoxEdgeDevice

ListByDataBoxEdgeDevice ...

func (StorageAccountsClient) ListByDataBoxEdgeDeviceComplete

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (StorageAccountsClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c StorageAccountsClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, predicate StorageAccountOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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