storagemovers

package
v0.20240411.1104331 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers Documentation

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

Client Initialization

client := storagemovers.NewStorageMoversClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StorageMoversClient.CreateOrUpdate

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

payload := storagemovers.StorageMover{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: StorageMoversClient.Delete

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

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

Example Usage: StorageMoversClient.Get

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

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: StorageMoversClient.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: StorageMoversClient.ListBySubscription

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

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

Example Usage: StorageMoversClient.Update

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

payload := storagemovers.StorageMoverUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateStorageMoverID

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

ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageMover
}

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StorageMover
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StorageMover
}

type ListCompleteResult

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

type ListOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type StorageMover

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

type StorageMoverId

type StorageMoverId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
}

StorageMoverId is a struct representing the Resource ID for a Storage Mover

func NewStorageMoverID

func NewStorageMoverID(subscriptionId string, resourceGroupName string, storageMoverName string) StorageMoverId

NewStorageMoverID returns a new StorageMoverId struct

func ParseStorageMoverID

func ParseStorageMoverID(input string) (*StorageMoverId, error)

ParseStorageMoverID parses 'input' into a StorageMoverId

func ParseStorageMoverIDInsensitively

func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error)

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

func (*StorageMoverId) FromParseResult

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

func (StorageMoverId) ID

func (id StorageMoverId) ID() string

ID returns the formatted Storage Mover ID

func (StorageMoverId) Segments

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

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

func (StorageMoverId) String

func (id StorageMoverId) String() string

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

type StorageMoverOperationPredicate

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

func (StorageMoverOperationPredicate) Matches

type StorageMoverProperties

type StorageMoverProperties struct {
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type StorageMoverUpdateParameters

type StorageMoverUpdateParameters struct {
	Properties *StorageMoverUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string            `json:"tags,omitempty"`
}

type StorageMoverUpdateProperties

type StorageMoverUpdateProperties struct {
	Description *string `json:"description,omitempty"`
}

type StorageMoversClient

type StorageMoversClient struct {
	Client *resourcemanager.Client
}

func NewStorageMoversClientWithBaseURI

func NewStorageMoversClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageMoversClient, error)

func (StorageMoversClient) CreateOrUpdate

CreateOrUpdate ...

func (StorageMoversClient) Delete

Delete ...

func (StorageMoversClient) DeleteThenPoll

func (c StorageMoversClient) DeleteThenPoll(ctx context.Context, id StorageMoverId) error

DeleteThenPoll performs Delete then polls until it's completed

func (StorageMoversClient) Get

Get ...

func (StorageMoversClient) List

List ...

func (StorageMoversClient) ListBySubscription

ListBySubscription ...

func (StorageMoversClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (StorageMoversClient) ListBySubscriptionCompleteMatchingPredicate

func (c StorageMoversClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate StorageMoverOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (StorageMoversClient) ListComplete

ListComplete retrieves all the results into a single object

func (StorageMoversClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (StorageMoversClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StorageMover
}

Jump to

Keyboard shortcuts

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