subvolumes

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/subvolumes Documentation

The subvolumes SDK allows for interaction with Azure Resource Manager netapp (API Version 2023-11-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/2023-11-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", "netAppAccountName", "capacityPoolName", "volumeName", "subVolumeName")

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", "netAppAccountName", "capacityPoolName", "volumeName", "subVolumeName")

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", "netAppAccountName", "capacityPoolName", "volumeName", "subVolumeName")

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", "netAppAccountName", "capacityPoolName", "volumeName", "subVolumeName")

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", "netAppAccountName", "capacityPoolName", "volumeName")

// 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", "netAppAccountName", "capacityPoolName", "volumeName", "subVolumeName")

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

type DeleteOperationResponse

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

type GetMetadataOperationResponse

type GetMetadataOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SubvolumeModel
}

type GetOperationResponse

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

type ListByVolumeCompleteResult

type ListByVolumeCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SubvolumeInfo
}

type ListByVolumeCustomPager added in v0.20240628.1153531

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

type ListByVolumeOperationResponse

type ListByVolumeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SubvolumeInfo
}

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

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

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 *resourcemanager.Client
}

func NewSubVolumesClientWithBaseURI

func NewSubVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubVolumesClient, error)

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) (result ListByVolumeOperationResponse, err error)

ListByVolume ...

func (SubVolumesClient) ListByVolumeComplete

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

ListByVolumeComplete retrieves all the results into a single object

func (SubVolumesClient) ListByVolumeCompleteMatchingPredicate

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

ListByVolumeCompleteMatchingPredicate retrieves all the results and then applies 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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SubvolumeInfo
}

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

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

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