volumegroups

package
v0.20230823.1052657 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2021-11-20-preview/volumegroups Documentation

The volumegroups SDK allows for interaction with the Azure Resource Manager Service elasticsan (API Version 2021-11-20-preview).

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/elasticsan/2021-11-20-preview/volumegroups"

Client Initialization

client := volumegroups.NewVolumeGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VolumeGroupsClient.Create

ctx := context.TODO()
id := volumegroups.NewVolumeGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "elasticSanValue", "volumeGroupValue")

payload := volumegroups.VolumeGroup{
	// ...
}


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

Example Usage: VolumeGroupsClient.Delete

ctx := context.TODO()
id := volumegroups.NewVolumeGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "elasticSanValue", "volumeGroupValue")

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

Example Usage: VolumeGroupsClient.Get

ctx := context.TODO()
id := volumegroups.NewVolumeGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "elasticSanValue", "volumeGroupValue")

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: VolumeGroupsClient.ListByElasticSan

ctx := context.TODO()
id := volumegroups.NewElasticSanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "elasticSanValue")

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

Example Usage: VolumeGroupsClient.Update

ctx := context.TODO()
id := volumegroups.NewVolumeGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "elasticSanValue", "volumeGroupValue")

payload := volumegroups.VolumeGroupUpdate{
	// ...
}


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 PossibleValuesForAction

func PossibleValuesForAction() []string

func PossibleValuesForEncryptionType

func PossibleValuesForEncryptionType() []string

func PossibleValuesForProvisioningStates

func PossibleValuesForProvisioningStates() []string

func PossibleValuesForState

func PossibleValuesForState() []string

func PossibleValuesForStorageTargetType

func PossibleValuesForStorageTargetType() []string

func ValidateElasticSanID

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

ValidateElasticSanID checks that 'input' can be parsed as a Elastic San ID

func ValidateVolumeGroupID

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

ValidateVolumeGroupID checks that 'input' can be parsed as a Volume Group ID

Types

type Action

type Action string
const (
	ActionAllow Action = "Allow"
)

func (*Action) UnmarshalJSON added in v0.20230516.1215417

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

type CreateOperationResponse

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

type DeleteOperationResponse

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

type ElasticSanId

type ElasticSanId struct {
	SubscriptionId    string
	ResourceGroupName string
	ElasticSanName    string
}

ElasticSanId is a struct representing the Resource ID for a Elastic San

func NewElasticSanID

func NewElasticSanID(subscriptionId string, resourceGroupName string, elasticSanName string) ElasticSanId

NewElasticSanID returns a new ElasticSanId struct

func ParseElasticSanID

func ParseElasticSanID(input string) (*ElasticSanId, error)

ParseElasticSanID parses 'input' into a ElasticSanId

func ParseElasticSanIDInsensitively

func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error)

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

func (ElasticSanId) ID

func (id ElasticSanId) ID() string

ID returns the formatted Elastic San ID

func (ElasticSanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Elastic San ID

func (ElasticSanId) String

func (id ElasticSanId) String() string

String returns a human-readable description of this Elastic San ID

type EncryptionType

type EncryptionType string
const (
	EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
)

func (*EncryptionType) UnmarshalJSON added in v0.20230516.1215417

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

type GetOperationResponse

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

type ListByElasticSanCompleteResult

type ListByElasticSanCompleteResult struct {
	Items []VolumeGroup
}

type ListByElasticSanOperationResponse

type ListByElasticSanOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VolumeGroup
}

type NetworkRuleSet

type NetworkRuleSet struct {
	VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
}

type ProvisioningStates

type ProvisioningStates string
const (
	ProvisioningStatesCanceled  ProvisioningStates = "Canceled"
	ProvisioningStatesCreating  ProvisioningStates = "Creating"
	ProvisioningStatesDeleting  ProvisioningStates = "Deleting"
	ProvisioningStatesFailed    ProvisioningStates = "Failed"
	ProvisioningStatesInvalid   ProvisioningStates = "Invalid"
	ProvisioningStatesPending   ProvisioningStates = "Pending"
	ProvisioningStatesSucceeded ProvisioningStates = "Succeeded"
	ProvisioningStatesUpdating  ProvisioningStates = "Updating"
)

func (*ProvisioningStates) UnmarshalJSON added in v0.20230516.1215417

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

type State

type State string
const (
	StateDeprovisioning       State = "deprovisioning"
	StateFailed               State = "failed"
	StateNetworkSourceDeleted State = "networkSourceDeleted"
	StateProvisioning         State = "provisioning"
	StateSucceeded            State = "succeeded"
)

