storagetargets

package
v0.20230316.1132628 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2021-09-01/storagetargets Documentation

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

Client Initialization

client := storagetargets.NewStorageTargetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StorageTargetsClient.CreateOrUpdate

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

payload := storagetargets.StorageTarget{
	// ...
}


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

Example Usage: StorageTargetsClient.Delete

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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

Example Usage: StorageTargetsClient.DnsRefresh

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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

Example Usage: StorageTargetsClient.Get

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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: StorageTargetsClient.ListByCache

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

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

Example Usage: StorageTargetsClient.StorageTargetFlush

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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

Example Usage: StorageTargetsClient.StorageTargetResume

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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

Example Usage: StorageTargetsClient.StorageTargetSuspend

ctx := context.TODO()
id := storagetargets.NewStorageTargetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue", "storageTargetValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOperationalStateType

func PossibleValuesForOperationalStateType() []string

func PossibleValuesForProvisioningStateType

func PossibleValuesForProvisioningStateType() []string

func PossibleValuesForStorageTargetType

func PossibleValuesForStorageTargetType() []string

func ValidateCacheID

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

ValidateCacheID checks that 'input' can be parsed as a Cache ID

func ValidateStorageTargetID

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

ValidateStorageTargetID checks that 'input' can be parsed as a Storage Target ID

Types

type BlobNfsTarget

type BlobNfsTarget struct {
	Target     *string `json:"target,omitempty"`
	UsageModel *string `json:"usageModel,omitempty"`
}

type CacheId

type CacheId struct {
	SubscriptionId    string
	ResourceGroupName string
	CacheName         string
}

CacheId is a struct representing the Resource ID for a Cache

func NewCacheID

func NewCacheID(subscriptionId string, resourceGroupName string, cacheName string) CacheId

NewCacheID returns a new CacheId struct

func ParseCacheID

func ParseCacheID(input string) (*CacheId, error)

ParseCacheID parses 'input' into a CacheId

func ParseCacheIDInsensitively

func ParseCacheIDInsensitively(input string) (*CacheId, error)

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

func (CacheId) ID

func (id CacheId) ID() string

ID returns the formatted Cache ID

func (CacheId) Segments

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

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

func (CacheId) String

func (id CacheId) String() string

String returns a human-readable description of this Cache ID

type ClfsTarget

type ClfsTarget struct {
	Target *string `json:"target,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DnsRefreshOperationResponse

type DnsRefreshOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *StorageTarget
}

type ListByCacheCompleteResult

type ListByCacheCompleteResult struct {
	Items []StorageTarget
}

type ListByCacheOperationResponse

type ListByCacheOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]StorageTarget
	// contains filtered or unexported fields
}

func (ListByCacheOperationResponse) HasMore

func (r ListByCacheOperationResponse) HasMore() bool

func (ListByCacheOperationResponse) LoadMore

type NamespaceJunction

type NamespaceJunction struct {
	NamespacePath   *string `json:"namespacePath,omitempty"`
	NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"`
	NfsExport       *string `json:"nfsExport,omitempty"`
	TargetPath      *string `json:"targetPath,omitempty"`
}

type Nfs3Target

type Nfs3Target struct {
	Target     *string `json:"target,omitempty"`
	UsageModel *string `json:"usageModel,omitempty"`
}

type OperationalStateType

type OperationalStateType string
const (
	OperationalStateTypeBusy      OperationalStateType = "Busy"
	OperationalStateTypeFlushing  OperationalStateType = "Flushing"
	OperationalStateTypeReady     OperationalStateType = "Ready"
	OperationalStateTypeSuspended OperationalStateType = "Suspended"
)

type ProvisioningStateType

type ProvisioningStateType string
const (
	ProvisioningStateTypeCancelled ProvisioningStateType = "Cancelled"
	ProvisioningStateTypeCreating  ProvisioningStateType = "Creating"
	ProvisioningStateTypeDeleting  ProvisioningStateType = "Deleting"
	ProvisioningStateTypeFailed    ProvisioningStateType = "Failed"
	ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded"
	ProvisioningStateTypeUpdating  ProvisioningStateType = "Updating"
)

type StorageTarget

