subvolumes

package
v0.20230525.1170505 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2022-09-01/subvolumes Documentation

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

Client Initialization

client := subvolumes.NewSubVolumesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SubVolumesClient.Create

ctx := context.TODO()
id := subvolumes.NewSubVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "subVolumeValue")

payload := subvolumes.SubvolumeInfo{
	// ...
}


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

Example Usage: SubVolumesClient.Delete

ctx := context.TODO()
id := subvolumes.NewSubVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "subVolumeValue")

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

Example Usage: SubVolumesClient.Get

ctx := context.TODO()
id := subvolumes.NewSubVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "subVolumeValue")

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: SubVolumesClient.GetMetadata

ctx := context.TODO()
id := subvolumes.NewSubVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "subVolumeValue")

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

Example Usage: SubVolumesClient.ListByVolume

ctx := context.TODO()
id := subvolumes.NewVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue")

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

Example Usage: SubVolumesClient.Update

ctx := context.TODO()
id := subvolumes.NewSubVolumeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "netAppAccountValue", "capacityPoolValue", "volumeValue", "subVolumeValue")

payload := subvolumes.SubvolumePatchRequest{
	// ...
}


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 ValidateSubVolumeID

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

ValidateSubVolumeID checks that 'input' can be parsed as a Sub Volume ID

func ValidateVolumeID

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

ValidateVolumeID checks that 'input' can be parsed as a Volume ID

Types

type CreateOperationResponse

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

type DeleteOperationResponse

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

type GetMetadataOperationResponse

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

type GetOperationResponse

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

type ListByVolumeCompleteResult

type ListByVolumeCompleteResult struct {
	Items []SubvolumeInfo
}

type ListByVolumeOperationResponse

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

func (ListByVolumeOperationResponse) HasMore

func (r ListByVolumeOperationResponse) HasMore() bool

func (ListByVolumeOperationResponse) LoadMore

type SubVolumeId

type SubVolumeId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	CapacityPoolName  string
	VolumeName        string
	SubVolumeName     string
}

SubVolumeId is a struct representing the Resource ID for a Sub Volume

func NewSubVolumeID

func NewSubVolumeID(subscriptionId string, resourceGroupName string, netAppAccountName string, capacityPoolName string, volumeName string, subVolumeName string) SubVolumeId

NewSubVolumeID returns a new SubVolumeId struct

func ParseSubVolumeID

func ParseSubVolumeID(input string) (*SubVolumeId, error)

ParseSubVolumeID parses 'input' into a SubVolumeId

func ParseSubVolumeIDInsensitively

func ParseSubVolumeIDInsensitively(input string) (*SubVolumeId, error)

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

func (SubVolumeId) ID

func (id SubVolumeId) ID() string

ID returns the formatted Sub Volume ID

func (SubVolumeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Sub Volume ID

func (SubVolumeId) String

func (id SubVolumeId) String() string

String returns a human-readable description of this Sub Volume ID

type SubVolumesClient

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

func NewSubVolumesClientWithBaseURI

func NewSubVolumesClientWithBaseURI(endpoint string) SubVolumesClient

func (SubVolumesClient) Create

Create ...

func (SubVolumesClient) CreateThenPoll

func (c SubVolumesClient) CreateThenPoll(ctx context.Context, id SubVolumeId, input SubvolumeInfo) error

CreateThenPoll performs Create then polls until it's completed

func (SubVolumesClient) Delete

func (c SubVolumesClient) Delete(ctx context.Context, id SubVolumeId) (result DeleteOperationResponse, err error)

Delete ...

func (SubVolumesClient) DeleteThenPoll

func (c SubVolumesClient) DeleteThenPoll(ctx context.Context, id SubVolumeId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SubVolumesClient) Get

Get ...

func (SubVolumesClient) GetMetadata

func (c SubVolumesClient) GetMetadata(ctx context.Context, id SubVolumeId) (result GetMetadataOperationResponse, err error)

GetMetadata ...

func (SubVolumesClient) GetMetadataThenPoll

func (c SubVolumesClient) GetMetadataThenPoll(ctx context.Context, id SubVolumeId) error

GetMetadataThenPoll performs GetMetadata then polls until it's completed

func (SubVolumesClient) ListByVolume

func (c SubVolumesClient) ListByVolume(ctx context.Context, id VolumeId) (resp ListByVolumeOperationResponse, err error)

ListByVolume ...

func (SubVolumesClient) ListByVolumeComplete

func (c SubVolumesClient) ListByVolumeComplete(ctx context.Context, id VolumeId) (ListByVolumeCompleteResult, error)

ListByVolumeComplete retrieves all of the results into a single object

func (SubVolumesClient) ListByVolumeCompleteMatchingPredicate

func (c SubVolumesClient) ListByVolumeCompleteMatchingPredicate(ctx context.Context, id VolumeId, predicate SubvolumeInfoOperationPredicate) (resp ListByVolumeCompleteResult, err error)

ListByVolumeCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SubVolumesClient) Update

