armelasticsan

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 14 Imported by: 1

README

Azure Elasticsan Module for Go

PkgGoDev

The armelasticsan module provides operations for working with Azure Elasticsan.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Elasticsan module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Elasticsan. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Elasticsan module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armelasticsan.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armelasticsan.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewElasticSansClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Elasticsan label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.4.0

type Action string

Action - The action of virtual network rule.

const (
	ActionAllow Action = "Allow"
)

func PossibleActionValues added in v0.4.0

func PossibleActionValues() []Action

PossibleActionValues returns the possible values for the Action const type.

type ActionType added in v0.3.0

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues added in v0.3.0

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ClientFactory added in v0.2.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.2.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewElasticSansClient added in v0.2.0

func (c *ClientFactory) NewElasticSansClient() *ElasticSansClient

NewElasticSansClient creates a new instance of ElasticSansClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v0.3.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v0.3.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewSKUsClient added in v0.2.0

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewVolumeGroupsClient added in v0.2.0

func (c *ClientFactory) NewVolumeGroupsClient() *VolumeGroupsClient

NewVolumeGroupsClient creates a new instance of VolumeGroupsClient.

func (*ClientFactory) NewVolumeSnapshotsClient added in v0.4.0

func (c *ClientFactory) NewVolumeSnapshotsClient() *VolumeSnapshotsClient

NewVolumeSnapshotsClient creates a new instance of VolumeSnapshotsClient.

func (*ClientFactory) NewVolumesClient added in v0.2.0

func (c *ClientFactory) NewVolumesClient() *VolumesClient

NewVolumesClient creates a new instance of VolumesClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type ElasticSan

type ElasticSan struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of ElasticSan.
	Properties *Properties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ElasticSan - Response for ElasticSan request.

func (ElasticSan) MarshalJSON

func (e ElasticSan) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ElasticSan.

func (*ElasticSan) UnmarshalJSON

func (e *ElasticSan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ElasticSan.

type ElasticSansClient

type ElasticSansClient struct {
	// contains filtered or unexported fields
}

ElasticSansClient contains the methods for the ElasticSans group. Don't use this type directly, use NewElasticSansClient() instead.

func NewElasticSansClient

func NewElasticSansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticSansClient, error)

NewElasticSansClient creates a new instance of ElasticSansClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ElasticSansClient) BeginCreate

func (client *ElasticSansClient) BeginCreate(ctx context.Context, resourceGroupName string, elasticSanName string, parameters ElasticSan, options *ElasticSansClientBeginCreateOptions) (*runtime.Poller[ElasticSansClientCreateResponse], error)

BeginCreate - Create ElasticSan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • parameters - Elastic San object.
  • options - ElasticSansClientBeginCreateOptions contains the optional parameters for the ElasticSansClient.BeginCreate method.