type StorageTarget struct {
	Id         *string                  `json:"id,omitempty"`
	Location   *string                  `json:"location,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *StorageTargetProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type StorageTargetFlushOperationResponse

type StorageTargetFlushOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StorageTargetId

type StorageTargetId struct {
	SubscriptionId    string
	ResourceGroupName string
	CacheName         string
	StorageTargetName string
}

StorageTargetId is a struct representing the Resource ID for a Storage Target

func NewStorageTargetID

func NewStorageTargetID(subscriptionId string, resourceGroupName string, cacheName string, storageTargetName string) StorageTargetId

NewStorageTargetID returns a new StorageTargetId struct

func ParseStorageTargetID

func ParseStorageTargetID(input string) (*StorageTargetId, error)

ParseStorageTargetID parses 'input' into a StorageTargetId

func ParseStorageTargetIDInsensitively

func ParseStorageTargetIDInsensitively(input string) (*StorageTargetId, error)

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

func (StorageTargetId) ID

func (id StorageTargetId) ID() string

ID returns the formatted Storage Target ID

func (StorageTargetId) Segments

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

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

func (StorageTargetId) String

func (id StorageTargetId) String() string

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

type StorageTargetOperationPredicate

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

func (StorageTargetOperationPredicate) Matches

type StorageTargetProperties

type StorageTargetProperties struct {
	BlobNfs           *BlobNfsTarget         `json:"blobNfs,omitempty"`
	Clfs              *ClfsTarget            `json:"clfs,omitempty"`
	Junctions         *[]NamespaceJunction   `json:"junctions,omitempty"`
	Nfs3              *Nfs3Target            `json:"nfs3,omitempty"`
	ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty"`
	State             *OperationalStateType  `json:"state,omitempty"`
	TargetType        StorageTargetType      `json:"targetType"`
	Unknown           *UnknownTarget         `json:"unknown,omitempty"`
}

type StorageTargetResumeOperationResponse

type StorageTargetResumeOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StorageTargetSuspendOperationResponse

type StorageTargetSuspendOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StorageTargetType

type StorageTargetType string
const (
	StorageTargetTypeBlobNfs  StorageTargetType = "blobNfs"
	StorageTargetTypeClfs     StorageTargetType = "clfs"
	StorageTargetTypeNfsThree StorageTargetType = "nfs3"
	StorageTargetTypeUnknown  StorageTargetType = "unknown"
)

type StorageTargetsClient

type StorageTargetsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewStorageTargetsClientWithBaseURI

func NewStorageTargetsClientWithBaseURI(endpoint string) StorageTargetsClient

func (StorageTargetsClient) CreateOrUpdate

CreateOrUpdate ...

func (StorageTargetsClient) CreateOrUpdateThenPoll

func (c StorageTargetsClient) CreateOrUpdateThenPoll(ctx context.Context, id StorageTargetId, input StorageTarget) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (StorageTargetsClient) Delete

Delete ...

func (StorageTargetsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (StorageTargetsClient) DnsRefresh

DnsRefresh ...

func (StorageTargetsClient) DnsRefreshThenPoll

func (c StorageTargetsClient) DnsRefreshThenPoll(ctx context.Context, id StorageTargetId) error

DnsRefreshThenPoll performs DnsRefresh then polls until it's completed

func (StorageTargetsClient) Get

Get ...

func (StorageTargetsClient) ListByCache

ListByCache ...

func (StorageTargetsClient) ListByCacheComplete

func (c StorageTargetsClient) ListByCacheComplete(ctx context.Context, id CacheId) (ListByCacheCompleteResult, error)

ListByCacheComplete retrieves all of the results into a single object

func (StorageTargetsClient) ListByCacheCompleteMatchingPredicate

func (c StorageTargetsClient) ListByCacheCompleteMatchingPredicate(ctx context.Context, id CacheId, predicate StorageTargetOperationPredicate) (resp ListByCacheCompleteResult, err error)

ListByCacheCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (StorageTargetsClient) StorageTargetFlush

StorageTargetFlush ...

func (StorageTargetsClient) StorageTargetFlushThenPoll

func (c StorageTargetsClient) StorageTargetFlushThenPoll(ctx context.Context, id StorageTargetId) error

StorageTargetFlushThenPoll performs StorageTargetFlush then polls until it's completed

func (StorageTargetsClient) StorageTargetResume

StorageTargetResume ...

func (StorageTargetsClient) StorageTargetResumeThenPoll

func (c StorageTargetsClient) StorageTargetResumeThenPoll(ctx context.Context, id StorageTargetId) error

StorageTargetResumeThenPoll performs StorageTargetResume then polls until it's completed

func (StorageTargetsClient) StorageTargetSuspend

StorageTargetSuspend ...

func (StorageTargetsClient) StorageTargetSuspendThenPoll

func (c StorageTargetsClient) StorageTargetSuspendThenPoll(ctx context.Context, id StorageTargetId) error

StorageTargetSuspendThenPoll performs StorageTargetSuspend then polls until it's completed

type UnknownTarget

type UnknownTarget struct {
	Attributes *map[string]string `json:"attributes,omitempty"`
}

Jump to

Keyboard shortcuts

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