containers

package
v0.20240903.1131440 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/containers Documentation

The containers SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2023-12-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/2023-12-01/containers"

Client Initialization

client := containers.NewContainersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ContainersClient.CreateOrUpdate

ctx := context.TODO()
id := containers.NewContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "storageAccountValue", "containerValue")

payload := containers.Container{
	// ...
}


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

Example Usage: ContainersClient.Delete

ctx := context.TODO()
id := containers.NewContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "storageAccountValue", "containerValue")

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

Example Usage: ContainersClient.Get

ctx := context.TODO()
id := containers.NewContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "storageAccountValue", "containerValue")

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: ContainersClient.ListByStorageAccount

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

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

Example Usage: ContainersClient.Refresh

ctx := context.TODO()
id := containers.NewContainerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "storageAccountValue", "containerValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAzureContainerDataFormat

func PossibleValuesForAzureContainerDataFormat() []string

func PossibleValuesForContainerStatus

func PossibleValuesForContainerStatus() []string

func ValidateContainerID

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

ValidateContainerID checks that 'input' can be parsed as a Container 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 AzureContainerDataFormat

type AzureContainerDataFormat string
const (
	AzureContainerDataFormatAzureFile AzureContainerDataFormat = "AzureFile"
	AzureContainerDataFormatBlockBlob AzureContainerDataFormat = "BlockBlob"
	AzureContainerDataFormatPageBlob  AzureContainerDataFormat = "PageBlob"
)

func (*AzureContainerDataFormat) UnmarshalJSON

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

type Container

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

type ContainerId

type ContainerId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	StorageAccountName    string
	ContainerName         string
}

ContainerId is a struct representing the Resource ID for a Container

func NewContainerID

func NewContainerID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, storageAccountName string, containerName string) ContainerId

NewContainerID returns a new ContainerId struct

func ParseContainerID

func ParseContainerID(input string) (*ContainerId, error)

ParseContainerID parses 'input' into a ContainerId

func ParseContainerIDInsensitively

func ParseContainerIDInsensitively(input string) (*ContainerId, error)

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

func (*ContainerId) FromParseResult

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

func (ContainerId) ID

func (id ContainerId) ID() string

ID returns the formatted Container ID

func (ContainerId) Segments

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

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

func (ContainerId) String

func (id ContainerId) String() string

String returns a human-readable description of this Container ID

type ContainerOperationPredicate

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

func (ContainerOperationPredicate) Matches

func (p ContainerOperationPredicate) Matches(input Container) bool

type ContainerProperties

type ContainerProperties struct {
	ContainerStatus *ContainerStatus         `json:"containerStatus,omitempty"`
	CreatedDateTime *string                  `json:"createdDateTime,omitempty"`
	DataFormat      AzureContainerDataFormat `json:"dataFormat"`
	RefreshDetails  *RefreshDetails          `json:"refreshDetails,omitempty"`
}

func (*ContainerProperties) GetCreatedDateTimeAsTime

func (o *ContainerProperties) GetCreatedDateTimeAsTime() (*time.Time, error)

func (*ContainerProperties) SetCreatedDateTimeAsTime

func (o *ContainerProperties) SetCreatedDateTimeAsTime(input time.Time)

type ContainerStatus

type ContainerStatus string
const (
	ContainerStatusNeedsAttention ContainerStatus = "NeedsAttention"
	ContainerStatusOK             ContainerStatus = "OK"
	ContainerStatusOffline        ContainerStatus = "Offline"
	ContainerStatusUnknown        ContainerStatus = "Unknown"
	ContainerStatusUpdating       ContainerStatus = "Updating"
)

func (*ContainerStatus) UnmarshalJSON

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

type ContainersClient

type ContainersClient struct {
	Client *resourcemanager.Client
}

func NewContainersClientWithBaseURI

func NewContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainersClient, error)

func (ContainersClient) CreateOrUpdate

func (c ContainersClient) CreateOrUpdate(ctx context.Context, id ContainerId, input Container) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ContainersClient) CreateOrUpdateThenPoll

func (c ContainersClient) CreateOrUpdateThenPoll(ctx context.Context, id ContainerId, input Container) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ContainersClient) Delete

func (c ContainersClient) Delete(ctx context.Context, id ContainerId) (result DeleteOperationResponse, err error)

Delete ...

func (ContainersClient) DeleteThenPoll

func (c ContainersClient) DeleteThenPoll(ctx context.Context, id ContainerId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ContainersClient) Get

Get ...

func (ContainersClient) ListByStorageAccount

func (c ContainersClient) ListByStorageAccount(ctx context.Context, id StorageAccountId) (result ListByStorageAccountOperationResponse, err error)

ListByStorageAccount ...

func (ContainersClient) ListByStorageAccountComplete

func (c ContainersClient) ListByStorageAccountComplete(ctx context.Context, id StorageAccountId) (ListByStorageAccountCompleteResult, error)

ListByStorageAccountComplete retrieves all the results into a single object

func (ContainersClient) ListByStorageAccountCompleteMatchingPredicate

func (c ContainersClient) ListByStorageAccountCompleteMatchingPredicate(ctx context.Context, id StorageAccountId, predicate ContainerOperationPredicate) (result ListByStorageAccountCompleteResult, err error)

ListByStorageAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ContainersClient) Refresh

func (c ContainersClient) Refresh(ctx context.Context, id ContainerId) (result RefreshOperationResponse, err error)

Refresh ...

func (ContainersClient) RefreshThenPoll

func (c ContainersClient) RefreshThenPoll(ctx context.Context, id ContainerId) error

RefreshThenPoll performs Refresh then polls until it's completed

type CreateOrUpdateOperationResponse

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

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

type ListByStorageAccountCompleteResult

type ListByStorageAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Container
}

type ListByStorageAccountCustomPager added in v0.20240628.1153531

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

type ListByStorageAccountOperationResponse

type ListByStorageAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Container
}

type RefreshDetails

type RefreshDetails struct {
	ErrorManifestFile                *string `json:"errorManifestFile,omitempty"`
	InProgressRefreshJobId           *string `json:"inProgressRefreshJobId,omitempty"`
	LastCompletedRefreshJobTimeInUTC *string `json:"lastCompletedRefreshJobTimeInUTC,omitempty"`
	LastJob                          *string `json:"lastJob,omitempty"`
}

func (*RefreshDetails) GetLastCompletedRefreshJobTimeInUTCAsTime

func (o *RefreshDetails) GetLastCompletedRefreshJobTimeInUTCAsTime() (*time.Time, error)

func (*RefreshDetails) SetLastCompletedRefreshJobTimeInUTCAsTime

func (o *RefreshDetails) SetLastCompletedRefreshJobTimeInUTCAsTime(input time.Time)

type RefreshOperationResponse

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

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

Jump to

Keyboard shortcuts

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