Example (ElasticSansCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", armelasticsan.ElasticSan{
		Location: to.Ptr("France Central"),
		Tags: map[string]*string{
			"key9316": to.Ptr("ihndtieqibtob"),
		},
		Properties: &armelasticsan.Properties{
			AvailabilityZones: []*string{
				to.Ptr("1")},
			BaseSizeTiB:             to.Ptr[int64](5),
			ExtendedCapacitySizeTiB: to.Ptr[int64](25),
			PublicNetworkAccess:     to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
			SKU: &armelasticsan.SKU{
				Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
				Tier: to.Ptr(armelasticsan.SKUTierPremium),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 			SKU: &armelasticsan.SKU{
	// 				Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 				Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 			},
	// 			TotalIops: to.Ptr[int64](22),
	// 			TotalMBps: to.Ptr[int64](4),
	// 			TotalSizeTiB: to.Ptr[int64](27),
	// 			TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 			VolumeGroupCount: to.Ptr[int64](24),
	// 		},
	// 	}
}
Output:

Example (ElasticSansCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", armelasticsan.ElasticSan{
		Location: to.Ptr("France Central"),
		Properties: &armelasticsan.Properties{
			BaseSizeTiB:             to.Ptr[int64](15),
			ExtendedCapacitySizeTiB: to.Ptr[int64](27),
			SKU: &armelasticsan.SKU{
				Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 			SKU: &armelasticsan.SKU{
	// 				Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 				Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 			},
	// 			TotalIops: to.Ptr[int64](22),
	// 			TotalMBps: to.Ptr[int64](4),
	// 			TotalSizeTiB: to.Ptr[int64](27),
	// 			TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 			VolumeGroupCount: to.Ptr[int64](24),
	// 		},
	// 	}
}
Output:

func (*ElasticSansClient) BeginDelete

func (client *ElasticSansClient) BeginDelete(ctx context.Context, resourceGroupName string, elasticSanName string, options *ElasticSansClientBeginDeleteOptions) (*runtime.Poller[ElasticSansClientDeleteResponse], error)

BeginDelete - Delete a Elastic San. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • options - ElasticSansClientBeginDeleteOptions contains the optional parameters for the ElasticSansClient.BeginDelete method.
Example (ElasticSansDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (ElasticSansDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ElasticSansClient) BeginUpdate

func (client *ElasticSansClient) BeginUpdate(ctx context.Context, resourceGroupName string, elasticSanName string, parameters Update, options *ElasticSansClientBeginUpdateOptions) (*runtime.Poller[ElasticSansClientUpdateResponse], error)

BeginUpdate - Update a Elastic San. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • parameters - Elastic San object.
  • options - ElasticSansClientBeginUpdateOptions contains the optional parameters for the ElasticSansClient.BeginUpdate method.
Example (ElasticSansUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", armelasticsan.Update{
		Properties: &armelasticsan.UpdateProperties{
			BaseSizeTiB:             to.Ptr[int64](13),
			ExtendedCapacitySizeTiB: to.Ptr[int64](29),
			PublicNetworkAccess:     to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
		},
		Tags: map[string]*string{
			"key1931": to.Ptr("yhjwkgmrrwrcoxblgwgzjqusch"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 				{
	// 					Name: to.Ptr("{privateEndpointConnectionName}"),
	// 					Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 					SystemData: &armelasticsan.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 						CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 						CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("bcclmbseed"),
	// 						LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					},
	// 					Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 							PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("Auto-Approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 							},
	// 							ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 				PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 				SKU: &armelasticsan.SKU{
	// 					Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 					Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 				},
	// 				TotalIops: to.Ptr[int64](22),
	// 				TotalMBps: to.Ptr[int64](4),
	// 				TotalSizeTiB: to.Ptr[int64](27),
	// 				TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 				VolumeGroupCount: to.Ptr[int64](24),
	// 			},
	// 		}
}
Output:

Example (ElasticSansUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewElasticSansClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", armelasticsan.Update{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 				{
	// 					Name: to.Ptr("{privateEndpointConnectionName}"),
	// 					Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 					SystemData: &armelasticsan.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 						CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 						CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("bcclmbseed"),
	// 						LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					},
	// 					Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 							PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("Auto-Approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 							},
	// 							ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 				PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 				SKU: &armelasticsan.SKU{
	// 					Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 					Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 				},
	// 				TotalIops: to.Ptr[int64](22),
	// 				TotalMBps: to.Ptr[int64](4),
	// 				TotalSizeTiB: to.Ptr[int64](27),
	// 				TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 				VolumeGroupCount: to.Ptr[int64](24),
	// 			},
	// 		}
}
Output:

func (*ElasticSansClient) Get

func (client *ElasticSansClient) Get(ctx context.Context, resourceGroupName string, elasticSanName string, options *ElasticSansClientGetOptions) (ElasticSansClientGetResponse, error)

Get - Get a ElasticSan. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • options - ElasticSansClientGetOptions contains the optional parameters for the ElasticSansClient.Get method.
Example (ElasticSansGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewElasticSansClient().Get(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 				{
	// 					Name: to.Ptr("{privateEndpointConnectionName}"),
	// 					Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 					SystemData: &armelasticsan.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 						CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 						CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 						LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					},
	// 					Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 							PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("Auto-Approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 							},
	// 							ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 				PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 				SKU: &armelasticsan.SKU{
	// 					Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 					Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 				},
	// 				TotalIops: to.Ptr[int64](22),
	// 				TotalMBps: to.Ptr[int64](4),
	// 				TotalSizeTiB: to.Ptr[int64](27),
	// 				TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 				VolumeGroupCount: to.Ptr[int64](24),
	// 			},
	// 		}
}
Output:

Example (ElasticSansGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewElasticSansClient().Get(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ElasticSan = armelasticsan.ElasticSan{
	// 	Name: to.Ptr("vfoatmakv"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("France Central"),
	// 	Tags: map[string]*string{
	// 		"key5002": to.Ptr("lhag"),
	// 	},
	// 	Properties: &armelasticsan.Properties{
	// 		AvailabilityZones: []*string{
	// 			to.Ptr("1")},
	// 			BaseSizeTiB: to.Ptr[int64](15),
	// 			ExtendedCapacitySizeTiB: to.Ptr[int64](6),
	// 			PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 				{
	// 					Name: to.Ptr("{privateEndpointConnectionName}"),
	// 					Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 					SystemData: &armelasticsan.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 						CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 						CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 						LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					},
	// 					Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 							PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 								ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 								Description: to.Ptr("Auto-Approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 							},
	// 							ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 						},
	// 				}},
	// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 				PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
	// 				SKU: &armelasticsan.SKU{
	// 					Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
	// 					Tier: to.Ptr(armelasticsan.SKUTierPremium),
	// 				},
	// 				TotalIops: to.Ptr[int64](22),
	// 				TotalMBps: to.Ptr[int64](4),
	// 				TotalSizeTiB: to.Ptr[int64](27),
	// 				TotalVolumeSizeGiB: to.Ptr[int64](15),
	// 				VolumeGroupCount: to.Ptr[int64](24),
	// 			},
	// 		}
}
Output:

func (*ElasticSansClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Gets a list of ElasticSan in a resource group.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - ElasticSansClientListByResourceGroupOptions contains the optional parameters for the ElasticSansClient.NewListByResourceGroupPager method.
Example (ElasticSansListByResourceGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewElasticSansClient().NewListByResourceGroupPager("resourcegroupname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.List = armelasticsan.List{
		// 	Value: []*armelasticsan.ElasticSan{
		// 		{
		// 			Name: to.Ptr("vfoatmakv"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
		// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("France Central"),
		// 			Tags: map[string]*string{
		// 				"key5002": to.Ptr("lhag"),
		// 			},
		// 			Properties: &armelasticsan.Properties{
		// 				AvailabilityZones: []*string{
		// 					to.Ptr("1")},
		// 					BaseSizeTiB: to.Ptr[int64](15),
		// 					ExtendedCapacitySizeTiB: to.Ptr[int64](6),
		// 					PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
		// 						{
		// 							Name: to.Ptr("{privateEndpointConnectionName}"),
		// 							Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
		// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 							SystemData: &armelasticsan.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 								CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("bcclmbseed"),
		// 								LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 							},
		// 							Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
		// 									PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 										Description: to.Ptr("Auto-Approved"),
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 									},
		// 									ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 						PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
		// 						SKU: &armelasticsan.SKU{
		// 							Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
		// 							Tier: to.Ptr(armelasticsan.SKUTierPremium),
		// 						},
		// 						TotalIops: to.Ptr[int64](22),
		// 						TotalMBps: to.Ptr[int64](4),
		// 						TotalSizeTiB: to.Ptr[int64](27),
		// 						TotalVolumeSizeGiB: to.Ptr[int64](15),
		// 						VolumeGroupCount: to.Ptr[int64](24),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

Example (ElasticSansListByResourceGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewElasticSansClient().NewListByResourceGroupPager("resourcegroupname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.List = armelasticsan.List{
		// 	Value: []*armelasticsan.ElasticSan{
		// 		{
		// 			Name: to.Ptr("vfoatmakv"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
		// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("France Central"),
		// 			Tags: map[string]*string{
		// 				"key5002": to.Ptr("lhag"),
		// 			},
		// 			Properties: &armelasticsan.Properties{
		// 				AvailabilityZones: []*string{
		// 					to.Ptr("1")},
		// 					BaseSizeTiB: to.Ptr[int64](15),
		// 					ExtendedCapacitySizeTiB: to.Ptr[int64](6),
		// 					PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
		// 						{
		// 							Name: to.Ptr("{privateEndpointConnectionName}"),
		// 							Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
		// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 							SystemData: &armelasticsan.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 								CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("bcclmbseed"),
		// 								LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 							},
		// 							Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
		// 									PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 										Description: to.Ptr("Auto-Approved"),
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 									},
		// 									ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 						PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
		// 						SKU: &armelasticsan.SKU{
		// 							Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
		// 							Tier: to.Ptr(armelasticsan.SKUTierPremium),
		// 						},
		// 						TotalIops: to.Ptr[int64](22),
		// 						TotalMBps: to.Ptr[int64](4),
		// 						TotalSizeTiB: to.Ptr[int64](27),
		// 						TotalVolumeSizeGiB: to.Ptr[int64](15),
		// 						VolumeGroupCount: to.Ptr[int64](24),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*ElasticSansClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Gets a list of ElasticSans in a subscription

Generated from API version 2023-01-01

  • options - ElasticSansClientListBySubscriptionOptions contains the optional parameters for the ElasticSansClient.NewListBySubscriptionPager method.
Example (ElasticSansListBySubscriptionMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewElasticSansClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.List = armelasticsan.List{
		// 	Value: []*armelasticsan.ElasticSan{
		// 		{
		// 			Name: to.Ptr("vfoatmakv"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
		// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("France Central"),
		// 			Tags: map[string]*string{
		// 				"key5002": to.Ptr("lhag"),
		// 			},
		// 			Properties: &armelasticsan.Properties{
		// 				AvailabilityZones: []*string{
		// 					to.Ptr("1")},
		// 					BaseSizeTiB: to.Ptr[int64](15),
		// 					ExtendedCapacitySizeTiB: to.Ptr[int64](6),
		// 					PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
		// 						{
		// 							Name: to.Ptr("{privateEndpointConnectionName}"),
		// 							Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
		// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 							SystemData: &armelasticsan.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 								CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("bcclmbseed"),
		// 								LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 							},
		// 							Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
		// 									PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 										Description: to.Ptr("Auto-Approved"),
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 									},
		// 									ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 						PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
		// 						SKU: &armelasticsan.SKU{
		// 							Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
		// 							Tier: to.Ptr(armelasticsan.SKUTierPremium),
		// 						},
		// 						TotalIops: to.Ptr[int64](22),
		// 						TotalMBps: to.Ptr[int64](4),
		// 						TotalSizeTiB: to.Ptr[int64](27),
		// 						TotalVolumeSizeGiB: to.Ptr[int64](15),
		// 						VolumeGroupCount: to.Ptr[int64](24),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

Example (ElasticSansListBySubscriptionMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewElasticSansClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.List = armelasticsan.List{
		// 	Value: []*armelasticsan.ElasticSan{
		// 		{
		// 			Name: to.Ptr("vfoatmakv"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/ElasticSans"),
		// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("France Central"),
		// 			Tags: map[string]*string{
		// 				"key5002": to.Ptr("lhag"),
		// 			},
		// 			Properties: &armelasticsan.Properties{
		// 				AvailabilityZones: []*string{
		// 					to.Ptr("1")},
		// 					BaseSizeTiB: to.Ptr[int64](15),
		// 					ExtendedCapacitySizeTiB: to.Ptr[int64](6),
		// 					PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
		// 						{
		// 							Name: to.Ptr("{privateEndpointConnectionName}"),
		// 							Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
		// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 							SystemData: &armelasticsan.SystemData{
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 								CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("bcclmbseed"),
		// 								LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 							},
		// 							Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
		// 									PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 										ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
		// 									},
		// 									PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 										Description: to.Ptr("Auto-Approved"),
		// 										ActionsRequired: to.Ptr("None"),
		// 										Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 									},
		// 									ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 								},
		// 						}},
		// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 						PublicNetworkAccess: to.Ptr(armelasticsan.PublicNetworkAccessEnabled),
		// 						SKU: &armelasticsan.SKU{
		// 							Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
		// 							Tier: to.Ptr(armelasticsan.SKUTierPremium),
		// 						},
		// 						TotalIops: to.Ptr[int64](22),
		// 						TotalMBps: to.Ptr[int64](4),
		// 						TotalSizeTiB: to.Ptr[int64](27),
		// 						TotalVolumeSizeGiB: to.Ptr[int64](15),
		// 						VolumeGroupCount: to.Ptr[int64](24),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type ElasticSansClientBeginCreateOptions

type ElasticSansClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ElasticSansClientBeginCreateOptions contains the optional parameters for the ElasticSansClient.BeginCreate method.

type ElasticSansClientBeginDeleteOptions

type ElasticSansClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ElasticSansClientBeginDeleteOptions contains the optional parameters for the ElasticSansClient.BeginDelete method.

type ElasticSansClientBeginUpdateOptions

type ElasticSansClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ElasticSansClientBeginUpdateOptions contains the optional parameters for the ElasticSansClient.BeginUpdate method.

type ElasticSansClientCreateResponse

type ElasticSansClientCreateResponse struct {
	// Response for ElasticSan request.
	ElasticSan
}

ElasticSansClientCreateResponse contains the response from method ElasticSansClient.BeginCreate.

type ElasticSansClientDeleteResponse

type ElasticSansClientDeleteResponse struct {
}

ElasticSansClientDeleteResponse contains the response from method ElasticSansClient.BeginDelete.

type ElasticSansClientGetOptions

type ElasticSansClientGetOptions struct {
}

ElasticSansClientGetOptions contains the optional parameters for the ElasticSansClient.Get method.

type ElasticSansClientGetResponse

type ElasticSansClientGetResponse struct {
	// Response for ElasticSan request.
	ElasticSan
}

ElasticSansClientGetResponse contains the response from method ElasticSansClient.Get.

type ElasticSansClientListByResourceGroupOptions

type ElasticSansClientListByResourceGroupOptions struct {
}

ElasticSansClientListByResourceGroupOptions contains the optional parameters for the ElasticSansClient.NewListByResourceGroupPager method.

type ElasticSansClientListByResourceGroupResponse

type ElasticSansClientListByResourceGroupResponse struct {
	// List of Elastic Sans
	List
}

ElasticSansClientListByResourceGroupResponse contains the response from method ElasticSansClient.NewListByResourceGroupPager.

type ElasticSansClientListBySubscriptionOptions

type ElasticSansClientListBySubscriptionOptions struct {
}

ElasticSansClientListBySubscriptionOptions contains the optional parameters for the ElasticSansClient.NewListBySubscriptionPager method.

type ElasticSansClientListBySubscriptionResponse

type ElasticSansClientListBySubscriptionResponse struct {
	// List of Elastic Sans
	List
}

ElasticSansClientListBySubscriptionResponse contains the response from method ElasticSansClient.NewListBySubscriptionPager.

type ElasticSansClientUpdateResponse

type ElasticSansClientUpdateResponse struct {
	// Response for ElasticSan request.
	ElasticSan
}

ElasticSansClientUpdateResponse contains the response from method ElasticSansClient.BeginUpdate.

type EncryptionIdentity added in v0.4.0

type EncryptionIdentity struct {
	// Resource identifier of the UserAssigned identity to be associated with server-side encryption on the volume group.
	EncryptionUserAssignedIdentity *string
}

EncryptionIdentity - Encryption identity for the volume group.

func (EncryptionIdentity) MarshalJSON added in v0.4.0

func (e EncryptionIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionIdentity.

func (*EncryptionIdentity) UnmarshalJSON added in v0.4.0

func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionIdentity.

type EncryptionProperties added in v0.4.0

type EncryptionProperties struct {
	// The identity to be used with service-side encryption at rest.
	EncryptionIdentity *EncryptionIdentity

	// Properties provided by key vault.
	KeyVaultProperties *KeyVaultProperties
}

EncryptionProperties - The encryption settings on the volume group.

func (EncryptionProperties) MarshalJSON added in v0.4.0

func (e EncryptionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionProperties.

func (*EncryptionProperties) UnmarshalJSON added in v0.4.0

func (e *EncryptionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProperties.

type EncryptionType

type EncryptionType string

EncryptionType - The type of key used to encrypt the data of the disk.

const (
	// EncryptionTypeEncryptionAtRestWithCustomerManagedKey - Volume is encrypted at rest with Customer managed key that can be
	// changed and revoked by a customer.
	EncryptionTypeEncryptionAtRestWithCustomerManagedKey EncryptionType = "EncryptionAtRestWithCustomerManagedKey"
	// EncryptionTypeEncryptionAtRestWithPlatformKey - Volume is encrypted at rest with Platform managed key. It is the default
	// encryption type.
	EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
)

func PossibleEncryptionTypeValues

func PossibleEncryptionTypeValues() []EncryptionType

PossibleEncryptionTypeValues returns the possible values for the EncryptionType const type.

type Identity added in v0.4.0

type Identity struct {
	// REQUIRED; The identity type.
	Type *IdentityType

	// Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this volume
	// group. The key is the ARM resource identifier of the identity.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

Identity for the resource.

func (Identity) MarshalJSON added in v0.4.0

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v0.4.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type IdentityType added in v0.4.0

type IdentityType string

IdentityType - The identity type.

const (
	IdentityTypeNone           IdentityType = "None"
	IdentityTypeSystemAssigned IdentityType = "SystemAssigned"
	IdentityTypeUserAssigned   IdentityType = "UserAssigned"
)

func PossibleIdentityTypeValues added in v0.4.0

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type IscsiTargetInfo

type IscsiTargetInfo struct {
	// Operational status of the iSCSI Target.
	Status *OperationalStatus

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates

	// READ-ONLY; iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
	TargetIqn *string

	// READ-ONLY; iSCSI Target Portal Host Name
	TargetPortalHostname *string

	// READ-ONLY; iSCSI Target Portal Port
	TargetPortalPort *int32
}

IscsiTargetInfo - Iscsi target information

func (IscsiTargetInfo) MarshalJSON

func (i IscsiTargetInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IscsiTargetInfo.

func (*IscsiTargetInfo) UnmarshalJSON

func (i *IscsiTargetInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IscsiTargetInfo.

type KeyVaultProperties added in v0.4.0

type KeyVaultProperties struct {
	// The name of KeyVault key.
	KeyName *string

	// The Uri of KeyVault.
	KeyVaultURI *string

	// The version of KeyVault key.
	KeyVersion *string

	// READ-ONLY; This is a read only property that represents the expiration time of the current version of the customer managed
	// key used for encryption.
	CurrentVersionedKeyExpirationTimestamp *time.Time

	// READ-ONLY; The object identifier of the current versioned Key Vault Key in use.
	CurrentVersionedKeyIdentifier *string

	// READ-ONLY; Timestamp of last rotation of the Key Vault Key.
	LastKeyRotationTimestamp *time.Time
}

KeyVaultProperties - Properties of key vault.

func (KeyVaultProperties) MarshalJSON added in v0.4.0

func (k KeyVaultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON added in v0.4.0

func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type List

type List struct {
	// An array of Elastic San objects.
	Value []*ElasticSan

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

List of Elastic Sans

func (List) MarshalJSON

func (l List) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type List.

func (*List) UnmarshalJSON

func (l *List) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type List.

type ManagedByInfo added in v0.4.0

type ManagedByInfo struct {
	// Resource ID of the resource managing the volume, this is a restricted field and can only be set for internal use.
	ResourceID *string
}

ManagedByInfo - Parent resource information.

func (ManagedByInfo) MarshalJSON added in v0.4.0

func (m ManagedByInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedByInfo.

func (*ManagedByInfo) UnmarshalJSON added in v0.4.0

func (m *ManagedByInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedByInfo.

type NetworkRuleSet

type NetworkRuleSet struct {
	// The list of virtual network rules.
	VirtualNetworkRules []*VirtualNetworkRule
}

NetworkRuleSet - A set of rules governing the network accessibility.

func (NetworkRuleSet) MarshalJSON

func (n NetworkRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.

func (*NetworkRuleSet) UnmarshalJSON

func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.

type Operation added in v0.3.0

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON added in v0.3.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.3.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationalStatus

type OperationalStatus string

OperationalStatus - Operational status of the resource.

const (
	OperationalStatusHealthy            OperationalStatus = "Healthy"
	OperationalStatusInvalid            OperationalStatus = "Invalid"
	OperationalStatusRunning            OperationalStatus = "Running"
	OperationalStatusStopped            OperationalStatus = "Stopped"
	OperationalStatusStoppedDeallocated OperationalStatus = "Stopped (deallocated)"
	OperationalStatusUnhealthy          OperationalStatus = "Unhealthy"
	OperationalStatusUnknown            OperationalStatus = "Unknown"
	OperationalStatusUpdating           OperationalStatus = "Updating"
)

func PossibleOperationalStatusValues

func PossibleOperationalStatusValues() []OperationalStatus

PossibleOperationalStatusValues returns the possible values for the OperationalStatus const type.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Gets a list of ElasticSan operations.

Generated from API version 2023-01-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example (OperationsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armelasticsan.OperationListResult{
		// 	Value: []*armelasticsan.Operation{
		// 		{
		// 			Name: to.Ptr("zgtqmglizaqlsx"),
		// 			ActionType: to.Ptr(armelasticsan.ActionTypeInternal),
		// 			Display: &armelasticsan.OperationDisplay{
		// 				Description: to.Ptr("pmkjqzjverubmslnrcadqur"),
		// 				Operation: to.Ptr("yumtqbnawcvunwda"),
		// 				Provider: to.Ptr("apbqaoiegbmipkbqdczsuvlak"),
		// 				Resource: to.Ptr("hjyuuxkj"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 			Origin: to.Ptr(armelasticsan.OriginUser),
		// 	}},
		// }
	}
}
Output:

Example (OperationsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Operations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armelasticsan.OperationListResult{
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin added in v0.3.0

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues added in v0.3.0

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PrivateEndpoint added in v0.3.0

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - Response for PrivateEndpoint

func (PrivateEndpoint) MarshalJSON added in v0.3.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v0.3.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection added in v0.3.0

type PrivateEndpointConnection struct {
	// REQUIRED; Private Endpoint Connection Properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - Response for PrivateEndpoint Connection object

func (PrivateEndpointConnection) MarshalJSON added in v0.3.0

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v0.3.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult added in v0.3.0

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

PrivateEndpointConnectionListResult - List of private endpoint connections associated with SAN

func (PrivateEndpointConnectionListResult) MarshalJSON added in v0.3.0

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v0.3.0

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties added in v0.3.0

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; Private Link Service Connection State.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// List of resources private endpoint is mapped
	GroupIDs []*string

	// Private Endpoint resource
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; Provisioning State of Private Endpoint connection resource
	ProvisioningState *ProvisioningStates
}

PrivateEndpointConnectionProperties - Response for PrivateEndpoint connection properties

func (PrivateEndpointConnectionProperties) MarshalJSON added in v0.3.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v0.3.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionsClient added in v0.3.0

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient added in v0.3.0

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginCreate added in v0.3.0

func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, elasticSanName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateResponse], error)

BeginCreate - Update the state of specified private endpoint connection associated with the Elastic San If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • privateEndpointConnectionName - The name of the Private Endpoint connection.
  • parameters - Private Endpoint Connection Approval object.
  • options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.
Example (PrivateEndpointConnectionsCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", armelasticsan.PrivateEndpointConnection{
		Properties: &armelasticsan.PrivateEndpointConnectionProperties{
			GroupIDs: []*string{
				to.Ptr("jdwrzpemdjrpiwzvy")},
			PrivateEndpoint: &armelasticsan.PrivateEndpoint{},
			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
				Description:     to.Ptr("dxl"),
				ActionsRequired: to.Ptr("jhjdpwvyzipggtn"),
				Status:          to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armelasticsan.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		CreatedBy: to.Ptr("bgurjvijz"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 			PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Auto-Approved"),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 			},
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

Example (PrivateEndpointConnectionsCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", armelasticsan.PrivateEndpointConnection{
		Properties: &armelasticsan.PrivateEndpointConnectionProperties{
			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armelasticsan.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		CreatedBy: to.Ptr("bgurjvijz"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 			PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Auto-Approved"),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 			},
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete added in v0.3.0

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, elasticSanName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes the specified private endpoint connection associated with the Elastic San If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • privateEndpointConnectionName - The name of the Private Endpoint connection.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example (PrivateEndpointConnectionsDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (PrivateEndpointConnectionsDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get added in v0.3.0

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, elasticSanName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets the specified private endpoint connection associated with the Elastic San If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • privateEndpointConnectionName - The name of the Private Endpoint connection.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example (PrivateEndpointConnectionsGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armelasticsan.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		CreatedBy: to.Ptr("bgurjvijz"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 			PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Auto-Approved"),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 			},
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

Example (PrivateEndpointConnectionsGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "resourcegroupname", "elasticsanname", "privateendpointconnectionname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armelasticsan.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		CreatedBy: to.Ptr("bgurjvijz"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 			PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Auto-Approved"),
	// 				ActionsRequired: to.Ptr("None"),
	// 				Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 			},
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.3.0

NewListPager - List all Private Endpoint Connections associated with the Elastic San.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example (PrivateEndpointConnectionsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("resourcegroupname", "elasticsanname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionListResult = armelasticsan.PrivateEndpointConnectionListResult{
		// 	Value: []*armelasticsan.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("vyzqckpcwufpvalbspekxikt"),
		// 			Type: to.Ptr("ldolsnjwzutewucdfessitnxqb"),
		// 			ID: to.Ptr("ynin"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
		// 				CreatedBy: to.Ptr("bgurjvijz"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 				GroupIDs: []*string{
		// 					to.Ptr("jdwrzpemdjrpiwzvy")},
		// 					PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 						ID: to.Ptr("gktekmqchmjqxhfvywq"),
		// 					},
		// 					PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 						Description: to.Ptr("dxl"),
		// 						ActionsRequired: to.Ptr("jhjdpwvyzipggtn"),
		// 						Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 					},
		// 					ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (PrivateEndpointConnectionsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("resourcegroupname", "elasticsanname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionListResult = armelasticsan.PrivateEndpointConnectionListResult{
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOptions added in v0.3.0

type PrivateEndpointConnectionsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.3.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateResponse added in v0.3.0

type PrivateEndpointConnectionsClientCreateResponse struct {
	// Response for PrivateEndpoint Connection object
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.3.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.3.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// Response for PrivateEndpoint Connection object
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.3.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	// List of private endpoint connections associated with SAN
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateEndpointServiceConnectionStatus added in v0.3.0

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

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

func PossiblePrivateEndpointServiceConnectionStatusValues added in v0.3.0

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource added in v0.3.0

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON added in v0.3.0

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v0.3.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult added in v0.3.0

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON added in v0.3.0

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON added in v0.3.0

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties added in v0.3.0

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON added in v0.3.0

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v0.3.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient added in v0.3.0

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient added in v0.3.0

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) ListByElasticSan added in v0.3.0

ListByElasticSan - Gets the private link resources that need to be created for a elastic San. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • options - PrivateLinkResourcesClientListByElasticSanOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByElasticSan method.
Example (PrivateLinkResourcesListByElasticSanMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().ListByElasticSan(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateLinkResourceListResult = armelasticsan.PrivateLinkResourceListResult{
	// 	Value: []*armelasticsan.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("ggbyptukibs"),
	// 			Type: to.Ptr("qrfsowhtanlj"),
	// 			ID: to.Ptr("iidc"),
	// 			SystemData: &armelasticsan.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 				CreatedBy: to.Ptr("bgurjvijz"),
	// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-25T17:40:52.453Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("uvexylihjrtinzkeluohusnaxatfqh"),
	// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 			},
	// 			Properties: &armelasticsan.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("mbouakfumvbeqnevmgxpk"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("wujfilzifgumbvxbdhazmzf")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("hzxhgoqxxiaf")},
	// 					},
	// 			}},
	// 		}
}
Output:

Example (PrivateLinkResourcesListByElasticSanMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().ListByElasticSan(ctx, "resourcegroupname", "elasticsanname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateLinkResourceListResult = armelasticsan.PrivateLinkResourceListResult{
	// }
}
Output:

type PrivateLinkResourcesClientListByElasticSanOptions added in v0.3.0

type PrivateLinkResourcesClientListByElasticSanOptions struct {
}

PrivateLinkResourcesClientListByElasticSanOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByElasticSan method.

type PrivateLinkResourcesClientListByElasticSanResponse added in v0.3.0

type PrivateLinkResourcesClientListByElasticSanResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListByElasticSanResponse contains the response from method PrivateLinkResourcesClient.ListByElasticSan.

type PrivateLinkServiceConnectionState added in v0.3.0

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - Response for Private Link Service Connection state

func (PrivateLinkServiceConnectionState) MarshalJSON added in v0.3.0

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v0.3.0

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type Properties

type Properties struct {
	// REQUIRED; Base size of the Elastic San appliance in TiB.
	BaseSizeTiB *int64

	// REQUIRED; Extended size of the Elastic San appliance in TiB.
	ExtendedCapacitySizeTiB *int64

	// REQUIRED; resource sku
	SKU *SKU

	// Logical zone for Elastic San resource; example: ["1"].
	AvailabilityZones []*string

	// Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.
	PublicNetworkAccess *PublicNetworkAccess

	// READ-ONLY; The list of Private Endpoint Connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates

	// READ-ONLY; Total Provisioned IOPS of the Elastic San appliance.
	TotalIops *int64

	// READ-ONLY; Total Provisioned MBps Elastic San appliance.
	TotalMBps *int64

	// READ-ONLY; Total size of the Elastic San appliance in TB.
	TotalSizeTiB *int64

	// READ-ONLY; Total size of the provisioned Volumes in GiB.
	TotalVolumeSizeGiB *int64

	// READ-ONLY; Total number of volume groups in this Elastic San appliance.
	VolumeGroupCount *int64
}

Properties - Elastic San response properties.

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningStates

type ProvisioningStates string

ProvisioningStates - Provisioning state of the iSCSI Target.

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 PossibleProvisioningStatesValues

func PossibleProvisioningStatesValues() []ProvisioningStates

PossibleProvisioningStatesValues returns the possible values for the ProvisioningStates const type.

type PublicNetworkAccess added in v0.4.0

type PublicNetworkAccess string

PublicNetworkAccess - Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues added in v0.4.0

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type SKU

type SKU struct {
	// REQUIRED; The sku name.
	Name *SKUName

	// The sku tier.
	Tier *SKUTier
}

SKU - The SKU name. Required for account creation; optional for update.

func (SKU) MarshalJSON

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUCapability

type SKUCapability struct {
	// READ-ONLY; The name of capability.
	Name *string

	// READ-ONLY; A string value to indicate states of given capability.
	Value *string
}

SKUCapability - The capability information in the specified SKU.

func (SKUCapability) MarshalJSON

func (s SKUCapability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapability.

func (*SKUCapability) UnmarshalJSON

func (s *SKUCapability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.

type SKUInformation

type SKUInformation struct {
	// REQUIRED; Sku Name
	Name *SKUName

	// Sku Tier
	Tier *SKUTier

	// READ-ONLY; The capability information in the specified SKU.
	Capabilities []*SKUCapability

	// READ-ONLY; Availability of the SKU for the location/zone
	LocationInfo []*SKULocationInfo

	// READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g.
	// West US, East US, Southeast Asia, etc.).
	Locations []*string

	// READ-ONLY; The type of the resource.
	ResourceType *string
}

SKUInformation - ElasticSAN SKU and its properties

func (SKUInformation) MarshalJSON

func (s SKUInformation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUInformation.

func (*SKUInformation) UnmarshalJSON

func (s *SKUInformation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUInformation.

type SKUInformationList

type SKUInformationList struct {
	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string

	// READ-ONLY; List of ResourceType Sku
	Value []*SKUInformation
}

SKUInformationList - List of SKU Information objects

func (SKUInformationList) MarshalJSON

func (s SKUInformationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUInformationList.

func (*SKUInformationList) UnmarshalJSON

func (s *SKUInformationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUInformationList.

type SKULocationInfo

type SKULocationInfo struct {
	// READ-ONLY; The location.
	Location *string

	// READ-ONLY; The zones.
	Zones []*string
}

SKULocationInfo - The location info.

func (SKULocationInfo) MarshalJSON

func (s SKULocationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKULocationInfo.

func (*SKULocationInfo) UnmarshalJSON

func (s *SKULocationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfo.

type SKUName

type SKUName string

SKUName - The sku name.

const (
	// SKUNamePremiumLRS - Premium locally redundant storage
	SKUNamePremiumLRS SKUName = "Premium_LRS"
	// SKUNamePremiumZRS - Premium zone redundant storage
	SKUNamePremiumZRS SKUName = "Premium_ZRS"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SKUTier

type SKUTier string

SKUTier - The sku tier.

const (
	// SKUTierPremium - Premium Tier
	SKUTierPremium SKUTier = "Premium"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SKUsClient

type SKUsClient struct {
	// contains filtered or unexported fields
}

SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)

NewSKUsClient creates a new instance of SKUsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SKUsClient) NewListPager

func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]

NewListPager - List all the available Skus in the region and information related to them

Generated from API version 2023-01-01

  • options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example (SkusListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Skus_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSKUsClient().NewListPager(&armelasticsan.SKUsClientListOptions{Filter: to.Ptr("obwwdrkq")})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SKUInformationList = armelasticsan.SKUInformationList{
		// 	Value: []*armelasticsan.SKUInformation{
		// 		{
		// 			Name: to.Ptr(armelasticsan.SKUNamePremiumLRS),
		// 			Capabilities: []*armelasticsan.SKUCapability{
		// 				{
		// 					Name: to.Ptr("qkht"),
		// 					Value: to.Ptr("eoayvlyzyjjziecxymlpk"),
		// 			}},
		// 			LocationInfo: []*armelasticsan.SKULocationInfo{
		// 				{
		// 					Location: to.Ptr("ngycrsoihxdfctigejlf"),
		// 					Zones: []*string{
		// 						to.Ptr("1")},
		// 				}},
		// 				Locations: []*string{
		// 					to.Ptr("ceszpxwqyifrxobqykplm")},
		// 					ResourceType: to.Ptr("tlqickysdtjahoanstgancifxfu"),
		// 					Tier: to.Ptr(armelasticsan.SKUTierPremium),
		// 			}},
		// 		}
	}
}
Output:

Example (SkusListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Skus_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSKUsClient().NewListPager(&armelasticsan.SKUsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SKUInformationList = armelasticsan.SKUInformationList{
		// }
	}
}
Output:

type SKUsClientListOptions

type SKUsClientListOptions struct {
	// Specify $filter='location eq ' to filter on location.
	Filter *string
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.

type SKUsClientListResponse

type SKUsClientListResponse struct {
	// List of SKU Information objects
	SKUInformationList
}

SKUsClientListResponse contains the response from method SKUsClient.NewListPager.

type Snapshot added in v0.4.0

type Snapshot struct {
	// REQUIRED; Properties of Volume Snapshot.
	Properties *SnapshotProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Snapshot - Response for Volume Snapshot request.

func (Snapshot) MarshalJSON added in v0.4.0

func (s Snapshot) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Snapshot.

func (*Snapshot) UnmarshalJSON added in v0.4.0

func (s *Snapshot) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Snapshot.

type SnapshotCreationData added in v0.4.0

type SnapshotCreationData struct {
	// REQUIRED; Fully qualified resource ID of the volume. E.g.
	// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"
	SourceID *string
}

SnapshotCreationData - Data used when creating a volume snapshot.

func (SnapshotCreationData) MarshalJSON added in v0.4.0

func (s SnapshotCreationData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SnapshotCreationData.

func (*SnapshotCreationData) UnmarshalJSON added in v0.4.0

func (s *SnapshotCreationData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotCreationData.

type SnapshotList added in v0.4.0

type SnapshotList struct {
	// An array of Snapshot objects.
	Value []*Snapshot

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

SnapshotList - List of Snapshots

func (SnapshotList) MarshalJSON added in v0.4.0

func (s SnapshotList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SnapshotList.

func (*SnapshotList) UnmarshalJSON added in v0.4.0

func (s *SnapshotList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotList.

type SnapshotProperties added in v0.4.0

type SnapshotProperties struct {
	// REQUIRED; Data used when creating a volume snapshot.
	CreationData *SnapshotCreationData

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates

	// READ-ONLY; Size of Source Volume
	SourceVolumeSizeGiB *int64

	// READ-ONLY; Source Volume Name of a snapshot
	VolumeName *string
}

SnapshotProperties - Properties for Snapshot.

func (SnapshotProperties) MarshalJSON added in v0.4.0

func (s SnapshotProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SnapshotProperties.

func (*SnapshotProperties) UnmarshalJSON added in v0.4.0

func (s *SnapshotProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties.

type SourceCreationData

type SourceCreationData struct {
	// This enumerates the possible sources of a volume creation.
	CreateSource *VolumeCreateOption

	// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	SourceID *string
}

SourceCreationData - Data source used when creating the volume.

func (SourceCreationData) MarshalJSON

func (s SourceCreationData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SourceCreationData.

func (*SourceCreationData) UnmarshalJSON

func (s *SourceCreationData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SourceCreationData.

type StorageTargetType

type StorageTargetType string

StorageTargetType - Storage Target type.

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

func PossibleStorageTargetTypeValues

func PossibleStorageTargetTypeValues() []StorageTargetType

PossibleStorageTargetTypeValues returns the possible values for the StorageTargetType const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Update

type Update struct {
	// Properties of ElasticSan.
	Properties *UpdateProperties

	// Update tags
	Tags map[string]*string
}

Update - Response for ElasticSan update request.

func (Update) MarshalJSON

func (u Update) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Update.

func (*Update) UnmarshalJSON

func (u *Update) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Update.

type UpdateProperties

type UpdateProperties struct {
	// Base size of the Elastic San appliance in TiB.
	BaseSizeTiB *int64

	// Extended size of the Elastic San appliance in TiB.
	ExtendedCapacitySizeTiB *int64

	// Allow or disallow public network access to ElasticSan Account. Value is optional but if passed in, must be 'Enabled' or
	// 'Disabled'.
	PublicNetworkAccess *PublicNetworkAccess
}

UpdateProperties - Elastic San update properties.

func (UpdateProperties) MarshalJSON

func (u UpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateProperties.

func (*UpdateProperties) UnmarshalJSON

func (u *UpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties.

type UserAssignedIdentity added in v0.4.0

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the identity.
	ClientID *string

	// READ-ONLY; The principal ID of the identity.
	PrincipalID *string
}

UserAssignedIdentity for the resource.

func (UserAssignedIdentity) MarshalJSON added in v0.4.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v0.4.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type VirtualNetworkRule

type VirtualNetworkRule struct {
	// REQUIRED; Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
	VirtualNetworkResourceID *string

	// The action of virtual network rule.
	Action *Action
}

VirtualNetworkRule - Virtual Network rule.

func (VirtualNetworkRule) MarshalJSON

func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.

func (*VirtualNetworkRule) UnmarshalJSON

func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.

type Volume

type Volume struct {
	// REQUIRED; Properties of Volume.
	Properties *VolumeProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Volume - Response for Volume request.

func (Volume) MarshalJSON

func (v Volume) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Volume.

func (*Volume) UnmarshalJSON

func (v *Volume) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Volume.

type VolumeCreateOption added in v0.4.0

type VolumeCreateOption string

VolumeCreateOption - This enumerates the possible sources of a volume creation.

const (
	VolumeCreateOptionDisk             VolumeCreateOption = "Disk"
	VolumeCreateOptionDiskRestorePoint VolumeCreateOption = "DiskRestorePoint"
	VolumeCreateOptionDiskSnapshot     VolumeCreateOption = "DiskSnapshot"
	VolumeCreateOptionNone             VolumeCreateOption = "None"
	VolumeCreateOptionVolumeSnapshot   VolumeCreateOption = "VolumeSnapshot"
)

func PossibleVolumeCreateOptionValues added in v0.4.0

func PossibleVolumeCreateOptionValues() []VolumeCreateOption

PossibleVolumeCreateOptionValues returns the possible values for the VolumeCreateOption const type.

type VolumeGroup

type VolumeGroup struct {
	// The identity of the resource.
	Identity *Identity

	// Properties of VolumeGroup.
	Properties *VolumeGroupProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

VolumeGroup - Response for Volume Group request.

func (VolumeGroup) MarshalJSON

func (v VolumeGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeGroup.

func (*VolumeGroup) UnmarshalJSON

func (v *VolumeGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroup.

type VolumeGroupList

type VolumeGroupList struct {
	// An array of Volume Groups objects.
	Value []*VolumeGroup

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

VolumeGroupList - List of Volume Groups

func (VolumeGroupList) MarshalJSON

func (v VolumeGroupList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeGroupList.

func (*VolumeGroupList) UnmarshalJSON

func (v *VolumeGroupList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupList.

type VolumeGroupProperties

type VolumeGroupProperties struct {
	// Type of encryption
	Encryption *EncryptionType

	// Encryption Properties describing Key Vault and Identity information
	EncryptionProperties *EncryptionProperties

	// A collection of rules governing the accessibility from specific network locations.
	NetworkACLs *NetworkRuleSet

	// Type of storage target
	ProtocolType *StorageTargetType

	// READ-ONLY; The list of Private Endpoint Connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates
}

VolumeGroupProperties - VolumeGroup response properties.

func (VolumeGroupProperties) MarshalJSON

func (v VolumeGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeGroupProperties.

func (*VolumeGroupProperties) UnmarshalJSON

func (v *VolumeGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupProperties.

type VolumeGroupUpdate

type VolumeGroupUpdate struct {
	// The identity of the resource.
	Identity *Identity

	// Properties of VolumeGroup.
	Properties *VolumeGroupUpdateProperties
}

VolumeGroupUpdate - Volume Group request.

func (VolumeGroupUpdate) MarshalJSON

func (v VolumeGroupUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeGroupUpdate.

func (*VolumeGroupUpdate) UnmarshalJSON

func (v *VolumeGroupUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupUpdate.

type VolumeGroupUpdateProperties

type VolumeGroupUpdateProperties struct {
	// Type of encryption
	Encryption *EncryptionType

	// Encryption Properties describing Key Vault and Identity information
	EncryptionProperties *EncryptionProperties

	// A collection of rules governing the accessibility from specific network locations.
	NetworkACLs *NetworkRuleSet

	// Type of storage target
	ProtocolType *StorageTargetType
}

VolumeGroupUpdateProperties - VolumeGroup response properties.

func (VolumeGroupUpdateProperties) MarshalJSON

func (v VolumeGroupUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeGroupUpdateProperties.

func (*VolumeGroupUpdateProperties) UnmarshalJSON

func (v *VolumeGroupUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupUpdateProperties.

type VolumeGroupsClient

type VolumeGroupsClient struct {
	// contains filtered or unexported fields
}

VolumeGroupsClient contains the methods for the VolumeGroups group. Don't use this type directly, use NewVolumeGroupsClient() instead.

func NewVolumeGroupsClient

func NewVolumeGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeGroupsClient, error)

NewVolumeGroupsClient creates a new instance of VolumeGroupsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VolumeGroupsClient) BeginCreate

func (client *VolumeGroupsClient) BeginCreate(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, parameters VolumeGroup, options *VolumeGroupsClientBeginCreateOptions) (*runtime.Poller[VolumeGroupsClientCreateResponse], error)

BeginCreate - Create a Volume Group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • parameters - Volume Group object.
  • options - VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate method.
Example (VolumeGroupsCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", armelasticsan.VolumeGroup{
		Identity: &armelasticsan.Identity{
			Type: to.Ptr(armelasticsan.IdentityTypeNone),
			UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
				"key7482": {},
			},
		},
		Properties: &armelasticsan.VolumeGroupProperties{
			Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithCustomerManagedKey),
			EncryptionProperties: &armelasticsan.EncryptionProperties{
				EncryptionIdentity: &armelasticsan.EncryptionIdentity{
					EncryptionUserAssignedIdentity: to.Ptr("im"),
				},
				KeyVaultProperties: &armelasticsan.KeyVaultProperties{
					KeyName:     to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
					KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
					KeyVersion:  to.Ptr("c"),
				},
			},
			NetworkACLs: &armelasticsan.NetworkRuleSet{
				VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
					{
						Action:                   to.Ptr(armelasticsan.ActionAllow),
						VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
					}},
			},
			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// 	Name: to.Ptr("cr"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Identity: &armelasticsan.Identity{
	// 		Type: to.Ptr(armelasticsan.IdentityTypeNone),
	// 		PrincipalID: to.Ptr("ihsiwrwdofymkhquaxcrtfmmrsygw"),
	// 		TenantID: to.Ptr("gtkzkjsy"),
	// 		UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
	// 			"key7482": &armelasticsan.UserAssignedIdentity{
	// 				ClientID: to.Ptr("jaczsquolgxwpznljbmdupn"),
	// 				PrincipalID: to.Ptr("vfdzizicxcfcqecgsmshz"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armelasticsan.VolumeGroupProperties{
	// 		Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
	// 		EncryptionProperties: &armelasticsan.EncryptionProperties{
	// 			EncryptionIdentity: &armelasticsan.EncryptionIdentity{
	// 				EncryptionUserAssignedIdentity: to.Ptr("im"),
	// 			},
	// 			KeyVaultProperties: &armelasticsan.KeyVaultProperties{
	// 				CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 				CurrentVersionedKeyIdentifier: to.Ptr("rnpxhtzkquzyoepwbwktbwb"),
	// 				KeyName: to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
	// 				KeyVersion: to.Ptr("c"),
	// 				LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 			},
	// 		},
	// 		NetworkACLs: &armelasticsan.NetworkRuleSet{
	// 			VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
	// 				{
	// 					Action: to.Ptr(armelasticsan.ActionAllow),
	// 					VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
	// 			}},
	// 		},
	// 		ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 	},
	// }
}
Output:

Example (VolumeGroupsCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", armelasticsan.VolumeGroup{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// 	Name: to.Ptr("cr"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Identity: &armelasticsan.Identity{
	// 		Type: to.Ptr(armelasticsan.IdentityTypeNone),
	// 		PrincipalID: to.Ptr("ihsiwrwdofymkhquaxcrtfmmrsygw"),
	// 		TenantID: to.Ptr("gtkzkjsy"),
	// 		UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
	// 			"key7482": &armelasticsan.UserAssignedIdentity{
	// 				ClientID: to.Ptr("jaczsquolgxwpznljbmdupn"),
	// 				PrincipalID: to.Ptr("vfdzizicxcfcqecgsmshz"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armelasticsan.VolumeGroupProperties{
	// 		Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
	// 		EncryptionProperties: &armelasticsan.EncryptionProperties{
	// 			EncryptionIdentity: &armelasticsan.EncryptionIdentity{
	// 				EncryptionUserAssignedIdentity: to.Ptr("im"),
	// 			},
	// 			KeyVaultProperties: &armelasticsan.KeyVaultProperties{
	// 				CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 				CurrentVersionedKeyIdentifier: to.Ptr("rnpxhtzkquzyoepwbwktbwb"),
	// 				KeyName: to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
	// 				KeyVersion: to.Ptr("c"),
	// 				LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 			},
	// 		},
	// 		NetworkACLs: &armelasticsan.NetworkRuleSet{
	// 			VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
	// 				{
	// 					Action: to.Ptr(armelasticsan.ActionAllow),
	// 					VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
	// 			}},
	// 		},
	// 		PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("gewxykc"),
	// 				Type: to.Ptr("ailymcedgvxbqklmqtlty"),
	// 				ID: to.Ptr("opcjchensdf"),
	// 				SystemData: &armelasticsan.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 					CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 					CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("bcclmbseed"),
	// 					LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 				},
	// 				Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 					GroupIDs: []*string{
	// 						to.Ptr("bolviufgqnyid")},
	// 						PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 							ID: to.Ptr("ehxmltubeltzmgcqxocakaansat"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 							Description: to.Ptr("nahklgxicbqjbbvcdrkljqdhprruys"),
	// 							ActionsRequired: to.Ptr("sairafcqpvucoy"),
	// 							Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 						},
	// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 					},
	// 			}},
	// 			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

func (*VolumeGroupsClient) BeginDelete

func (client *VolumeGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*runtime.Poller[VolumeGroupsClientDeleteResponse], error)

BeginDelete - Delete an VolumeGroup. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • options - VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete method.
Example (VolumeGroupsDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (VolumeGroupsDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VolumeGroupsClient) BeginUpdate

func (client *VolumeGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, parameters VolumeGroupUpdate, options *VolumeGroupsClientBeginUpdateOptions) (*runtime.Poller[VolumeGroupsClientUpdateResponse], error)

BeginUpdate - Update an VolumeGroup. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • parameters - Volume Group object.
  • options - VolumeGroupsClientBeginUpdateOptions contains the optional parameters for the VolumeGroupsClient.BeginUpdate method.
Example (VolumeGroupsUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", armelasticsan.VolumeGroupUpdate{
		Identity: &armelasticsan.Identity{
			Type: to.Ptr(armelasticsan.IdentityTypeNone),
			UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
				"key7482": {},
			},
		},
		Properties: &armelasticsan.VolumeGroupUpdateProperties{
			Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
			EncryptionProperties: &armelasticsan.EncryptionProperties{
				EncryptionIdentity: &armelasticsan.EncryptionIdentity{
					EncryptionUserAssignedIdentity: to.Ptr("im"),
				},
				KeyVaultProperties: &armelasticsan.KeyVaultProperties{
					KeyName:     to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
					KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
					KeyVersion:  to.Ptr("c"),
				},
			},
			NetworkACLs: &armelasticsan.NetworkRuleSet{
				VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
					{
						Action:                   to.Ptr(armelasticsan.ActionAllow),
						VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
					}},
			},
			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// 	Name: to.Ptr("cr"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Identity: &armelasticsan.Identity{
	// 		Type: to.Ptr(armelasticsan.IdentityTypeNone),
	// 		PrincipalID: to.Ptr("ihsiwrwdofymkhquaxcrtfmmrsygw"),
	// 		TenantID: to.Ptr("gtkzkjsy"),
	// 		UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
	// 			"key7482": &armelasticsan.UserAssignedIdentity{
	// 				ClientID: to.Ptr("jaczsquolgxwpznljbmdupn"),
	// 				PrincipalID: to.Ptr("vfdzizicxcfcqecgsmshz"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armelasticsan.VolumeGroupProperties{
	// 		Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
	// 		EncryptionProperties: &armelasticsan.EncryptionProperties{
	// 			EncryptionIdentity: &armelasticsan.EncryptionIdentity{
	// 				EncryptionUserAssignedIdentity: to.Ptr("im"),
	// 			},
	// 			KeyVaultProperties: &armelasticsan.KeyVaultProperties{
	// 				CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 				CurrentVersionedKeyIdentifier: to.Ptr("rnpxhtzkquzyoepwbwktbwb"),
	// 				KeyName: to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
	// 				KeyVersion: to.Ptr("c"),
	// 				LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 			},
	// 		},
	// 		NetworkACLs: &armelasticsan.NetworkRuleSet{
	// 			VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
	// 				{
	// 					Action: to.Ptr(armelasticsan.ActionAllow),
	// 					VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
	// 			}},
	// 		},
	// 		PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("{privateEndpointConnectionName}"),
	// 				Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 				SystemData: &armelasticsan.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 					CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 					CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 					LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 				},
	// 				Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 					GroupIDs: []*string{
	// 						to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 						PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 							Description: to.Ptr("Auto-Approved"),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 						},
	// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 					},
	// 			}},
	// 			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

Example (VolumeGroupsUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeGroupsClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", armelasticsan.VolumeGroupUpdate{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// }
}
Output:

func (*VolumeGroupsClient) Get

func (client *VolumeGroupsClient) Get(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, options *VolumeGroupsClientGetOptions) (VolumeGroupsClientGetResponse, error)

Get - Get an VolumeGroups. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • options - VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method.
Example (VolumeGroupsGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumeGroupsClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// 	Name: to.Ptr("cr"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Identity: &armelasticsan.Identity{
	// 		Type: to.Ptr(armelasticsan.IdentityTypeNone),
	// 		PrincipalID: to.Ptr("ihsiwrwdofymkhquaxcrtfmmrsygw"),
	// 		TenantID: to.Ptr("gtkzkjsy"),
	// 		UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
	// 			"key7482": &armelasticsan.UserAssignedIdentity{
	// 				ClientID: to.Ptr("jaczsquolgxwpznljbmdupn"),
	// 				PrincipalID: to.Ptr("vfdzizicxcfcqecgsmshz"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armelasticsan.VolumeGroupProperties{
	// 		Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
	// 		EncryptionProperties: &armelasticsan.EncryptionProperties{
	// 			EncryptionIdentity: &armelasticsan.EncryptionIdentity{
	// 				EncryptionUserAssignedIdentity: to.Ptr("im"),
	// 			},
	// 			KeyVaultProperties: &armelasticsan.KeyVaultProperties{
	// 				CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 				CurrentVersionedKeyIdentifier: to.Ptr("rnpxhtzkquzyoepwbwktbwb"),
	// 				KeyName: to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
	// 				KeyVersion: to.Ptr("c"),
	// 				LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
	// 			},
	// 		},
	// 		NetworkACLs: &armelasticsan.NetworkRuleSet{
	// 			VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
	// 				{
	// 					Action: to.Ptr(armelasticsan.ActionAllow),
	// 					VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
	// 			}},
	// 		},
	// 		PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("{privateEndpointConnectionName}"),
	// 				Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 				SystemData: &armelasticsan.SystemData{
	// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 					CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
	// 					CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
	// 					LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
	// 					LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 				},
	// 				Properties: &armelasticsan.PrivateEndpointConnectionProperties{
	// 					GroupIDs: []*string{
	// 						to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
	// 						PrivateEndpoint: &armelasticsan.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
	// 							Description: to.Ptr("Auto-Approved"),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
	// 						},
	// 						ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 					},
	// 			}},
	// 			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		},
	// 	}
}
Output:

Example (VolumeGroupsGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumeGroupsClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VolumeGroup = armelasticsan.VolumeGroup{
	// }
}
Output:

func (*VolumeGroupsClient) NewListByElasticSanPager

func (client *VolumeGroupsClient) NewListByElasticSanPager(resourceGroupName string, elasticSanName string, options *VolumeGroupsClientListByElasticSanOptions) *runtime.Pager[VolumeGroupsClientListByElasticSanResponse]

NewListByElasticSanPager - List VolumeGroups.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • options - VolumeGroupsClientListByElasticSanOptions contains the optional parameters for the VolumeGroupsClient.NewListByElasticSanPager method.
Example (VolumeGroupsListByElasticSanMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumeGroupsClient().NewListByElasticSanPager("resourcegroupname", "elasticsanname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VolumeGroupList = armelasticsan.VolumeGroupList{
		// 	Value: []*armelasticsan.VolumeGroup{
		// 		{
		// 			Name: to.Ptr("cr"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups"),
		// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 				CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("bcclmbseed"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Identity: &armelasticsan.Identity{
		// 				Type: to.Ptr(armelasticsan.IdentityTypeNone),
		// 				PrincipalID: to.Ptr("ihsiwrwdofymkhquaxcrtfmmrsygw"),
		// 				TenantID: to.Ptr("gtkzkjsy"),
		// 				UserAssignedIdentities: map[string]*armelasticsan.UserAssignedIdentity{
		// 					"key7482": &armelasticsan.UserAssignedIdentity{
		// 						ClientID: to.Ptr("jaczsquolgxwpznljbmdupn"),
		// 						PrincipalID: to.Ptr("vfdzizicxcfcqecgsmshz"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armelasticsan.VolumeGroupProperties{
		// 				Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
		// 				EncryptionProperties: &armelasticsan.EncryptionProperties{
		// 					EncryptionIdentity: &armelasticsan.EncryptionIdentity{
		// 						EncryptionUserAssignedIdentity: to.Ptr("im"),
		// 					},
		// 					KeyVaultProperties: &armelasticsan.KeyVaultProperties{
		// 						CurrentVersionedKeyExpirationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
		// 						CurrentVersionedKeyIdentifier: to.Ptr("rnpxhtzkquzyoepwbwktbwb"),
		// 						KeyName: to.Ptr("sftaiernmrzypnrkpakrrawxcbsqzc"),
		// 						KeyVaultURI: to.Ptr("https://microsoft.com/axmblwp"),
		// 						KeyVersion: to.Ptr("c"),
		// 						LastKeyRotationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:11.388Z"); return t}()),
		// 					},
		// 				},
		// 				NetworkACLs: &armelasticsan.NetworkRuleSet{
		// 					VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
		// 						{
		// 							Action: to.Ptr(armelasticsan.ActionAllow),
		// 							VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}"),
		// 					}},
		// 				},
		// 				PrivateEndpointConnections: []*armelasticsan.PrivateEndpointConnection{
		// 					{
		// 						Name: to.Ptr("{privateEndpointConnectionName}"),
		// 						Type: to.Ptr("Microsoft.ElasticSan/elasticSans/privateEndpointConnections"),
		// 						ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 						SystemData: &armelasticsan.SystemData{
		// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 							CreatedBy: to.Ptr("otfifnrahdshqombvtg"),
		// 							CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T09:59:45.919Z"); return t}()),
		// 							LastModifiedBy: to.Ptr("jnaxavnlhrboshtidtib"),
		// 							LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 						},
		// 						Properties: &armelasticsan.PrivateEndpointConnectionProperties{
		// 							GroupIDs: []*string{
		// 								to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}")},
		// 								PrivateEndpoint: &armelasticsan.PrivateEndpoint{
		// 									ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"),
		// 								},
		// 								PrivateLinkServiceConnectionState: &armelasticsan.PrivateLinkServiceConnectionState{
		// 									Description: to.Ptr("Auto-Approved"),
		// 									ActionsRequired: to.Ptr("None"),
		// 									Status: to.Ptr(armelasticsan.PrivateEndpointServiceConnectionStatusPending),
		// 								},
		// 								ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 							},
		// 					}},
		// 					ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
		// 					ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (VolumeGroupsListByElasticSanMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumeGroupsClient().NewListByElasticSanPager("resourcegroupname", "elasticsanname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VolumeGroupList = armelasticsan.VolumeGroupList{
		// }
	}
}
Output:

type VolumeGroupsClientBeginCreateOptions

type VolumeGroupsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate method.

type VolumeGroupsClientBeginDeleteOptions

type VolumeGroupsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete method.

type VolumeGroupsClientBeginUpdateOptions

type VolumeGroupsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumeGroupsClientBeginUpdateOptions contains the optional parameters for the VolumeGroupsClient.BeginUpdate method.

type VolumeGroupsClientCreateResponse

type VolumeGroupsClientCreateResponse struct {
	// Response for Volume Group request.
	VolumeGroup
}

VolumeGroupsClientCreateResponse contains the response from method VolumeGroupsClient.BeginCreate.

type VolumeGroupsClientDeleteResponse

type VolumeGroupsClientDeleteResponse struct {
}

VolumeGroupsClientDeleteResponse contains the response from method VolumeGroupsClient.BeginDelete.

type VolumeGroupsClientGetOptions

type VolumeGroupsClientGetOptions struct {
}

VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method.

type VolumeGroupsClientGetResponse

type VolumeGroupsClientGetResponse struct {
	// Response for Volume Group request.
	VolumeGroup
}

VolumeGroupsClientGetResponse contains the response from method VolumeGroupsClient.Get.

type VolumeGroupsClientListByElasticSanOptions

type VolumeGroupsClientListByElasticSanOptions struct {
}

VolumeGroupsClientListByElasticSanOptions contains the optional parameters for the VolumeGroupsClient.NewListByElasticSanPager method.

type VolumeGroupsClientListByElasticSanResponse

type VolumeGroupsClientListByElasticSanResponse struct {
	// List of Volume Groups
	VolumeGroupList
}

VolumeGroupsClientListByElasticSanResponse contains the response from method VolumeGroupsClient.NewListByElasticSanPager.

type VolumeGroupsClientUpdateResponse

type VolumeGroupsClientUpdateResponse struct {
	// Response for Volume Group request.
	VolumeGroup
}

VolumeGroupsClientUpdateResponse contains the response from method VolumeGroupsClient.BeginUpdate.

type VolumeList

type VolumeList struct {
	// An array of Volume objects.
	Value []*Volume

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string
}

VolumeList - List of Volumes

func (VolumeList) MarshalJSON

func (v VolumeList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeList.

func (*VolumeList) UnmarshalJSON

func (v *VolumeList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeList.

type VolumeProperties

type VolumeProperties struct {
	// REQUIRED; Volume size.
	SizeGiB *int64

	// State of the operation on the resource.
	CreationData *SourceCreationData

	// Parent resource information.
	ManagedBy *ManagedByInfo

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates

	// READ-ONLY; Storage target information
	StorageTarget *IscsiTargetInfo

	// READ-ONLY; Unique Id of the volume in GUID format
	VolumeID *string
}

VolumeProperties - Volume response properties.

func (VolumeProperties) MarshalJSON

func (v VolumeProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeProperties.

func (*VolumeProperties) UnmarshalJSON

func (v *VolumeProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeProperties.

type VolumeSnapshotsClient added in v0.4.0

type VolumeSnapshotsClient struct {
	// contains filtered or unexported fields
}

VolumeSnapshotsClient contains the methods for the VolumeSnapshots group. Don't use this type directly, use NewVolumeSnapshotsClient() instead.

func NewVolumeSnapshotsClient added in v0.4.0

func NewVolumeSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeSnapshotsClient, error)

NewVolumeSnapshotsClient creates a new instance of VolumeSnapshotsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VolumeSnapshotsClient) BeginCreate added in v0.4.0

func (client *VolumeSnapshotsClient) BeginCreate(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, snapshotName string, parameters Snapshot, options *VolumeSnapshotsClientBeginCreateOptions) (*runtime.Poller[VolumeSnapshotsClientCreateResponse], error)

BeginCreate - Create a Volume Snapshot. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • snapshotName - The name of the volume snapshot within the given volume group.
  • parameters - Snapshot object.
  • options - VolumeSnapshotsClientBeginCreateOptions contains the optional parameters for the VolumeSnapshotsClient.BeginCreate method.
Example (VolumeSnapshotsCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeSnapshotsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", armelasticsan.Snapshot{
		Properties: &armelasticsan.SnapshotProperties{
			CreationData: &armelasticsan.SnapshotCreationData{
				SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Snapshot = armelasticsan.Snapshot{
	// 	Name: to.Ptr("qukfugetqthsufp"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/snapshots"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/snapshots/{snapshotName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		CreatedBy: to.Ptr("f"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("wifrlzeszzcckvdzdwxhvservlvarp"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.SnapshotProperties{
	// 		CreationData: &armelasticsan.SnapshotCreationData{
	// 			SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SourceVolumeSizeGiB: to.Ptr[int64](28),
	// 		VolumeName: to.Ptr("volumename"),
	// 	},
	// }
}
Output:

Example (VolumeSnapshotsCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeSnapshotsClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", armelasticsan.Snapshot{
		Properties: &armelasticsan.SnapshotProperties{
			CreationData: &armelasticsan.SnapshotCreationData{
				SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Snapshot = armelasticsan.Snapshot{
	// 	Name: to.Ptr("qukfugetqthsufp"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/snapshots"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/snapshots/{snapshotName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		CreatedBy: to.Ptr("f"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("wifrlzeszzcckvdzdwxhvservlvarp"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.SnapshotProperties{
	// 		CreationData: &armelasticsan.SnapshotCreationData{
	// 			SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SourceVolumeSizeGiB: to.Ptr[int64](28),
	// 		VolumeName: to.Ptr("volumename"),
	// 	},
	// }
}
Output:

func (*VolumeSnapshotsClient) BeginDelete added in v0.4.0

func (client *VolumeSnapshotsClient) BeginDelete(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, snapshotName string, options *VolumeSnapshotsClientBeginDeleteOptions) (*runtime.Poller[VolumeSnapshotsClientDeleteResponse], error)

BeginDelete - Delete a Volume Snapshot. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • snapshotName - The name of the volume snapshot within the given volume group.
  • options - VolumeSnapshotsClientBeginDeleteOptions contains the optional parameters for the VolumeSnapshotsClient.BeginDelete method.
Example (VolumeSnapshotsDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeSnapshotsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (VolumeSnapshotsDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumeSnapshotsClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VolumeSnapshotsClient) Get added in v0.4.0

func (client *VolumeSnapshotsClient) Get(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, snapshotName string, options *VolumeSnapshotsClientGetOptions) (VolumeSnapshotsClientGetResponse, error)

Get - Get a Volume Snapshot. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • snapshotName - The name of the volume snapshot within the given volume group.
  • options - VolumeSnapshotsClientGetOptions contains the optional parameters for the VolumeSnapshotsClient.Get method.
Example (VolumeSnapshotsGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumeSnapshotsClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Snapshot = armelasticsan.Snapshot{
	// 	Name: to.Ptr("qukfugetqthsufp"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/snapshots"),
	// 	ID: to.Ptr("bbqqgzxagggqgkdgjqq"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		CreatedBy: to.Ptr("f"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("wifrlzeszzcckvdzdwxhvservlvarp"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.SnapshotProperties{
	// 		CreationData: &armelasticsan.SnapshotCreationData{
	// 			SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SourceVolumeSizeGiB: to.Ptr[int64](28),
	// 		VolumeName: to.Ptr("volumename"),
	// 	},
	// }
}
Output:

Example (VolumeSnapshotsGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumeSnapshotsClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "snapshotname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Snapshot = armelasticsan.Snapshot{
	// 	Name: to.Ptr("qukfugetqthsufp"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/snapshots"),
	// 	ID: to.Ptr("bbqqgzxagggqgkdgjqq"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		CreatedBy: to.Ptr("f"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("wifrlzeszzcckvdzdwxhvservlvarp"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.SnapshotProperties{
	// 		CreationData: &armelasticsan.SnapshotCreationData{
	// 			SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SourceVolumeSizeGiB: to.Ptr[int64](28),
	// 		VolumeName: to.Ptr("volumename"),
	// 	},
	// }
}
Output:

func (*VolumeSnapshotsClient) NewListByVolumeGroupPager added in v0.4.0

func (client *VolumeSnapshotsClient) NewListByVolumeGroupPager(resourceGroupName string, elasticSanName string, volumeGroupName string, options *VolumeSnapshotsClientListByVolumeGroupOptions) *runtime.Pager[VolumeSnapshotsClientListByVolumeGroupResponse]

NewListByVolumeGroupPager - List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • options - VolumeSnapshotsClientListByVolumeGroupOptions contains the optional parameters for the VolumeSnapshotsClient.NewListByVolumeGroupPager method.
Example (VolumeSnapshotsListByVolumeGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumeSnapshotsClient().NewListByVolumeGroupPager("resourcegroupname", "elasticsanname", "volumegroupname", &armelasticsan.VolumeSnapshotsClientListByVolumeGroupOptions{Filter: to.Ptr("volumeName eq <volume name>")})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SnapshotList = armelasticsan.SnapshotList{
		// 	Value: []*armelasticsan.Snapshot{
		// 		{
		// 			Name: to.Ptr("qukfugetqthsufp"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/snapshots"),
		// 			ID: to.Ptr("bbqqgzxagggqgkdgjqq"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
		// 				CreatedBy: to.Ptr("f"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-06T06:58:45.864Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("wifrlzeszzcckvdzdwxhvservlvarp"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Properties: &armelasticsan.SnapshotProperties{
		// 				CreationData: &armelasticsan.SnapshotCreationData{
		// 					SourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
		// 				},
		// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 				SourceVolumeSizeGiB: to.Ptr[int64](28),
		// 				VolumeName: to.Ptr("volumename"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (VolumeSnapshotsListByVolumeGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumeSnapshotsClient().NewListByVolumeGroupPager("resourcegroupname", "elasticsanname", "volumegroupname", &armelasticsan.VolumeSnapshotsClientListByVolumeGroupOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SnapshotList = armelasticsan.SnapshotList{
		// }
	}
}
Output:

type VolumeSnapshotsClientBeginCreateOptions added in v0.4.0

type VolumeSnapshotsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumeSnapshotsClientBeginCreateOptions contains the optional parameters for the VolumeSnapshotsClient.BeginCreate method.

type VolumeSnapshotsClientBeginDeleteOptions added in v0.4.0

type VolumeSnapshotsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumeSnapshotsClientBeginDeleteOptions contains the optional parameters for the VolumeSnapshotsClient.BeginDelete method.

type VolumeSnapshotsClientCreateResponse added in v0.4.0

type VolumeSnapshotsClientCreateResponse struct {
	// Response for Volume Snapshot request.
	Snapshot
}

VolumeSnapshotsClientCreateResponse contains the response from method VolumeSnapshotsClient.BeginCreate.

type VolumeSnapshotsClientDeleteResponse added in v0.4.0

type VolumeSnapshotsClientDeleteResponse struct {
}

VolumeSnapshotsClientDeleteResponse contains the response from method VolumeSnapshotsClient.BeginDelete.

type VolumeSnapshotsClientGetOptions added in v0.4.0

type VolumeSnapshotsClientGetOptions struct {
}

VolumeSnapshotsClientGetOptions contains the optional parameters for the VolumeSnapshotsClient.Get method.

type VolumeSnapshotsClientGetResponse added in v0.4.0

type VolumeSnapshotsClientGetResponse struct {
	// Response for Volume Snapshot request.
	Snapshot
}

VolumeSnapshotsClientGetResponse contains the response from method VolumeSnapshotsClient.Get.

type VolumeSnapshotsClientListByVolumeGroupOptions added in v0.4.0

type VolumeSnapshotsClientListByVolumeGroupOptions struct {
	// Specify $filter='volumeName eq ' to filter on volume.
	Filter *string
}

VolumeSnapshotsClientListByVolumeGroupOptions contains the optional parameters for the VolumeSnapshotsClient.NewListByVolumeGroupPager method.

type VolumeSnapshotsClientListByVolumeGroupResponse added in v0.4.0

type VolumeSnapshotsClientListByVolumeGroupResponse struct {
	// List of Snapshots
	SnapshotList
}

VolumeSnapshotsClientListByVolumeGroupResponse contains the response from method VolumeSnapshotsClient.NewListByVolumeGroupPager.

type VolumeUpdate

type VolumeUpdate struct {
	// Properties of Volume.
	Properties *VolumeUpdateProperties
}

VolumeUpdate - Response for Volume request.

func (VolumeUpdate) MarshalJSON

func (v VolumeUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeUpdate.

func (*VolumeUpdate) UnmarshalJSON

func (v *VolumeUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeUpdate.

type VolumeUpdateProperties

type VolumeUpdateProperties struct {
	// Parent resource information.
	ManagedBy *ManagedByInfo

	// Volume size.
	SizeGiB *int64
}

VolumeUpdateProperties - Volume response properties.

func (VolumeUpdateProperties) MarshalJSON

func (v VolumeUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VolumeUpdateProperties.

func (*VolumeUpdateProperties) UnmarshalJSON

func (v *VolumeUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VolumeUpdateProperties.

type VolumesClient

type VolumesClient struct {
	// contains filtered or unexported fields
}

VolumesClient contains the methods for the Volumes group. Don't use this type directly, use NewVolumesClient() instead.

func NewVolumesClient

func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumesClient, error)

NewVolumesClient creates a new instance of VolumesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VolumesClient) BeginCreate

func (client *VolumesClient) BeginCreate(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, volumeName string, parameters Volume, options *VolumesClientBeginCreateOptions) (*runtime.Poller[VolumesClientCreateResponse], error)

BeginCreate - Create a Volume. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • volumeName - The name of the Volume.
  • parameters - Volume object.
  • options - VolumesClientBeginCreateOptions contains the optional parameters for the VolumesClient.BeginCreate method.
Example (VolumesCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", armelasticsan.Volume{
		Properties: &armelasticsan.VolumeProperties{
			CreationData: &armelasticsan.SourceCreationData{
				CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
				SourceID:     to.Ptr("ARM Id of Resource"),
			},
			ManagedBy: &armelasticsan.ManagedByInfo{
				ResourceID: to.Ptr("mtkeip"),
			},
			SizeGiB: to.Ptr[int64](9),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

Example (VolumesCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginCreate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", armelasticsan.Volume{
		Properties: &armelasticsan.VolumeProperties{
			SizeGiB: to.Ptr[int64](9),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

func (*VolumesClient) BeginDelete

func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*runtime.Poller[VolumesClientDeleteResponse], error)

BeginDelete - Delete an Volume. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • volumeName - The name of the Volume.
  • options - VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method.
Example (VolumesDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", &armelasticsan.VolumesClientBeginDeleteOptions{XMSDeleteSnapshots: to.Ptr(armelasticsan.XMSDeleteSnapshotsTrue),
		XMSForceDelete: to.Ptr(armelasticsan.XMSForceDeleteTrue),
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (VolumesDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginDelete(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", &armelasticsan.VolumesClientBeginDeleteOptions{XMSDeleteSnapshots: nil,
		XMSForceDelete: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VolumesClient) BeginUpdate

func (client *VolumesClient) BeginUpdate(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, volumeName string, parameters VolumeUpdate, options *VolumesClientBeginUpdateOptions) (*runtime.Poller[VolumesClientUpdateResponse], error)

BeginUpdate - Update an Volume. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • volumeName - The name of the Volume.
  • parameters - Volume object.
  • options - VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method.
Example (VolumesUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", armelasticsan.VolumeUpdate{
		Properties: &armelasticsan.VolumeUpdateProperties{
			SizeGiB: to.Ptr[int64](11),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("swkcmwglncgtsnejzvldnbpsifxez"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

Example (VolumesUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVolumesClient().BeginUpdate(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", armelasticsan.VolumeUpdate{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("swkcmwglncgtsnejzvldnbpsifxez"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

func (*VolumesClient) Get

func (client *VolumesClient) Get(ctx context.Context, resourceGroupName string, elasticSanName string, volumeGroupName string, volumeName string, options *VolumesClientGetOptions) (VolumesClientGetResponse, error)

Get - Get an Volume. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • volumeName - The name of the Volume.
  • options - VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method.
Example (VolumesGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumesClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("swkcmwglncgtsnejzvldnbpsifxez"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

Example (VolumesGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVolumesClient().Get(ctx, "resourcegroupname", "elasticsanname", "volumegroupname", "volumename", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Volume = armelasticsan.Volume{
	// 	Name: to.Ptr("o"),
	// 	Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
	// 	ID: to.Ptr("swkcmwglncgtsnejzvldnbpsifxez"),
	// 	SystemData: &armelasticsan.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
	// 		CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bcclmbseed"),
	// 		LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
	// 	},
	// 	Properties: &armelasticsan.VolumeProperties{
	// 		CreationData: &armelasticsan.SourceCreationData{
	// 			CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
	// 			SourceID: to.Ptr("ARM Id of Resource"),
	// 		},
	// 		ManagedBy: &armelasticsan.ManagedByInfo{
	// 			ResourceID: to.Ptr("mtkeip"),
	// 		},
	// 		ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 		SizeGiB: to.Ptr[int64](9),
	// 		StorageTarget: &armelasticsan.IscsiTargetInfo{
	// 			ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
	// 			Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
	// 			TargetIqn: to.Ptr("izdwogzjedsfug"),
	// 			TargetPortalHostname: to.Ptr("wyfbjobugmad"),
	// 			TargetPortalPort: to.Ptr[int32](21),
	// 		},
	// 		VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
	// 	},
	// }
}
Output:

func (*VolumesClient) NewListByVolumeGroupPager

func (client *VolumesClient) NewListByVolumeGroupPager(resourceGroupName string, elasticSanName string, volumeGroupName string, options *VolumesClientListByVolumeGroupOptions) *runtime.Pager[VolumesClientListByVolumeGroupResponse]

NewListByVolumeGroupPager - List Volumes in a VolumeGroup.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • elasticSanName - The name of the ElasticSan.
  • volumeGroupName - The name of the VolumeGroup.
  • options - VolumesClientListByVolumeGroupOptions contains the optional parameters for the VolumesClient.NewListByVolumeGroupPager method.
Example (VolumesListByVolumeGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumesClient().NewListByVolumeGroupPager("resourcegroupname", "elasticsanname", "volumegroupname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VolumeList = armelasticsan.VolumeList{
		// 	Value: []*armelasticsan.Volume{
		// 		{
		// 			Name: to.Ptr("o"),
		// 			Type: to.Ptr("Microsoft.ElasticSan/elasticSans/volumeGroups/volumes"),
		// 			ID: to.Ptr("swkcmwglncgtsnejzvldnbpsifxez"),
		// 			SystemData: &armelasticsan.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 				CreatedBy: to.Ptr("kakcyehdrphqkilgkhpbdtvpupak"),
		// 				CreatedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-23T12:16:10.057Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("bcclmbseed"),
		// 				LastModifiedByType: to.Ptr(armelasticsan.CreatedByTypeUser),
		// 			},
		// 			Properties: &armelasticsan.VolumeProperties{
		// 				CreationData: &armelasticsan.SourceCreationData{
		// 					CreateSource: to.Ptr(armelasticsan.VolumeCreateOptionNone),
		// 					SourceID: to.Ptr("ARM Id of Resource"),
		// 				},
		// 				ManagedBy: &armelasticsan.ManagedByInfo{
		// 					ResourceID: to.Ptr("mtkeip"),
		// 				},
		// 				ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 				SizeGiB: to.Ptr[int64](9),
		// 				StorageTarget: &armelasticsan.IscsiTargetInfo{
		// 					ProvisioningState: to.Ptr(armelasticsan.ProvisioningStatesSucceeded),
		// 					Status: to.Ptr(armelasticsan.OperationalStatusInvalid),
		// 					TargetIqn: to.Ptr("izdwogzjedsfug"),
		// 					TargetPortalHostname: to.Ptr("wyfbjobugmad"),
		// 					TargetPortalPort: to.Ptr[int32](21),
		// 				},
		// 				VolumeID: to.Ptr("umwjlxntntjejiyrywrytkzbfbluhk"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (VolumesListByVolumeGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/907b79c0a6a660826e54dc1f16ea14b831b201d2/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsan/armelasticsan"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelasticsan.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVolumesClient().NewListByVolumeGroupPager("resourcegroupname", "elasticsanname", "volumegroupname", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VolumeList = armelasticsan.VolumeList{
		// }
	}
}
Output:

type VolumesClientBeginCreateOptions

type VolumesClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumesClientBeginCreateOptions contains the optional parameters for the VolumesClient.BeginCreate method.

type VolumesClientBeginDeleteOptions

type VolumesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string

	// Optional, used to delete snapshots under volume. Allowed value are only true or false. Default value is false.
	XMSDeleteSnapshots *XMSDeleteSnapshots

	// Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false.
	XMSForceDelete *XMSForceDelete
}

VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method.

type VolumesClientBeginUpdateOptions

type VolumesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method.

type VolumesClientCreateResponse

type VolumesClientCreateResponse struct {
	// Response for Volume request.
	Volume
}

VolumesClientCreateResponse contains the response from method VolumesClient.BeginCreate.

type VolumesClientDeleteResponse

type VolumesClientDeleteResponse struct {
}

VolumesClientDeleteResponse contains the response from method VolumesClient.BeginDelete.

type VolumesClientGetOptions

type VolumesClientGetOptions struct {
}

VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method.

type VolumesClientGetResponse

type VolumesClientGetResponse struct {
	// Response for Volume request.
	Volume
}

VolumesClientGetResponse contains the response from method VolumesClient.Get.

type VolumesClientListByVolumeGroupOptions

type VolumesClientListByVolumeGroupOptions struct {
}

VolumesClientListByVolumeGroupOptions contains the optional parameters for the VolumesClient.NewListByVolumeGroupPager method.

type VolumesClientListByVolumeGroupResponse

type VolumesClientListByVolumeGroupResponse struct {
	// List of Volumes
	VolumeList
}

VolumesClientListByVolumeGroupResponse contains the response from method VolumesClient.NewListByVolumeGroupPager.

type VolumesClientUpdateResponse

type VolumesClientUpdateResponse struct {
	// Response for Volume request.
	Volume
}

VolumesClientUpdateResponse contains the response from method VolumesClient.BeginUpdate.

type XMSDeleteSnapshots added in v0.4.0

type XMSDeleteSnapshots string
const (
	XMSDeleteSnapshotsFalse XMSDeleteSnapshots = "false"
	XMSDeleteSnapshotsTrue  XMSDeleteSnapshots = "true"
)

func PossibleXMSDeleteSnapshotsValues added in v0.4.0

func PossibleXMSDeleteSnapshotsValues() []XMSDeleteSnapshots

PossibleXMSDeleteSnapshotsValues returns the possible values for the XMSDeleteSnapshots const type.

type XMSForceDelete added in v0.4.0

type XMSForceDelete string
const (
	XMSForceDeleteFalse XMSForceDelete = "false"
	XMSForceDeleteTrue  XMSForceDelete = "true"
)

func PossibleXMSForceDeleteValues added in v0.4.0

func PossibleXMSForceDeleteValues() []XMSForceDelete

PossibleXMSForceDeleteValues returns the possible values for the XMSForceDelete const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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