func (*State) UnmarshalJSON added in v0.20230516.1215417

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

type StorageTargetType

type StorageTargetType string
const (
	StorageTargetTypeIscsi StorageTargetType = "Iscsi"
	StorageTargetTypeNone  StorageTargetType = "None"
)

func (*StorageTargetType) UnmarshalJSON added in v0.20230516.1215417

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

type UpdateOperationResponse

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

type VirtualNetworkRule

type VirtualNetworkRule struct {
	Action *Action `json:"action,omitempty"`
	Id     string  `json:"id"`
	State  *State  `json:"state,omitempty"`
}

type VolumeGroup

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

type VolumeGroupId

type VolumeGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ElasticSanName    string
	VolumeGroupName   string
}

VolumeGroupId is a struct representing the Resource ID for a Volume Group

func NewVolumeGroupID

func NewVolumeGroupID(subscriptionId string, resourceGroupName string, elasticSanName string, volumeGroupName string) VolumeGroupId

NewVolumeGroupID returns a new VolumeGroupId struct

func ParseVolumeGroupID

func ParseVolumeGroupID(input string) (*VolumeGroupId, error)

ParseVolumeGroupID parses 'input' into a VolumeGroupId

func ParseVolumeGroupIDInsensitively

func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error)

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

func (VolumeGroupId) ID

func (id VolumeGroupId) ID() string

ID returns the formatted Volume Group ID

func (VolumeGroupId) Segments

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

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

func (VolumeGroupId) String

func (id VolumeGroupId) String() string

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

type VolumeGroupOperationPredicate

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

func (VolumeGroupOperationPredicate) Matches

type VolumeGroupProperties

type VolumeGroupProperties struct {
	Encryption        *EncryptionType     `json:"encryption,omitempty"`
	NetworkAcls       *NetworkRuleSet     `json:"networkAcls,omitempty"`
	ProtocolType      *StorageTargetType  `json:"protocolType,omitempty"`
	ProvisioningState *ProvisioningStates `json:"provisioningState,omitempty"`
}

type VolumeGroupUpdate

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

type VolumeGroupUpdateProperties

type VolumeGroupUpdateProperties struct {
	Encryption   *EncryptionType    `json:"encryption,omitempty"`
	NetworkAcls  *NetworkRuleSet    `json:"networkAcls,omitempty"`
	ProtocolType *StorageTargetType `json:"protocolType,omitempty"`
}

type VolumeGroupsClient

type VolumeGroupsClient struct {
	Client *resourcemanager.Client
}

func NewVolumeGroupsClientWithBaseURI

func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error)

func (VolumeGroupsClient) Create

Create ...

func (VolumeGroupsClient) CreateThenPoll

func (c VolumeGroupsClient) CreateThenPoll(ctx context.Context, id VolumeGroupId, input VolumeGroup) error

CreateThenPoll performs Create then polls until it's completed

func (VolumeGroupsClient) Delete

Delete ...

func (VolumeGroupsClient) DeleteThenPoll

func (c VolumeGroupsClient) DeleteThenPoll(ctx context.Context, id VolumeGroupId) error

DeleteThenPoll performs Delete then polls until it's completed

func (VolumeGroupsClient) Get

Get ...

func (VolumeGroupsClient) ListByElasticSan

func (c VolumeGroupsClient) ListByElasticSan(ctx context.Context, id ElasticSanId) (result ListByElasticSanOperationResponse, err error)

ListByElasticSan ...

func (VolumeGroupsClient) ListByElasticSanComplete

func (c VolumeGroupsClient) ListByElasticSanComplete(ctx context.Context, id ElasticSanId) (ListByElasticSanCompleteResult, error)

ListByElasticSanComplete retrieves all the results into a single object

func (VolumeGroupsClient) ListByElasticSanCompleteMatchingPredicate

func (c VolumeGroupsClient) ListByElasticSanCompleteMatchingPredicate(ctx context.Context, id ElasticSanId, predicate VolumeGroupOperationPredicate) (result ListByElasticSanCompleteResult, err error)

ListByElasticSanCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VolumeGroupsClient) Update

Update ...

func (VolumeGroupsClient) UpdateThenPoll

func (c VolumeGroupsClient) UpdateThenPoll(ctx context.Context, id VolumeGroupId, input VolumeGroupUpdate) error

UpdateThenPoll performs Update then polls until it's completed

Jump to

Keyboard shortcuts

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