armelasticsan

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 16 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.

Clients

Azure Elasticsan modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armelasticsan.NewVolumesClient(<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,
    },
}
client, err := armelasticsan.NewVolumesClient(<subscription ID>, cred, &options)

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 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; Properties of ElasticSan.
	Properties *Properties `json:"properties,omitempty"`

	// The geo-location where the resource lives.
	Location *string `json:"location,omitempty"`

	// Azure resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Azure resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource metadata required by ARM RPC
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", armelasticsan.ElasticSan{
		Tags: map[string]*string{
			"key896": to.Ptr("aaaaaaaaaaaaaaaaaa"),
		},
		Location: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"),
		Properties: &armelasticsan.Properties{
			AvailabilityZones: []*string{
				to.Ptr("aaaaaaaaaaaaaaaaa")},
			BaseSizeTiB:             to.Ptr[int64](26),
			ExtendedCapacitySizeTiB: to.Ptr[int64](7),
			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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (ElasticSansCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", armelasticsan.ElasticSan{
		Properties: &armelasticsan.Properties{
			BaseSizeTiB:             to.Ptr[int64](26),
			ExtendedCapacitySizeTiB: to.Ptr[int64](7),
			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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", 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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", armelasticsan.Update{
		Properties: &armelasticsan.UpdateProperties{
			BaseSizeTiB:             to.Ptr[int64](23),
			ExtendedCapacitySizeTiB: to.Ptr[int64](4),
		},
		Tags: map[string]*string{
			"key3137": to.Ptr("aaaaaaaaaaaaaaa"),
		},
	}, 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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (ElasticSansUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", 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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (ElasticSansGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ElasticSansClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Gets a list of ElasticSan in a resource group. Generated from API version 2021-11-20-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - ElasticSansClientListByResourceGroupOptions contains the optional parameters for the ElasticSansClient.ListByResourceGroup method.

Example (ElasticSansListByResourceGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("rgelasticsan", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (ElasticSansListByResourceGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("rgelasticsan", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ElasticSansClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Gets a list of ElasticSans in a subscription Generated from API version 2021-11-20-preview options - ElasticSansClientListBySubscriptionOptions contains the optional parameters for the ElasticSansClient.ListBySubscription method.

Example (ElasticSansListBySubscriptionMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (ElasticSansListBySubscriptionMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewElasticSansClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	ElasticSan
}

ElasticSansClientCreateResponse contains the response from method ElasticSansClient.Create.

type ElasticSansClientDeleteResponse

type ElasticSansClientDeleteResponse struct {
}

ElasticSansClientDeleteResponse contains the response from method ElasticSansClient.Delete.

type ElasticSansClientGetOptions

type ElasticSansClientGetOptions struct {
}

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

type ElasticSansClientGetResponse

type ElasticSansClientGetResponse struct {
	ElasticSan
}

ElasticSansClientGetResponse contains the response from method ElasticSansClient.Get.

type ElasticSansClientListByResourceGroupOptions

type ElasticSansClientListByResourceGroupOptions struct {
}

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

type ElasticSansClientListByResourceGroupResponse

type ElasticSansClientListByResourceGroupResponse struct {
	List
}

ElasticSansClientListByResourceGroupResponse contains the response from method ElasticSansClient.ListByResourceGroup.

type ElasticSansClientListBySubscriptionOptions

type ElasticSansClientListBySubscriptionOptions struct {
}

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

type ElasticSansClientListBySubscriptionResponse

type ElasticSansClientListBySubscriptionResponse struct {
	List
}

ElasticSansClientListBySubscriptionResponse contains the response from method ElasticSansClient.ListBySubscription.

type ElasticSansClientUpdateResponse

type ElasticSansClientUpdateResponse struct {
	ElasticSan
}

ElasticSansClientUpdateResponse contains the response from method ElasticSansClient.Update.

type EncryptionType

type EncryptionType string

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

const (
	// 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 IscsiTargetInfo

type IscsiTargetInfo struct {
	// Operational status of the iSCSI Target.
	Status *OperationalStatus `json:"status,omitempty"`

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
	TargetIqn *string `json:"targetIqn,omitempty" azure:"ro"`

	// READ-ONLY; iSCSI Target Portal Host Name
	TargetPortalHostname *string `json:"targetPortalHostname,omitempty" azure:"ro"`

	// READ-ONLY; iSCSI Target Portal Port
	TargetPortalPort *int32 `json:"targetPortalPort,omitempty" azure:"ro"`
}

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 List

type List struct {
	// REQUIRED; An array of Elastic San objects.
	Value []*ElasticSan `json:"value,omitempty"`

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

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 NetworkRuleSet

type NetworkRuleSet struct {
	// The list of virtual network rules.
	VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
}

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 OperationDisplay

type OperationDisplay struct {
	// REQUIRED; Localized friendly description for the operation, as it should be shown to the user.
	Description *string `json:"description,omitempty"`

	// REQUIRED; Localized friendly name for the operation, as it should be shown to the user.
	Operation *string `json:"operation,omitempty"`

	// REQUIRED; Localized friendly form of the resource provider name.
	Provider *string `json:"provider,omitempty"`

	// REQUIRED; Localized friendly form of the resource type related to this action/operation.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - Metadata about an 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 {
	// REQUIRED; An array of operations supported by the ElasticSan RP.
	Value []*RPOperation `json:"value,omitempty"`

	// URI to fetch the next section of the paginated response.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult - List of operations supported by the RP.

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 2021-11-20-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example (OperationsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (OperationsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type Properties

type Properties struct {
	// REQUIRED; Base size of the Elastic San appliance in TiB.
	BaseSizeTiB *int64 `json:"baseSizeTiB,omitempty"`

	// REQUIRED; Extended size of the Elastic San appliance in TiB.
	ExtendedCapacitySizeTiB *int64 `json:"extendedCapacitySizeTiB,omitempty"`

	// REQUIRED; resource sku
	SKU *SKU `json:"sku,omitempty"`

	// Logical zone for Elastic San resource; example: ["1"].
	AvailabilityZones []*string `json:"availabilityZones,omitempty"`

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Total Provisioned IOPS of the Elastic San appliance.
	TotalIops *int64 `json:"totalIops,omitempty" azure:"ro"`

	// READ-ONLY; Total Provisioned MBps Elastic San appliance.
	TotalMBps *int64 `json:"totalMBps,omitempty" azure:"ro"`

	// READ-ONLY; Total size of the Elastic San appliance in TB.
	TotalSizeTiB *int64 `json:"totalSizeTiB,omitempty" azure:"ro"`

	// READ-ONLY; Total size of the provisioned Volumes in GiB.
	TotalVolumeSizeGiB *int64 `json:"totalVolumeSizeGiB,omitempty" azure:"ro"`

	// READ-ONLY; Total number of volume groups in this Elastic San appliance.
	VolumeGroupCount *int64 `json:"volumeGroupCount,omitempty" azure:"ro"`
}

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 RPOperation

type RPOperation struct {
	// REQUIRED; The name of the operation being performed on this particular object
	Name *string `json:"name,omitempty"`

	// READ-ONLY; Additional metadata about RP operation.
	Display *OperationDisplay `json:"display,omitempty" azure:"ro"`

	// READ-ONLY; Indicates whether the operation applies to data-plane.
	IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"`
}

RPOperation - Description of a ElasticSan RP Operation

func (RPOperation) MarshalJSON

func (r RPOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RPOperation.

func (*RPOperation) UnmarshalJSON

func (r *RPOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RPOperation.

type SKU

type SKU struct {
	// REQUIRED; The sku name.
	Name *SKUName `json:"name,omitempty"`

	// The sku tier.
	Tier *SKUTier `json:"tier,omitempty"`
}

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 `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; A string value to indicate states of given capability.
	Value *string `json:"value,omitempty" azure:"ro"`
}

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 `json:"name,omitempty"`

	// Sku Tier
	Tier *SKUTier `json:"tier,omitempty"`

	// READ-ONLY; The capability information in the specified SKU.
	Capabilities []*SKUCapability `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; Availability of the SKU for the location/zone
	LocationInfo []*SKULocationInfo `json:"locationInfo,omitempty" azure:"ro"`

	// 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 `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`
}

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; List of ResourceType Sku
	Value []*SKUInformation `json:"value,omitempty" azure:"ro"`
}

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 `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The zones.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

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 2021-11-20-preview options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

Example (SkusListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewSKUsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armelasticsan.SKUsClientListOptions{Filter: to.Ptr("aaaa")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (SkusListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewSKUsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(&armelasticsan.SKUsClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type SKUsClientListOptions

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

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

type SKUsClientListResponse

type SKUsClientListResponse struct {
	SKUInformationList
}

SKUsClientListResponse contains the response from method SKUsClient.List.

type SourceCreationData

type SourceCreationData struct {
	// This enumerates the possible sources of a volume creation.
	CreateSource *string `json:"createSource,omitempty"`

	// If createOption is Copy, this is the ARM id of the source snapshot or disk. If createOption is Restore, this is the ARM-like
	// id of the source disk restore point.
	SourceURI *string `json:"sourceUri,omitempty"`
}

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 State

type State string

State - Gets the state of virtual network rule.

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

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

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 `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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 `json:"properties,omitempty"`

	// Update tags
	Tags map[string]*string `json:"tags,omitempty"`
}

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 `json:"baseSizeTiB,omitempty"`

	// Extended size of the Elastic San appliance in TiB.
	ExtendedCapacitySizeTiB *int64 `json:"extendedCapacitySizeTiB,omitempty"`
}

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 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 `json:"id,omitempty"`

	// The action of virtual network rule.
	Action *string `json:"action,omitempty"`

	// READ-ONLY; Gets the state of virtual network rule.
	State *State `json:"state,omitempty" azure:"ro"`
}

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 {
	// Properties of Volume.
	Properties *VolumeProperties `json:"properties,omitempty"`

	// Azure resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Azure resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource metadata required by ARM RPC
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 VolumeGroup

type VolumeGroup struct {
	// Properties of VolumeGroup.
	Properties *VolumeGroupProperties `json:"properties,omitempty"`

	// Azure resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Azure resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource metadata required by ARM RPC
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 {
	// REQUIRED; An array of Volume Groups objects.
	Value []*VolumeGroup `json:"value,omitempty"`

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

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 `json:"encryption,omitempty"`

	// A collection of rules governing the accessibility from specific network locations.
	NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"`

	// Type of storage target
	ProtocolType *StorageTargetType `json:"protocolType,omitempty"`

	// READ-ONLY; State of the operation on the resource.
	ProvisioningState *ProvisioningStates `json:"provisioningState,omitempty" azure:"ro"`
}

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 {
	// Properties of VolumeGroup.
	Properties *VolumeGroupUpdateProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

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 `json:"encryption,omitempty"`

	// A collection of rules governing the accessibility from specific network locations.
	NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"`

	// Type of storage target
	ProtocolType *StorageTargetType `json:"protocolType,omitempty"`
}

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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", armelasticsan.VolumeGroup{
		Tags: map[string]*string{
			"key5933": to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
		},
		Properties: &armelasticsan.VolumeGroupProperties{
			Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
			NetworkACLs: &armelasticsan.NetworkRuleSet{
				VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
					{
						Action:                   to.Ptr("Allow"),
						VirtualNetworkResourceID: to.Ptr("aaaaaaaaaaaaaaaa"),
					}},
			},
			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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumeGroupsCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", 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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", 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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", armelasticsan.VolumeGroupUpdate{
		Properties: &armelasticsan.VolumeGroupUpdateProperties{
			Encryption: to.Ptr(armelasticsan.EncryptionTypeEncryptionAtRestWithPlatformKey),
			NetworkACLs: &armelasticsan.NetworkRuleSet{
				VirtualNetworkRules: []*armelasticsan.VirtualNetworkRule{
					{
						Action:                   to.Ptr("Allow"),
						VirtualNetworkResourceID: to.Ptr("aaaaaaaaaaaaaaaa"),
					}},
			},
			ProtocolType: to.Ptr(armelasticsan.StorageTargetTypeIscsi),
		},
		Tags: map[string]*string{
			"key7542": to.Ptr("aaaaaaaaaaaaaaaaaaaa"),
		},
	}, 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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumeGroupsUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", 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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumeGroupsGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VolumeGroupsClient) NewListByElasticSanPager

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

NewListByElasticSanPager - List VolumeGroups. Generated from API version 2021-11-20-preview 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.ListByElasticSan method.

Example (VolumeGroupsListByElasticSanMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByElasticSanPager("rgelasticsan", "ti7q-k952-1qB3J_5", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (VolumeGroupsListByElasticSanMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumeGroupsClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByElasticSanPager("rgelasticsan", "ti7q-k952-1qB3J_5", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	VolumeGroup
}

VolumeGroupsClientCreateResponse contains the response from method VolumeGroupsClient.Create.

type VolumeGroupsClientDeleteResponse

type VolumeGroupsClientDeleteResponse struct {
}

VolumeGroupsClientDeleteResponse contains the response from method VolumeGroupsClient.Delete.

type VolumeGroupsClientGetOptions

type VolumeGroupsClientGetOptions struct {
}

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

type VolumeGroupsClientGetResponse

type VolumeGroupsClientGetResponse struct {
	VolumeGroup
}

VolumeGroupsClientGetResponse contains the response from method VolumeGroupsClient.Get.

type VolumeGroupsClientListByElasticSanOptions

type VolumeGroupsClientListByElasticSanOptions struct {
}

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

type VolumeGroupsClientListByElasticSanResponse

type VolumeGroupsClientListByElasticSanResponse struct {
	VolumeGroupList
}

VolumeGroupsClientListByElasticSanResponse contains the response from method VolumeGroupsClient.ListByElasticSan.

type VolumeGroupsClientUpdateResponse

type VolumeGroupsClientUpdateResponse struct {
	VolumeGroup
}

VolumeGroupsClientUpdateResponse contains the response from method VolumeGroupsClient.Update.

type VolumeList

type VolumeList struct {
	// REQUIRED; An array of Volume objects.
	Value []*Volume `json:"value,omitempty"`

	// READ-ONLY; URI to fetch the next section of the paginated response.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

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 {
	// State of the operation on the resource.
	CreationData *SourceCreationData `json:"creationData,omitempty"`

	// Volume size.
	SizeGiB *int64 `json:"sizeGiB,omitempty"`

	// READ-ONLY; Storage target information
	StorageTarget *IscsiTargetInfo `json:"storageTarget,omitempty" azure:"ro"`

	// READ-ONLY; Unique Id of the volume in GUID format
	VolumeID *string `json:"volumeId,omitempty" azure:"ro"`
}

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 VolumeUpdate

type VolumeUpdate struct {
	// Properties of Volume.
	Properties *VolumeUpdateProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

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 {
	// Volume size.
	SizeGiB *int64 `json:"sizeGiB,omitempty"`
}

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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", armelasticsan.Volume{
		Tags: map[string]*string{
			"key7423": to.Ptr("aaaa"),
		},
		Properties: &armelasticsan.VolumeProperties{
			CreationData: &armelasticsan.SourceCreationData{
				CreateSource: to.Ptr("None"),
				SourceURI:    to.Ptr("aaaaaa"),
			},
			SizeGiB: to.Ptr[int64](22),
		},
	}, 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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumesCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", armelasticsan.Volume{}, 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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/examples/Volumes_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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", 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 (VolumesDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", 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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", armelasticsan.VolumeUpdate{
		Properties: &armelasticsan.VolumeUpdateProperties{
			SizeGiB: to.Ptr[int64](9),
		},
		Tags: map[string]*string{
			"key1864": to.Ptr("aaaaaaaaa"),
		},
	}, 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)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumesUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", 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)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

Example (VolumesGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", "9132y", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2021-11-20-preview 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.ListByVolumeGroup method.

Example (VolumesListByVolumeGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByVolumeGroupPager("rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

Example (VolumesListByVolumeGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2021-11-20-preview/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()
	client, err := armelasticsan.NewVolumesClient("aaaaaaaaaaaaaaaaaa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByVolumeGroupPager("rgelasticsan", "ti7q-k952-1qB3J_5", "u_5I_1j4t3", nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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
}

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 {
	Volume
}

VolumesClientCreateResponse contains the response from method VolumesClient.Create.

type VolumesClientDeleteResponse

type VolumesClientDeleteResponse struct {
}

VolumesClientDeleteResponse contains the response from method VolumesClient.Delete.

type VolumesClientGetOptions

type VolumesClientGetOptions struct {
}

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

type VolumesClientGetResponse

type VolumesClientGetResponse struct {
	Volume
}

VolumesClientGetResponse contains the response from method VolumesClient.Get.

type VolumesClientListByVolumeGroupOptions

type VolumesClientListByVolumeGroupOptions struct {
}

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

type VolumesClientListByVolumeGroupResponse

type VolumesClientListByVolumeGroupResponse struct {
	VolumeList
}

VolumesClientListByVolumeGroupResponse contains the response from method VolumesClient.ListByVolumeGroup.

type VolumesClientUpdateResponse

type VolumesClientUpdateResponse struct {
	Volume
}

VolumesClientUpdateResponse contains the response from method VolumesClient.Update.

Jump to

Keyboard shortcuts

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