storagetargets

package
v0.20240715.1100358 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/storagetargets Documentation

The storagetargets SDK allows for interaction with the Azure Resource Manager Service storagecache (API Version 2024-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/storagecache/2024-03-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.RestoreDefaults

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

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

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.StorageTargetInvalidate

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

if err := client.StorageTargetInvalidateThenPoll(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"`
	VerificationTimer *int64  `json:"verificationTimer,omitempty"`
	WriteBackTimer    *int64  `json:"writeBackTimer,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) FromParseResult

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

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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageTarget
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type DnsRefreshOperationResponse

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

type GetOperationResponse

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

type ListByCacheCompleteResult

type ListByCacheCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StorageTarget
}

type ListByCacheCustomPager added in v0.20240628.1153531

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

type ListByCacheOperationResponse

type ListByCacheOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StorageTarget
}

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"`
	VerificationTimer *int64  `json:"verificationTimer,omitempty"`
	WriteBackTimer    *int64  `json:"writeBackTimer,omitempty"`
}

type OperationalStateType

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

func (*OperationalStateType) UnmarshalJSON

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

type ProvisioningStateType

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

func (*ProvisioningStateType) UnmarshalJSON

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

type RestoreDefaultsOperationResponse

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

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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

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) FromParseResult

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

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 StorageTargetInvalidateOperationResponse

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

type StorageTargetOperationPredicate

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

func (StorageTargetOperationPredicate) Matches

type StorageTargetProperties

type StorageTargetProperties struct {
	AllocationPercentage *int64                 `json:"allocationPercentage,omitempty"`
	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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type StorageTargetSuspendOperationResponse

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

type StorageTargetType

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

func (*StorageTargetType) UnmarshalJSON

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

type StorageTargetsClient

type StorageTargetsClient struct {
	Client *resourcemanager.Client
}

func NewStorageTargetsClientWithBaseURI

func NewStorageTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageTargetsClient, error)

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

func (c StorageTargetsClient) ListByCache(ctx context.Context, id CacheId) (result ListByCacheOperationResponse, err error)

ListByCache ...

func (StorageTargetsClient) ListByCacheComplete

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

ListByCacheComplete retrieves all the results into a single object

func (StorageTargetsClient) ListByCacheCompleteMatchingPredicate

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

ListByCacheCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (StorageTargetsClient) RestoreDefaults

RestoreDefaults ...

func (StorageTargetsClient) RestoreDefaultsThenPoll

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

RestoreDefaultsThenPoll performs RestoreDefaults then polls until it's completed

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) StorageTargetInvalidate

func (c StorageTargetsClient) StorageTargetInvalidate(ctx context.Context, id StorageTargetId) (result StorageTargetInvalidateOperationResponse, err error)

StorageTargetInvalidate ...

func (StorageTargetsClient) StorageTargetInvalidateThenPoll

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

StorageTargetInvalidateThenPoll performs StorageTargetInvalidate 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