Update ...

func (SubVolumesClient) UpdateThenPoll

func (c SubVolumesClient) UpdateThenPoll(ctx context.Context, id SubVolumeId, input SubvolumePatchRequest) error

UpdateThenPoll performs Update then polls until it's completed

type SubvolumeInfo

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

type SubvolumeInfoOperationPredicate

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

func (SubvolumeInfoOperationPredicate) Matches

type SubvolumeModel

type SubvolumeModel struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *SubvolumeModelProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type SubvolumeModelProperties

type SubvolumeModelProperties struct {
	AccessedTimeStamp *string `json:"accessedTimeStamp,omitempty"`
	BytesUsed         *int64  `json:"bytesUsed,omitempty"`
	ChangedTimeStamp  *string `json:"changedTimeStamp,omitempty"`
	CreationTimeStamp *string `json:"creationTimeStamp,omitempty"`
	ModifiedTimeStamp *string `json:"modifiedTimeStamp,omitempty"`
	ParentPath        *string `json:"parentPath,omitempty"`
	Path              *string `json:"path,omitempty"`
	Permissions       *string `json:"permissions,omitempty"`
	ProvisioningState *string `json:"provisioningState,omitempty"`
	Size              *int64  `json:"size,omitempty"`
}

func (*SubvolumeModelProperties) GetAccessedTimeStampAsTime

func (o *SubvolumeModelProperties) GetAccessedTimeStampAsTime() (*time.Time, error)

func (*SubvolumeModelProperties) GetChangedTimeStampAsTime

func (o *SubvolumeModelProperties) GetChangedTimeStampAsTime() (*time.Time, error)

func (*SubvolumeModelProperties) GetCreationTimeStampAsTime

func (o *SubvolumeModelProperties) GetCreationTimeStampAsTime() (*time.Time, error)

func (*SubvolumeModelProperties) GetModifiedTimeStampAsTime

func (o *SubvolumeModelProperties) GetModifiedTimeStampAsTime() (*time.Time, error)

func (*SubvolumeModelProperties) SetAccessedTimeStampAsTime

func (o *SubvolumeModelProperties) SetAccessedTimeStampAsTime(input time.Time)

func (*SubvolumeModelProperties) SetChangedTimeStampAsTime

func (o *SubvolumeModelProperties) SetChangedTimeStampAsTime(input time.Time)

func (*SubvolumeModelProperties) SetCreationTimeStampAsTime

func (o *SubvolumeModelProperties) SetCreationTimeStampAsTime(input time.Time)

func (*SubvolumeModelProperties) SetModifiedTimeStampAsTime

func (o *SubvolumeModelProperties) SetModifiedTimeStampAsTime(input time.Time)

type SubvolumePatchParams

type SubvolumePatchParams struct {
	Path *string `json:"path,omitempty"`
	Size *int64  `json:"size,omitempty"`
}

type SubvolumePatchRequest

type SubvolumePatchRequest struct {
	Properties *SubvolumePatchParams `json:"properties,omitempty"`
}

type SubvolumeProperties

type SubvolumeProperties struct {
	ParentPath        *string `json:"parentPath,omitempty"`
	Path              *string `json:"path,omitempty"`
	ProvisioningState *string `json:"provisioningState,omitempty"`
	Size              *int64  `json:"size,omitempty"`
}

type UpdateOperationResponse

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

type VolumeId

type VolumeId struct {
	SubscriptionId    string
	ResourceGroupName string
	NetAppAccountName string
	CapacityPoolName  string
	VolumeName        string
}

VolumeId is a struct representing the Resource ID for a Volume

func NewVolumeID

func NewVolumeID(subscriptionId string, resourceGroupName string, netAppAccountName string, capacityPoolName string, volumeName string) VolumeId

NewVolumeID returns a new VolumeId struct

func ParseVolumeID

func ParseVolumeID(input string) (*VolumeId, error)

ParseVolumeID parses 'input' into a VolumeId

func ParseVolumeIDInsensitively

func ParseVolumeIDInsensitively(input string) (*VolumeId, error)

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

func (VolumeId) ID

func (id VolumeId) ID() string

ID returns the formatted Volume ID

func (VolumeId) Segments

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

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

func (VolumeId) String

func (id VolumeId) String() string

String returns a human-readable description of this Volume ID

Jump to

Keyboard shortcuts

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