storagecontainers

package
v0.20240617.1095803 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers Documentation

The storagecontainers SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2024-01-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers"

Client Initialization

client := storagecontainers.NewStorageContainersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StorageContainersClient.CreateOrUpdate

ctx := context.TODO()
id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue")

payload := storagecontainers.StorageContainers{
	// ...
}


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

Example Usage: StorageContainersClient.Delete

ctx := context.TODO()
id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue")

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

Example Usage: StorageContainersClient.Get

ctx := context.TODO()
id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue")

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

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

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

Example Usage: StorageContainersClient.ListAll

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: StorageContainersClient.Update

ctx := context.TODO()
id := storagecontainers.NewStorageContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageContainerValue")

payload := storagecontainers.StorageContainersUpdateRequest{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForExtendedLocationTypes

func PossibleValuesForExtendedLocationTypes() []string

func PossibleValuesForProvisioningStateEnum

func PossibleValuesForProvisioningStateEnum() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateStorageContainerID

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

ValidateStorageContainerID checks that 'input' can be parsed as a Storage Container ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageContainers
}

type DeleteOperationResponse

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

type ExtendedLocation

type ExtendedLocation struct {
	Name *string                `json:"name,omitempty"`
	Type *ExtendedLocationTypes `json:"type,omitempty"`
}

type ExtendedLocationTypes

type ExtendedLocationTypes string
const (
	ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)

func (*ExtendedLocationTypes) UnmarshalJSON

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

type GetOperationResponse

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StorageContainers
}

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StorageContainers
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StorageContainers
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StorageContainers
}

type ProvisioningStateEnum

type ProvisioningStateEnum string
const (
	ProvisioningStateEnumAccepted   ProvisioningStateEnum = "Accepted"
	ProvisioningStateEnumCanceled   ProvisioningStateEnum = "Canceled"
	ProvisioningStateEnumDeleting   ProvisioningStateEnum = "Deleting"
	ProvisioningStateEnumFailed     ProvisioningStateEnum = "Failed"
	ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress"
	ProvisioningStateEnumSucceeded  ProvisioningStateEnum = "Succeeded"
)

func (*ProvisioningStateEnum) UnmarshalJSON

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

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON

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

type StorageContainerId

type StorageContainerId struct {
	SubscriptionId       string
	ResourceGroupName    string
	StorageContainerName string
}

StorageContainerId is a struct representing the Resource ID for a Storage Container

func NewStorageContainerID

func NewStorageContainerID(subscriptionId string, resourceGroupName string, storageContainerName string) StorageContainerId

NewStorageContainerID returns a new StorageContainerId struct

func ParseStorageContainerID

func ParseStorageContainerID(input string) (*StorageContainerId, error)

ParseStorageContainerID parses 'input' into a StorageContainerId

func ParseStorageContainerIDInsensitively

func ParseStorageContainerIDInsensitively(input string) (*StorageContainerId, error)

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

func (*StorageContainerId) FromParseResult

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

func (StorageContainerId) ID

func (id StorageContainerId) ID() string

ID returns the formatted Storage Container ID

func (StorageContainerId) Segments

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

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

func (StorageContainerId) String

func (id StorageContainerId) String() string

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

type StorageContainerProperties

type StorageContainerProperties struct {
	Path              string                  `json:"path"`
	ProvisioningState *ProvisioningStateEnum  `json:"provisioningState,omitempty"`
	Status            *StorageContainerStatus `json:"status,omitempty"`
}

type StorageContainerStatus

type StorageContainerStatus struct {
	AvailableSizeMB    *int64                                    `json:"availableSizeMB,omitempty"`
	ContainerSizeMB    *int64                                    `json:"containerSizeMB,omitempty"`
	ErrorCode          *string                                   `json:"errorCode,omitempty"`
	ErrorMessage       *string                                   `json:"errorMessage,omitempty"`
	ProvisioningStatus *StorageContainerStatusProvisioningStatus `json:"provisioningStatus,omitempty"`
}

type StorageContainerStatusProvisioningStatus

type StorageContainerStatusProvisioningStatus struct {
	OperationId *string `json:"operationId,omitempty"`
	Status      *Status `json:"status,omitempty"`
}

type StorageContainers

type StorageContainers struct {
	ExtendedLocation *ExtendedLocation           `json:"extendedLocation,omitempty"`
	Id               *string                     `json:"id,omitempty"`
	Location         string                      `json:"location"`
	Name             *string                     `json:"name,omitempty"`
	Properties       *StorageContainerProperties `json:"properties,omitempty"`
	SystemData       *systemdata.SystemData      `json:"systemData,omitempty"`
	Tags             *map[string]string          `json:"tags,omitempty"`
	Type             *string                     `json:"type,omitempty"`
}

type StorageContainersClient

type StorageContainersClient struct {
	Client *resourcemanager.Client
}

func NewStorageContainersClientWithBaseURI

func NewStorageContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageContainersClient, error)

func (StorageContainersClient) CreateOrUpdate

CreateOrUpdate ...

func (StorageContainersClient) CreateOrUpdateThenPoll

func (c StorageContainersClient) CreateOrUpdateThenPoll(ctx context.Context, id StorageContainerId, input StorageContainers) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (StorageContainersClient) Delete

Delete ...

func (StorageContainersClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (StorageContainersClient) Get

Get ...

func (StorageContainersClient) List

List ...

func (StorageContainersClient) ListAll

ListAll ...

func (StorageContainersClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (StorageContainersClient) ListAllCompleteMatchingPredicate

func (c StorageContainersClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate StorageContainersOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (StorageContainersClient) ListComplete

ListComplete retrieves all the results into a single object

func (StorageContainersClient) ListCompleteMatchingPredicate

func (c StorageContainersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate StorageContainersOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (StorageContainersClient) Update

Update ...

func (StorageContainersClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type StorageContainersOperationPredicate

type StorageContainersOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (StorageContainersOperationPredicate) Matches

type StorageContainersUpdateRequest

type StorageContainersUpdateRequest struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageContainers
}

Jump to

Keyboard shortcuts

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