volumegroups

package
v0.20240108.1121319 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups Documentation

The volumegroups SDK allows for interaction with the Azure Resource Manager Service elasticsan (API Version 2023-01-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/elasticsan/2023-01-01/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 PossibleValuesForPrivateEndpointServiceConnectionStatus

func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string

func PossibleValuesForProvisioningStates

func PossibleValuesForProvisioningStates() []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

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) FromParseResult added in v0.20231127.1171502

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

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 EncryptionIdentity

type EncryptionIdentity struct {
	UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
}

type EncryptionProperties

type EncryptionProperties struct {
	Identity           *EncryptionIdentity `json:"identity,omitempty"`
	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
}

type EncryptionType

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

func (*EncryptionType) UnmarshalJSON

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

type GetOperationResponse

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

type KeyVaultProperties

type KeyVaultProperties struct {
	CurrentVersionedKeyExpirationTimestamp *string `json:"currentVersionedKeyExpirationTimestamp,omitempty"`
	CurrentVersionedKeyIdentifier          *string `json:"currentVersionedKeyIdentifier,omitempty"`
	KeyName                                *string `json:"keyName,omitempty"`
	KeyVaultUri                            *string `json:"keyVaultUri,omitempty"`
	KeyVersion                             *string `json:"keyVersion,omitempty"`
	LastKeyRotationTimestamp               *string `json:"lastKeyRotationTimestamp,omitempty"`
}

func (*KeyVaultProperties) GetCurrentVersionedKeyExpirationTimestampAsTime

func (o *KeyVaultProperties) GetCurrentVersionedKeyExpirationTimestampAsTime() (*time.Time, error)

func (*KeyVaultProperties) GetLastKeyRotationTimestampAsTime

func (o *KeyVaultProperties) GetLastKeyRotationTimestampAsTime() (*time.Time, error)

func (*KeyVaultProperties) SetCurrentVersionedKeyExpirationTimestampAsTime

func (o *KeyVaultProperties) SetCurrentVersionedKeyExpirationTimestampAsTime(input time.Time)

func (*KeyVaultProperties) SetLastKeyRotationTimestampAsTime

func (o *KeyVaultProperties) SetLastKeyRotationTimestampAsTime(input time.Time)

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 PrivateEndpoint

type PrivateEndpoint struct {
	Id *string `json:"id,omitempty"`
}

type PrivateEndpointConnection

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

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	GroupIds                          *[]string                         `json:"groupIds,omitempty"`
	PrivateEndpoint                   *PrivateEndpoint                  `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"`
	ProvisioningState                 *ProvisioningStates               `json:"provisioningState,omitempty"`
}

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string
const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusFailed   PrivateEndpointServiceConnectionStatus = "Failed"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func (*PrivateEndpointServiceConnectionStatus) UnmarshalJSON

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

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string                                 `json:"actionsRequired,omitempty"`
	Description     *string                                 `json:"description,omitempty"`
	Status          *PrivateEndpointServiceConnectionStatus `json:"status,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

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

type StorageTargetType

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

func (*StorageTargetType) UnmarshalJSON

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"`
}

type VolumeGroup

type VolumeGroup struct {
	Id         *string                           `json:"id,omitempty"`
	Identity   *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *VolumeGroupProperties            `json:"properties,omitempty"`
	SystemData *systemdata.SystemData            `json:"systemData,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) FromParseResult added in v0.20231127.1171502

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

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"`
	EncryptionProperties       *EncryptionProperties        `json:"encryptionProperties,omitempty"`
	NetworkAcls                *NetworkRuleSet              `json:"networkAcls,omitempty"`
	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	ProtocolType               *StorageTargetType           `json:"protocolType,omitempty"`
	ProvisioningState          *ProvisioningStates          `json:"provisioningState,omitempty"`
}

type VolumeGroupUpdate

type VolumeGroupUpdate struct {
	Identity   *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
	Properties *VolumeGroupUpdateProperties      `json:"properties,omitempty"`
}

type VolumeGroupUpdateProperties

type VolumeGroupUpdateProperties struct {
	Encryption           *EncryptionType       `json:"encryption,omitempty"`
	EncryptionProperties *EncryptionProperties `json:"encryptionProperties,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