armavs

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 2

README

Azure VMware Solution Module for Go

PkgGoDev

The armavs module provides operations for working with Azure VMware Solution.

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 VMware Solution module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewVirtualMachinesClient()

Fakes

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

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

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the VMware Solution 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 Addon

type Addon struct {
	// The properties of an addon resource
	Properties AddonPropertiesClassification

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Addon - An addon resource

func (Addon) MarshalJSON

func (a Addon) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Addon.

func (*Addon) UnmarshalJSON

func (a *Addon) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Addon.

type AddonArcProperties added in v1.1.0

type AddonArcProperties struct {
	// REQUIRED; The type of private cloud addon
	AddonType *AddonType

	// The VMware vCenter resource ID
	VCenter *string

	// READ-ONLY; The state of the addon provisioning
	ProvisioningState *AddonProvisioningState
}

AddonArcProperties - The properties of an Arc addon

func (*AddonArcProperties) GetAddonProperties added in v1.1.0

func (a *AddonArcProperties) GetAddonProperties() *AddonProperties

GetAddonProperties implements the AddonPropertiesClassification interface for type AddonArcProperties.

func (AddonArcProperties) MarshalJSON added in v1.1.0

func (a AddonArcProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonArcProperties.

func (*AddonArcProperties) UnmarshalJSON added in v1.1.0

func (a *AddonArcProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonArcProperties.

type AddonHcxProperties

type AddonHcxProperties struct {
	// REQUIRED; The type of private cloud addon
	AddonType *AddonType

	// REQUIRED; The HCX offer, example VMware MaaS Cloud Provider (Enterprise)
	Offer *string

	// READ-ONLY; The state of the addon provisioning
	ProvisioningState *AddonProvisioningState
}

AddonHcxProperties - The properties of an HCX addon

func (*AddonHcxProperties) GetAddonProperties added in v0.2.0

func (a *AddonHcxProperties) GetAddonProperties() *AddonProperties

GetAddonProperties implements the AddonPropertiesClassification interface for type AddonHcxProperties.

func (AddonHcxProperties) MarshalJSON

func (a AddonHcxProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonHcxProperties.

func (*AddonHcxProperties) UnmarshalJSON

func (a *AddonHcxProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonHcxProperties.

type AddonList

type AddonList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*Addon
}

AddonList - A paged list of addons

func (AddonList) MarshalJSON

func (a AddonList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonList.

func (*AddonList) UnmarshalJSON added in v1.1.0

func (a *AddonList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonList.

type AddonProperties

type AddonProperties struct {
	// REQUIRED; The type of private cloud addon
	AddonType *AddonType

	// READ-ONLY; The state of the addon provisioning
	ProvisioningState *AddonProvisioningState
}

AddonProperties - The properties of an addon

func (*AddonProperties) GetAddonProperties

func (a *AddonProperties) GetAddonProperties() *AddonProperties

GetAddonProperties implements the AddonPropertiesClassification interface for type AddonProperties.

func (AddonProperties) MarshalJSON added in v1.1.0

func (a AddonProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonProperties.

func (*AddonProperties) UnmarshalJSON

func (a *AddonProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonProperties.

type AddonPropertiesClassification

type AddonPropertiesClassification interface {
	// GetAddonProperties returns the AddonProperties content of the underlying type.
	GetAddonProperties() *AddonProperties
}

AddonPropertiesClassification provides polymorphic access to related types. Call the interface's GetAddonProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AddonArcProperties, *AddonHcxProperties, *AddonProperties, *AddonSrmProperties, *AddonVrProperties

type AddonProvisioningState

type AddonProvisioningState string

AddonProvisioningState - The state of the addon provisioning

const (
	AddonProvisioningStateBuilding  AddonProvisioningState = "Building"
	AddonProvisioningStateCanceled  AddonProvisioningState = "Canceled"
	AddonProvisioningStateCancelled AddonProvisioningState = "Cancelled"
	AddonProvisioningStateDeleting  AddonProvisioningState = "Deleting"
	AddonProvisioningStateFailed    AddonProvisioningState = "Failed"
	AddonProvisioningStateSucceeded AddonProvisioningState = "Succeeded"
	AddonProvisioningStateUpdating  AddonProvisioningState = "Updating"
)

func PossibleAddonProvisioningStateValues

func PossibleAddonProvisioningStateValues() []AddonProvisioningState

PossibleAddonProvisioningStateValues returns the possible values for the AddonProvisioningState const type.

type AddonSrmProperties

type AddonSrmProperties struct {
	// REQUIRED; The type of private cloud addon
	AddonType *AddonType

	// The Site Recovery Manager (SRM) license
	LicenseKey *string

	// READ-ONLY; The state of the addon provisioning
	ProvisioningState *AddonProvisioningState
}

AddonSrmProperties - The properties of a Site Recovery Manager (SRM) addon

func (*AddonSrmProperties) GetAddonProperties added in v0.2.0

func (a *AddonSrmProperties) GetAddonProperties() *AddonProperties

GetAddonProperties implements the AddonPropertiesClassification interface for type AddonSrmProperties.

func (AddonSrmProperties) MarshalJSON

func (a AddonSrmProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonSrmProperties.

func (*AddonSrmProperties) UnmarshalJSON

func (a *AddonSrmProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonSrmProperties.

type AddonType

type AddonType string

AddonType - The type of private cloud addon

const (
	AddonTypeArc AddonType = "Arc"
	AddonTypeHCX AddonType = "HCX"
	AddonTypeSRM AddonType = "SRM"
	AddonTypeVR  AddonType = "VR"
)

func PossibleAddonTypeValues

func PossibleAddonTypeValues() []AddonType

PossibleAddonTypeValues returns the possible values for the AddonType const type.

type AddonVrProperties

type AddonVrProperties struct {
	// REQUIRED; The type of private cloud addon
	AddonType *AddonType

	// REQUIRED; The vSphere Replication Server (VRS) count
	VrsCount *int32

	// READ-ONLY; The state of the addon provisioning
	ProvisioningState *AddonProvisioningState
}

AddonVrProperties - The properties of a vSphere Replication (VR) addon

func (*AddonVrProperties) GetAddonProperties added in v0.2.0

func (a *AddonVrProperties) GetAddonProperties() *AddonProperties

GetAddonProperties implements the AddonPropertiesClassification interface for type AddonVrProperties.

func (AddonVrProperties) MarshalJSON

func (a AddonVrProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AddonVrProperties.

func (*AddonVrProperties) UnmarshalJSON

func (a *AddonVrProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AddonVrProperties.

type AddonsClient

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

AddonsClient contains the methods for the Addons group. Don't use this type directly, use NewAddonsClient() instead.

func NewAddonsClient

func NewAddonsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AddonsClient, error)

NewAddonsClient creates a new instance of AddonsClient 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 (*AddonsClient) BeginCreateOrUpdate

func (client *AddonsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, addonName string, addon Addon, options *AddonsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AddonsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a addon in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • addonName - Name of the addon for the private cloud
  • addon - A addon in the private cloud
  • options - AddonsClientBeginCreateOrUpdateOptions contains the optional parameters for the AddonsClient.BeginCreateOrUpdate method.
Example (AddonsCreateOrUpdateArc)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_ArcReg.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAddonsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "arc", armavs.Addon{
		Properties: &armavs.AddonArcProperties{
			AddonType: to.Ptr(armavs.AddonTypeArc),
			VCenter:   to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("arc"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/arc"),
	// 	Properties: &armavs.AddonArcProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeArc),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		VCenter: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter"),
	// 	},
	// }
}
Output:

Example (AddonsCreateOrUpdateHcx)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_HCX.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAddonsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "hcx", armavs.Addon{
		Properties: &armavs.AddonHcxProperties{
			AddonType: to.Ptr(armavs.AddonTypeHCX),
			Offer:     to.Ptr("VMware MaaS Cloud Provider (Enterprise)"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("hcx"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx"),
	// 	Properties: &armavs.AddonHcxProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeHCX),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		Offer: to.Ptr("VMware MaaS Cloud Provider (Enterprise)"),
	// 	},
	// }
}
Output:

Example (AddonsCreateOrUpdateSrm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_SRM.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAddonsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "srm", armavs.Addon{
		Properties: &armavs.AddonSrmProperties{
			AddonType:  to.Ptr(armavs.AddonTypeSRM),
			LicenseKey: to.Ptr("41915178-A8FF-4A4D-B683-6D735AF5E3F5"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("srm"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm"),
	// 	Properties: &armavs.AddonSrmProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeSRM),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		LicenseKey: to.Ptr("41915178-A8FF-4A4D-B683-6D735AF5E3F5"),
	// 	},
	// }
}
Output:

Example (AddonsCreateOrUpdateVr)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_VR.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAddonsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "vr", armavs.Addon{
		Properties: &armavs.AddonVrProperties{
			AddonType: to.Ptr(armavs.AddonTypeVR),
			VrsCount:  to.Ptr[int32](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("vr"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr"),
	// 	Properties: &armavs.AddonVrProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeVR),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		VrsCount: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*AddonsClient) BeginDelete

func (client *AddonsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, addonName string, options *AddonsClientBeginDeleteOptions) (*runtime.Poller[AddonsClientDeleteResponse], error)

BeginDelete - Delete a addon in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • addonName - Name of the addon for the private cloud
  • options - AddonsClientBeginDeleteOptions contains the optional parameters for the AddonsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAddonsClient().BeginDelete(ctx, "group1", "cloud1", "srm", 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 (*AddonsClient) Get

func (client *AddonsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, addonName string, options *AddonsClientGetOptions) (AddonsClientGetResponse, error)

Get - Get an addon by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • addonName - Name of the addon for the private cloud
  • options - AddonsClientGetOptions contains the optional parameters for the AddonsClient.Get method.
Example (AddonsGetArcReg)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_ArcReg.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "arc", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("arc"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/arc"),
	// 	Properties: &armavs.AddonArcProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeArc),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		VCenter: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter"),
	// 	},
	// }
}
Output:

Example (AddonsGetHcx)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_HCX.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "hcx", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("hcx"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx"),
	// 	Properties: &armavs.AddonHcxProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeHCX),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		Offer: to.Ptr("VMware MaaS Cloud Provider (Enterprise)"),
	// 	},
	// }
}
Output:

Example (AddonsGetSrm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_SRM.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "srm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("srm"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm"),
	// 	Properties: &armavs.AddonSrmProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeSRM),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		LicenseKey: to.Ptr("41915178-A8FF-4A4D-B683-6D735AF5E3F5"),
	// 	},
	// }
}
Output:

Example (AddonsGetVr)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_VR.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "vr", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Addon = armavs.Addon{
	// 	Name: to.Ptr("vr"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr"),
	// 	Properties: &armavs.AddonVrProperties{
	// 		AddonType: to.Ptr(armavs.AddonTypeVR),
	// 		ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
	// 		VrsCount: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*AddonsClient) NewListPager added in v0.4.0

func (client *AddonsClient) NewListPager(resourceGroupName string, privateCloudName string, options *AddonsClientListOptions) *runtime.Pager[AddonsClientListResponse]

NewListPager - List addons in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - AddonsClientListOptions contains the optional parameters for the AddonsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAddonsClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AddonList = armavs.AddonList{
		// 	Value: []*armavs.Addon{
		// 		{
		// 			Name: to.Ptr("srm"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm"),
		// 			Properties: &armavs.AddonSrmProperties{
		// 				AddonType: to.Ptr(armavs.AddonTypeSRM),
		// 				ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
		// 				LicenseKey: to.Ptr("41915178-A8FF-4A4D-B683-6D735AF5E3F5"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AddonsClientBeginCreateOrUpdateOptions added in v0.2.0

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

AddonsClientBeginCreateOrUpdateOptions contains the optional parameters for the AddonsClient.BeginCreateOrUpdate method.

type AddonsClientBeginDeleteOptions added in v0.2.0

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

AddonsClientBeginDeleteOptions contains the optional parameters for the AddonsClient.BeginDelete method.

type AddonsClientCreateOrUpdateResponse added in v0.2.0

type AddonsClientCreateOrUpdateResponse struct {
	// An addon resource
	Addon
}

AddonsClientCreateOrUpdateResponse contains the response from method AddonsClient.BeginCreateOrUpdate.

type AddonsClientDeleteResponse added in v0.2.0

type AddonsClientDeleteResponse struct {
}

AddonsClientDeleteResponse contains the response from method AddonsClient.BeginDelete.

type AddonsClientGetOptions added in v0.2.0

type AddonsClientGetOptions struct {
}

AddonsClientGetOptions contains the optional parameters for the AddonsClient.Get method.

type AddonsClientGetResponse added in v0.2.0

type AddonsClientGetResponse struct {
	// An addon resource
	Addon
}

AddonsClientGetResponse contains the response from method AddonsClient.Get.

type AddonsClientListOptions added in v0.2.0

type AddonsClientListOptions struct {
}

AddonsClientListOptions contains the optional parameters for the AddonsClient.NewListPager method.

type AddonsClientListResponse added in v0.2.0

type AddonsClientListResponse struct {
	// A paged list of addons
	AddonList
}

AddonsClientListResponse contains the response from method AddonsClient.NewListPager.

type AdminCredentials

type AdminCredentials struct {
	// READ-ONLY; NSX-T Manager password
	NsxtPassword *string

	// READ-ONLY; NSX-T Manager username
	NsxtUsername *string

	// READ-ONLY; vCenter admin password
	VcenterPassword *string

	// READ-ONLY; vCenter admin username
	VcenterUsername *string
}

AdminCredentials - Administrative credentials for accessing vCenter and NSX-T

func (AdminCredentials) MarshalJSON added in v1.1.0

func (a AdminCredentials) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AdminCredentials.

func (*AdminCredentials) UnmarshalJSON added in v1.1.0

func (a *AdminCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AdminCredentials.

type AffinityStrength added in v1.1.0

type AffinityStrength string

AffinityStrength - VM-Host placement policy affinity strength (should/must)

const (
	AffinityStrengthMust   AffinityStrength = "Must"
	AffinityStrengthShould AffinityStrength = "Should"
)

func PossibleAffinityStrengthValues added in v1.1.0

func PossibleAffinityStrengthValues() []AffinityStrength

PossibleAffinityStrengthValues returns the possible values for the AffinityStrength const type.

type AffinityType

type AffinityType string

AffinityType - Placement policy affinity type

const (
	AffinityTypeAffinity     AffinityType = "Affinity"
	AffinityTypeAntiAffinity AffinityType = "AntiAffinity"
)

func PossibleAffinityTypeValues

func PossibleAffinityTypeValues() []AffinityType

PossibleAffinityTypeValues returns the possible values for the AffinityType const type.

type AuthorizationsClient

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

AuthorizationsClient contains the methods for the Authorizations group. Don't use this type directly, use NewAuthorizationsClient() instead.

func NewAuthorizationsClient

func NewAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationsClient, error)

NewAuthorizationsClient creates a new instance of AuthorizationsClient 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 (*AuthorizationsClient) BeginCreateOrUpdate

func (client *AuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization ExpressRouteAuthorization, options *AuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AuthorizationsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update an ExpressRoute Circuit Authorization in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • authorizationName - Name of the ExpressRoute Circuit Authorization in the private cloud
  • authorization - An ExpressRoute Circuit Authorization
  • options - AuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AuthorizationsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAuthorizationsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "authorization1", armavs.ExpressRouteAuthorization{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ExpressRouteAuthorization = armavs.ExpressRouteAuthorization{
	// 	Name: to.Ptr("authorization1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/authorizations"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/authorization1"),
	// 	Properties: &armavs.ExpressRouteAuthorizationProperties{
	// 		ExpressRouteAuthorizationID: to.Ptr("/subscriptions/5206f269-120b-41ef-a95b-0dce7109de61/resourceGroups/tnt34-cust-mockp02-spearj2dev/providers/Microsoft.Network/expressroutecircuits/tnt34-cust-mockp02-spearj2dev-er/authorizations/myauth"),
	// 		ExpressRouteAuthorizationKey: to.Ptr("37b0db3b-3b17-4c7b-bf76-bf13b01bcadc"),
	// 		ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 		ProvisioningState: to.Ptr(armavs.ExpressRouteAuthorizationProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AuthorizationsClient) BeginDelete

func (client *AuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, options *AuthorizationsClientBeginDeleteOptions) (*runtime.Poller[AuthorizationsClientDeleteResponse], error)

BeginDelete - Delete an ExpressRoute Circuit Authorization in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • authorizationName - Name of the ExpressRoute Circuit Authorization in the private cloud
  • options - AuthorizationsClientBeginDeleteOptions contains the optional parameters for the AuthorizationsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAuthorizationsClient().BeginDelete(ctx, "group1", "cloud1", "authorization1", 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 (*AuthorizationsClient) Get

func (client *AuthorizationsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, options *AuthorizationsClientGetOptions) (AuthorizationsClientGetResponse, error)

Get - Get an ExpressRoute Circuit Authorization by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • authorizationName - Name of the ExpressRoute Circuit Authorization in the private cloud
  • options - AuthorizationsClientGetOptions contains the optional parameters for the AuthorizationsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAuthorizationsClient().Get(ctx, "group1", "cloud1", "authorization1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ExpressRouteAuthorization = armavs.ExpressRouteAuthorization{
	// 	Name: to.Ptr("authorization1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/authorizations"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/authorization1"),
	// 	Properties: &armavs.ExpressRouteAuthorizationProperties{
	// 		ExpressRouteAuthorizationID: to.Ptr("/subscriptions/5206f269-120b-41ef-a95b-0dce7109de61/resourceGroups/tnt34-cust-mockp02-spearj2dev/providers/Microsoft.Network/expressroutecircuits/tnt34-cust-mockp02-spearj2dev-er/authorizations/myauth"),
	// 		ExpressRouteAuthorizationKey: to.Ptr("37b0db3b-3b17-4c7b-bf76-bf13b01bcadc"),
	// 		ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 		ProvisioningState: to.Ptr(armavs.ExpressRouteAuthorizationProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AuthorizationsClient) NewListPager added in v0.4.0

func (client *AuthorizationsClient) NewListPager(resourceGroupName string, privateCloudName string, options *AuthorizationsClientListOptions) *runtime.Pager[AuthorizationsClientListResponse]

NewListPager - List ExpressRoute Circuit Authorizations in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - AuthorizationsClientListOptions contains the optional parameters for the AuthorizationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAuthorizationsClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ExpressRouteAuthorizationList = armavs.ExpressRouteAuthorizationList{
		// 	Value: []*armavs.ExpressRouteAuthorization{
		// 		{
		// 			Name: to.Ptr("authorization1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/authorizations"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/authorization1"),
		// 			Properties: &armavs.ExpressRouteAuthorizationProperties{
		// 				ExpressRouteAuthorizationID: to.Ptr("/subscriptions/5206f269-120b-41ef-a95b-0dce7109de61/resourceGroups/tnt34-cust-mockp02-spearj2dev/providers/Microsoft.Network/expressroutecircuits/tnt34-cust-mockp02-spearj2dev-er/authorizations/myauth"),
		// 				ExpressRouteAuthorizationKey: to.Ptr("37b0db3b-3b17-4c7b-bf76-bf13b01bcadc"),
		// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 				ProvisioningState: to.Ptr(armavs.ExpressRouteAuthorizationProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AuthorizationsClientBeginCreateOrUpdateOptions added in v0.2.0

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

AuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AuthorizationsClient.BeginCreateOrUpdate method.

type AuthorizationsClientBeginDeleteOptions added in v0.2.0

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

AuthorizationsClientBeginDeleteOptions contains the optional parameters for the AuthorizationsClient.BeginDelete method.

type AuthorizationsClientCreateOrUpdateResponse added in v0.2.0

type AuthorizationsClientCreateOrUpdateResponse struct {
	// ExpressRoute Circuit Authorization
	ExpressRouteAuthorization
}

AuthorizationsClientCreateOrUpdateResponse contains the response from method AuthorizationsClient.BeginCreateOrUpdate.

type AuthorizationsClientDeleteResponse added in v0.2.0

type AuthorizationsClientDeleteResponse struct {
}

AuthorizationsClientDeleteResponse contains the response from method AuthorizationsClient.BeginDelete.

type AuthorizationsClientGetOptions added in v0.2.0

type AuthorizationsClientGetOptions struct {
}

AuthorizationsClientGetOptions contains the optional parameters for the AuthorizationsClient.Get method.

type AuthorizationsClientGetResponse added in v0.2.0

type AuthorizationsClientGetResponse struct {
	// ExpressRoute Circuit Authorization
	ExpressRouteAuthorization
}

AuthorizationsClientGetResponse contains the response from method AuthorizationsClient.Get.

type AuthorizationsClientListOptions added in v0.2.0

type AuthorizationsClientListOptions struct {
}

AuthorizationsClientListOptions contains the optional parameters for the AuthorizationsClient.NewListPager method.

type AuthorizationsClientListResponse added in v0.2.0

type AuthorizationsClientListResponse struct {
	// A paged list of ExpressRoute Circuit Authorizations
	ExpressRouteAuthorizationList
}

AuthorizationsClientListResponse contains the response from method AuthorizationsClient.NewListPager.

type AvailabilityProperties

type AvailabilityProperties struct {
	// The secondary availability zone for the private cloud
	SecondaryZone *int32

	// The availability strategy for the private cloud
	Strategy *AvailabilityStrategy

	// The primary availability zone for the private cloud
	Zone *int32
}

AvailabilityProperties - The properties describing private cloud availability zone distribution

func (AvailabilityProperties) MarshalJSON added in v1.1.0

func (a AvailabilityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailabilityProperties.

func (*AvailabilityProperties) UnmarshalJSON added in v1.1.0

func (a *AvailabilityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilityProperties.

type AvailabilityStrategy

type AvailabilityStrategy string

AvailabilityStrategy - The availability strategy for the private cloud

const (
	AvailabilityStrategyDualZone   AvailabilityStrategy = "DualZone"
	AvailabilityStrategySingleZone AvailabilityStrategy = "SingleZone"
)

func PossibleAvailabilityStrategyValues

func PossibleAvailabilityStrategyValues() []AvailabilityStrategy

PossibleAvailabilityStrategyValues returns the possible values for the AvailabilityStrategy const type.

type AzureHybridBenefitType added in v1.1.0

type AzureHybridBenefitType string

AzureHybridBenefitType - Placement policy hosts opt-in Azure Hybrid Benefit type

const (
	AzureHybridBenefitTypeNone    AzureHybridBenefitType = "None"
	AzureHybridBenefitTypeSQLHost AzureHybridBenefitType = "SqlHost"
)

func PossibleAzureHybridBenefitTypeValues added in v1.1.0

func PossibleAzureHybridBenefitTypeValues() []AzureHybridBenefitType

PossibleAzureHybridBenefitTypeValues returns the possible values for the AzureHybridBenefitType const type.

type Circuit

type Circuit struct {
	// READ-ONLY; Identifier of the ExpressRoute Circuit (Microsoft Colo only)
	ExpressRouteID *string

	// READ-ONLY; ExpressRoute Circuit private peering identifier
	ExpressRoutePrivatePeeringID *string

	// READ-ONLY; CIDR of primary subnet
	PrimarySubnet *string

	// READ-ONLY; CIDR of secondary subnet
	SecondarySubnet *string
}

Circuit - An ExpressRoute Circuit

func (Circuit) MarshalJSON added in v1.1.0

func (c Circuit) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Circuit.

func (*Circuit) UnmarshalJSON added in v1.1.0

func (c *Circuit) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Circuit.

type ClientFactory added in v1.2.0

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

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

func NewClientFactory added in v1.2.0

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

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

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

func (*ClientFactory) NewAddonsClient added in v1.2.0

func (c *ClientFactory) NewAddonsClient() *AddonsClient

NewAddonsClient creates a new instance of AddonsClient.

func (*ClientFactory) NewAuthorizationsClient added in v1.2.0

func (c *ClientFactory) NewAuthorizationsClient() *AuthorizationsClient

NewAuthorizationsClient creates a new instance of AuthorizationsClient.

func (*ClientFactory) NewCloudLinksClient added in v1.2.0

func (c *ClientFactory) NewCloudLinksClient() *CloudLinksClient

NewCloudLinksClient creates a new instance of CloudLinksClient.

func (*ClientFactory) NewClustersClient added in v1.2.0

func (c *ClientFactory) NewClustersClient() *ClustersClient

NewClustersClient creates a new instance of ClustersClient.

func (*ClientFactory) NewDatastoresClient added in v1.2.0

func (c *ClientFactory) NewDatastoresClient() *DatastoresClient

NewDatastoresClient creates a new instance of DatastoresClient.

func (*ClientFactory) NewGlobalReachConnectionsClient added in v1.2.0

func (c *ClientFactory) NewGlobalReachConnectionsClient() *GlobalReachConnectionsClient

NewGlobalReachConnectionsClient creates a new instance of GlobalReachConnectionsClient.

func (*ClientFactory) NewHcxEnterpriseSitesClient added in v1.2.0

func (c *ClientFactory) NewHcxEnterpriseSitesClient() *HcxEnterpriseSitesClient

NewHcxEnterpriseSitesClient creates a new instance of HcxEnterpriseSitesClient.

func (*ClientFactory) NewLocationsClient added in v1.2.0

func (c *ClientFactory) NewLocationsClient() *LocationsClient

NewLocationsClient creates a new instance of LocationsClient.

func (*ClientFactory) NewOperationsClient added in v1.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPlacementPoliciesClient added in v1.2.0

func (c *ClientFactory) NewPlacementPoliciesClient() *PlacementPoliciesClient

NewPlacementPoliciesClient creates a new instance of PlacementPoliciesClient.

func (*ClientFactory) NewPrivateCloudsClient added in v1.2.0

func (c *ClientFactory) NewPrivateCloudsClient() *PrivateCloudsClient

NewPrivateCloudsClient creates a new instance of PrivateCloudsClient.

func (*ClientFactory) NewScriptCmdletsClient added in v1.2.0

func (c *ClientFactory) NewScriptCmdletsClient() *ScriptCmdletsClient

NewScriptCmdletsClient creates a new instance of ScriptCmdletsClient.

func (*ClientFactory) NewScriptExecutionsClient added in v1.2.0

func (c *ClientFactory) NewScriptExecutionsClient() *ScriptExecutionsClient

NewScriptExecutionsClient creates a new instance of ScriptExecutionsClient.

func (*ClientFactory) NewScriptPackagesClient added in v1.2.0

func (c *ClientFactory) NewScriptPackagesClient() *ScriptPackagesClient

NewScriptPackagesClient creates a new instance of ScriptPackagesClient.

func (*ClientFactory) NewVirtualMachinesClient added in v1.2.0

func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient

NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.

func (*ClientFactory) NewWorkloadNetworksClient added in v1.2.0

func (c *ClientFactory) NewWorkloadNetworksClient() *WorkloadNetworksClient

NewWorkloadNetworksClient creates a new instance of WorkloadNetworksClient.

type CloudLink struct {
	// The properties of a cloud link.
	Properties *CloudLinkProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

CloudLink - A cloud link resource

func (CloudLink) MarshalJSON

func (c CloudLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudLink.

func (*CloudLink) UnmarshalJSON

func (c *CloudLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudLink.

type CloudLinkList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*CloudLink
}

CloudLinkList - A paged list of cloud links

func (CloudLinkList) MarshalJSON

func (c CloudLinkList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudLinkList.

func (*CloudLinkList) UnmarshalJSON added in v1.1.0

func (c *CloudLinkList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudLinkList.

type CloudLinkProperties

type CloudLinkProperties struct {
	// Identifier of the other private cloud participating in the link.
	LinkedCloud *string

	// READ-ONLY; The state of the cloud link.
	Status *CloudLinkStatus
}

CloudLinkProperties - The properties of a cloud link.

func (CloudLinkProperties) MarshalJSON added in v1.1.0

func (c CloudLinkProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudLinkProperties.

func (*CloudLinkProperties) UnmarshalJSON added in v1.1.0

func (c *CloudLinkProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudLinkProperties.

type CloudLinkStatus

type CloudLinkStatus string

CloudLinkStatus - The state of the cloud link.

const (
	CloudLinkStatusActive       CloudLinkStatus = "Active"
	CloudLinkStatusBuilding     CloudLinkStatus = "Building"
	CloudLinkStatusDeleting     CloudLinkStatus = "Deleting"
	CloudLinkStatusDisconnected CloudLinkStatus = "Disconnected"
	CloudLinkStatusFailed       CloudLinkStatus = "Failed"
)

func PossibleCloudLinkStatusValues

func PossibleCloudLinkStatusValues() []CloudLinkStatus

PossibleCloudLinkStatusValues returns the possible values for the CloudLinkStatus const type.

type CloudLinksClient

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

CloudLinksClient contains the methods for the CloudLinks group. Don't use this type directly, use NewCloudLinksClient() instead.

func NewCloudLinksClient

func NewCloudLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudLinksClient, error)

NewCloudLinksClient creates a new instance of CloudLinksClient 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 (*CloudLinksClient) BeginCreateOrUpdate

func (client *CloudLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, cloudLinkName string, cloudLink CloudLink, options *CloudLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[CloudLinksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a cloud link in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • cloudLinkName - Name of the cloud link resource
  • cloudLink - A cloud link in the private cloud
  • options - CloudLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudLinksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudLinksClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "cloudLink1", armavs.CloudLink{
		Properties: &armavs.CloudLinkProperties{
			LinkedCloud: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CloudLink = armavs.CloudLink{
	// 	Name: to.Ptr("cloudLink1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/cloudLinks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/cloudLinks/cloudLink1"),
	// 	Properties: &armavs.CloudLinkProperties{
	// 		LinkedCloud: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"),
	// 		Status: to.Ptr(armavs.CloudLinkStatusActive),
	// 	},
	// }
}
Output:

func (*CloudLinksClient) BeginDelete

func (client *CloudLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, cloudLinkName string, options *CloudLinksClientBeginDeleteOptions) (*runtime.Poller[CloudLinksClientDeleteResponse], error)

BeginDelete - Delete a cloud link in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • cloudLinkName - Name of the cloud link resource
  • options - CloudLinksClientBeginDeleteOptions contains the optional parameters for the CloudLinksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudLinksClient().BeginDelete(ctx, "group1", "cloud1", "cloudLink1", 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 (*CloudLinksClient) Get

func (client *CloudLinksClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, cloudLinkName string, options *CloudLinksClientGetOptions) (CloudLinksClientGetResponse, error)

Get - Get an cloud link by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • cloudLinkName - Name of the cloud link resource
  • options - CloudLinksClientGetOptions contains the optional parameters for the CloudLinksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCloudLinksClient().Get(ctx, "group1", "cloud1", "cloudLink1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CloudLink = armavs.CloudLink{
	// 	Name: to.Ptr("cloudLink1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/cloudLinks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/cloudLinks/cloudLink1"),
	// 	Properties: &armavs.CloudLinkProperties{
	// 		LinkedCloud: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"),
	// 		Status: to.Ptr(armavs.CloudLinkStatusActive),
	// 	},
	// }
}
Output:

func (*CloudLinksClient) NewListPager added in v0.4.0

func (client *CloudLinksClient) NewListPager(resourceGroupName string, privateCloudName string, options *CloudLinksClientListOptions) *runtime.Pager[CloudLinksClientListResponse]

NewListPager - List cloud link in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - CloudLinksClientListOptions contains the optional parameters for the CloudLinksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCloudLinksClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CloudLinkList = armavs.CloudLinkList{
		// 	Value: []*armavs.CloudLink{
		// 		{
		// 			Name: to.Ptr("cloudLink1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/cloudLinks"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/cloudLinks/cloudLink1"),
		// 			Properties: &armavs.CloudLinkProperties{
		// 				LinkedCloud: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"),
		// 				Status: to.Ptr(armavs.CloudLinkStatusActive),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CloudLinksClientBeginCreateOrUpdateOptions added in v0.2.0

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

CloudLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudLinksClient.BeginCreateOrUpdate method.

type CloudLinksClientBeginDeleteOptions added in v0.2.0

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

CloudLinksClientBeginDeleteOptions contains the optional parameters for the CloudLinksClient.BeginDelete method.

type CloudLinksClientCreateOrUpdateResponse added in v0.2.0

type CloudLinksClientCreateOrUpdateResponse struct {
	// A cloud link resource
	CloudLink
}

CloudLinksClientCreateOrUpdateResponse contains the response from method CloudLinksClient.BeginCreateOrUpdate.

type CloudLinksClientDeleteResponse added in v0.2.0

type CloudLinksClientDeleteResponse struct {
}

CloudLinksClientDeleteResponse contains the response from method CloudLinksClient.BeginDelete.

type CloudLinksClientGetOptions added in v0.2.0

type CloudLinksClientGetOptions struct {
}

CloudLinksClientGetOptions contains the optional parameters for the CloudLinksClient.Get method.

type CloudLinksClientGetResponse added in v0.2.0

type CloudLinksClientGetResponse struct {
	// A cloud link resource
	CloudLink
}

CloudLinksClientGetResponse contains the response from method CloudLinksClient.Get.

type CloudLinksClientListOptions added in v0.2.0

type CloudLinksClientListOptions struct {
}

CloudLinksClientListOptions contains the optional parameters for the CloudLinksClient.NewListPager method.

type CloudLinksClientListResponse added in v0.2.0

type CloudLinksClientListResponse struct {
	// A paged list of cloud links
	CloudLinkList
}

CloudLinksClientListResponse contains the response from method CloudLinksClient.NewListPager.

type Cluster

type Cluster struct {
	// REQUIRED; The cluster SKU
	SKU *SKU

	// The properties of a cluster resource
	Properties *ClusterProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Cluster - A cluster resource

func (Cluster) MarshalJSON

func (c Cluster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Cluster.

func (*Cluster) UnmarshalJSON

func (c *Cluster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.

type ClusterList

type ClusterList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*Cluster
}

ClusterList - A paged list of clusters

func (ClusterList) MarshalJSON

func (c ClusterList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterList.

func (*ClusterList) UnmarshalJSON added in v1.1.0

func (c *ClusterList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterList.

type ClusterProperties

type ClusterProperties struct {
	// The cluster size
	ClusterSize *int32

	// The hosts
	Hosts []*string

	// READ-ONLY; The identity
	ClusterID *int32

	// READ-ONLY; The state of the cluster provisioning
	ProvisioningState *ClusterProvisioningState
}

ClusterProperties - The properties of a cluster

func (ClusterProperties) MarshalJSON added in v0.2.0

func (c ClusterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterProperties.

func (*ClusterProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.

type ClusterProvisioningState

type ClusterProvisioningState string

ClusterProvisioningState - The state of the cluster provisioning

const (
	ClusterProvisioningStateCanceled  ClusterProvisioningState = "Canceled"
	ClusterProvisioningStateCancelled ClusterProvisioningState = "Cancelled"
	ClusterProvisioningStateDeleting  ClusterProvisioningState = "Deleting"
	ClusterProvisioningStateFailed    ClusterProvisioningState = "Failed"
	ClusterProvisioningStateSucceeded ClusterProvisioningState = "Succeeded"
	ClusterProvisioningStateUpdating  ClusterProvisioningState = "Updating"
)

func PossibleClusterProvisioningStateValues

func PossibleClusterProvisioningStateValues() []ClusterProvisioningState

PossibleClusterProvisioningStateValues returns the possible values for the ClusterProvisioningState const type.

type ClusterUpdate

type ClusterUpdate struct {
	// The properties of a cluster resource that may be updated
	Properties *ClusterUpdateProperties
}

ClusterUpdate - An update of a cluster resource

func (ClusterUpdate) MarshalJSON

func (c ClusterUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterUpdate.

func (*ClusterUpdate) UnmarshalJSON added in v1.1.0

func (c *ClusterUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdate.

type ClusterUpdateProperties

type ClusterUpdateProperties struct {
	// The cluster size
	ClusterSize *int32

	// The hosts
	Hosts []*string
}

ClusterUpdateProperties - The properties of a cluster that may be updated

func (ClusterUpdateProperties) MarshalJSON

func (c ClusterUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterUpdateProperties.

func (*ClusterUpdateProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateProperties.

type ClusterZone added in v1.1.0

type ClusterZone struct {
	// READ-ONLY; List of hosts belonging to the availability zone in a cluster
	Hosts []*string

	// READ-ONLY; Availability zone identifier
	Zone *string
}

ClusterZone - Zone and associated hosts info

func (ClusterZone) MarshalJSON added in v1.1.0

func (c ClusterZone) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterZone.

func (*ClusterZone) UnmarshalJSON added in v1.1.0

func (c *ClusterZone) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterZone.

type ClusterZoneList added in v1.1.0

type ClusterZoneList struct {
	// Zone and associated hosts info
	Zones []*ClusterZone
}

ClusterZoneList - List of all zones and associated hosts for a cluster

func (ClusterZoneList) MarshalJSON added in v1.1.0

func (c ClusterZoneList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterZoneList.

func (*ClusterZoneList) UnmarshalJSON added in v1.1.0

func (c *ClusterZoneList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterZoneList.

type ClustersClient

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

ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.

func NewClustersClient

func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)

NewClustersClient creates a new instance of ClustersClient 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 (*ClustersClient) BeginCreateOrUpdate

func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, cluster Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a cluster in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • clusterName - Name of the cluster in the private cloud
  • cluster - A cluster in the private cloud
  • options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "cluster1", armavs.Cluster{
		Properties: &armavs.ClusterProperties{
			ClusterSize: to.Ptr[int32](3),
		},
		SKU: &armavs.SKU{
			Name: to.Ptr("AV20"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armavs.Cluster{
	// 	Name: to.Ptr("cluster1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1"),
	// 	Properties: &armavs.ClusterProperties{
	// 		ClusterSize: to.Ptr[int32](3),
	// 		Hosts: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 			ProvisioningState: to.Ptr(armavs.ClusterProvisioningStateSucceeded),
	// 		},
	// 		SKU: &armavs.SKU{
	// 			Name: to.Ptr("AV20"),
	// 		},
	// 	}
}
Output:

func (*ClustersClient) BeginDelete

func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)

BeginDelete - Delete a cluster in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "group1", "cloud1", "cluster1", 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 (*ClustersClient) BeginUpdate

func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, clusterUpdate ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error)

BeginUpdate - Update a cluster in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • clusterUpdate - The cluster properties to be updated
  • options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Update.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "group1", "cloud1", "cluster1", armavs.ClusterUpdate{
		Properties: &armavs.ClusterUpdateProperties{
			ClusterSize: to.Ptr[int32](4),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armavs.Cluster{
	// 	Name: to.Ptr("cluster1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1"),
	// 	Properties: &armavs.ClusterProperties{
	// 		ClusterSize: to.Ptr[int32](4),
	// 		Hosts: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost25.nyc1.kubernetes.center")},
	// 			ProvisioningState: to.Ptr(armavs.ClusterProvisioningStateSucceeded),
	// 		},
	// 		SKU: &armavs.SKU{
	// 			Name: to.Ptr("AV20"),
	// 		},
	// 	}
}
Output:

func (*ClustersClient) Get

func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)

Get - Get a cluster by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "group1", "cloud1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armavs.Cluster{
	// 	Name: to.Ptr("cluster1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1"),
	// 	Properties: &armavs.ClusterProperties{
	// 		ClusterSize: to.Ptr[int32](4),
	// 		Hosts: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost25.nyc1.kubernetes.center")},
	// 			ProvisioningState: to.Ptr(armavs.ClusterProvisioningStateSucceeded),
	// 		},
	// 		SKU: &armavs.SKU{
	// 			Name: to.Ptr("AV20"),
	// 		},
	// 	}
}
Output:

func (*ClustersClient) ListZones added in v1.1.0

func (client *ClustersClient) ListZones(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, options *ClustersClientListZonesOptions) (ClustersClientListZonesResponse, error)

ListZones - List hosts by zone in a cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - ClustersClientListZonesOptions contains the optional parameters for the ClustersClient.ListZones method.
Example (ClustersListZoneData)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().ListZones(ctx, "group1", "cloud1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterZoneList = armavs.ClusterZoneList{
	// 	Zones: []*armavs.ClusterZone{
	// 		{
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 				Zone: to.Ptr("2"),
	// 		}},
	// 	}
}
Output:

Example (ClustersListZoneDataStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones_Stretched.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().ListZones(ctx, "group1", "cloud1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterZoneList = armavs.ClusterZoneList{
	// 	Zones: []*armavs.ClusterZone{
	// 		{
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 				Zone: to.Ptr("2"),
	// 			},
	// 			{
	// 				Hosts: []*string{
	// 					to.Ptr("fakehost74.nyc2.kubernetes.center"),
	// 					to.Ptr("fakehost75.nyc2.kubernetes.center"),
	// 					to.Ptr("fakehost76.nyc2.kubernetes.center")},
	// 					Zone: to.Ptr("1"),
	// 			}},
	// 		}
}
Output:

func (*ClustersClient) NewListPager added in v0.4.0

func (client *ClustersClient) NewListPager(resourceGroupName string, privateCloudName string, options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]

NewListPager - List clusters in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterList = armavs.ClusterList{
		// 	Value: []*armavs.Cluster{
		// 		{
		// 			Name: to.Ptr("cluster1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1"),
		// 			Properties: &armavs.ClusterProperties{
		// 				ClusterSize: to.Ptr[int32](3),
		// 				Hosts: []*string{
		// 					to.Ptr("fakehost22.nyc1.kubernetes.center"),
		// 					to.Ptr("fakehost23.nyc1.kubernetes.center"),
		// 					to.Ptr("fakehost24.nyc1.kubernetes.center")},
		// 					ProvisioningState: to.Ptr(armavs.ClusterProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armavs.SKU{
		// 					Name: to.Ptr("AV20"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type ClustersClientBeginCreateOrUpdateOptions added in v0.2.0

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

ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.

type ClustersClientBeginDeleteOptions added in v0.2.0

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

ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.

type ClustersClientBeginUpdateOptions added in v0.2.0

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

ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.

type ClustersClientCreateOrUpdateResponse added in v0.2.0

type ClustersClientCreateOrUpdateResponse struct {
	// A cluster resource
	Cluster
}

ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate.

type ClustersClientDeleteResponse added in v0.2.0

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.

type ClustersClientGetOptions added in v0.2.0

type ClustersClientGetOptions struct {
}

ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.

type ClustersClientGetResponse added in v0.2.0

type ClustersClientGetResponse struct {
	// A cluster resource
	Cluster
}

ClustersClientGetResponse contains the response from method ClustersClient.Get.

type ClustersClientListOptions added in v0.2.0

type ClustersClientListOptions struct {
}

ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.

type ClustersClientListResponse added in v0.2.0

type ClustersClientListResponse struct {
	// A paged list of clusters
	ClusterList
}

ClustersClientListResponse contains the response from method ClustersClient.NewListPager.

type ClustersClientListZonesOptions added in v1.1.0

type ClustersClientListZonesOptions struct {
}

ClustersClientListZonesOptions contains the optional parameters for the ClustersClient.ListZones method.

type ClustersClientListZonesResponse added in v1.1.0

type ClustersClientListZonesResponse struct {
	// List of all zones and associated hosts for a cluster
	ClusterZoneList
}

ClustersClientListZonesResponse contains the response from method ClustersClient.ListZones.

type ClustersClientUpdateResponse added in v0.2.0

type ClustersClientUpdateResponse struct {
	// A cluster resource
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate.

type DNSServiceLogLevelEnum

type DNSServiceLogLevelEnum string

DNSServiceLogLevelEnum - DNS Service log level.

const (
	DNSServiceLogLevelEnumDEBUG   DNSServiceLogLevelEnum = "DEBUG"
	DNSServiceLogLevelEnumERROR   DNSServiceLogLevelEnum = "ERROR"
	DNSServiceLogLevelEnumFATAL   DNSServiceLogLevelEnum = "FATAL"
	DNSServiceLogLevelEnumINFO    DNSServiceLogLevelEnum = "INFO"
	DNSServiceLogLevelEnumWARNING DNSServiceLogLevelEnum = "WARNING"
)

func PossibleDNSServiceLogLevelEnumValues

func PossibleDNSServiceLogLevelEnumValues() []DNSServiceLogLevelEnum

PossibleDNSServiceLogLevelEnumValues returns the possible values for the DNSServiceLogLevelEnum const type.

type DNSServiceStatusEnum

type DNSServiceStatusEnum string

DNSServiceStatusEnum - DNS Service status.

const (
	DNSServiceStatusEnumFAILURE DNSServiceStatusEnum = "FAILURE"
	DNSServiceStatusEnumSUCCESS DNSServiceStatusEnum = "SUCCESS"
)

func PossibleDNSServiceStatusEnumValues

func PossibleDNSServiceStatusEnumValues() []DNSServiceStatusEnum

PossibleDNSServiceStatusEnumValues returns the possible values for the DNSServiceStatusEnum const type.

type Datastore

type Datastore struct {
	// The properties of a datastore resource
	Properties *DatastoreProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Datastore - A datastore resource

func (Datastore) MarshalJSON

func (d Datastore) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Datastore.

func (*Datastore) UnmarshalJSON

func (d *Datastore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Datastore.

type DatastoreList

type DatastoreList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*Datastore
}

DatastoreList - A paged list of datastores

func (DatastoreList) MarshalJSON

func (d DatastoreList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatastoreList.

func (*DatastoreList) UnmarshalJSON added in v1.1.0

func (d *DatastoreList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreList.

type DatastoreProperties

type DatastoreProperties struct {
	// An iSCSI volume
	DiskPoolVolume *DiskPoolVolume

	// An Azure NetApp Files volume
	NetAppVolume *NetAppVolume

	// READ-ONLY; The state of the datastore provisioning
	ProvisioningState *DatastoreProvisioningState

	// READ-ONLY; The operational status of the datastore
	Status *DatastoreStatus
}

DatastoreProperties - The properties of a datastore

func (DatastoreProperties) MarshalJSON added in v1.1.0

func (d DatastoreProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatastoreProperties.

func (*DatastoreProperties) UnmarshalJSON added in v1.1.0

func (d *DatastoreProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreProperties.

type DatastoreProvisioningState

type DatastoreProvisioningState string

DatastoreProvisioningState - The state of the datastore provisioning

const (
	DatastoreProvisioningStateCanceled  DatastoreProvisioningState = "Canceled"
	DatastoreProvisioningStateCancelled DatastoreProvisioningState = "Cancelled"
	DatastoreProvisioningStateCreating  DatastoreProvisioningState = "Creating"
	DatastoreProvisioningStateDeleting  DatastoreProvisioningState = "Deleting"
	DatastoreProvisioningStateFailed    DatastoreProvisioningState = "Failed"
	DatastoreProvisioningStatePending   DatastoreProvisioningState = "Pending"
	DatastoreProvisioningStateSucceeded DatastoreProvisioningState = "Succeeded"
	DatastoreProvisioningStateUpdating  DatastoreProvisioningState = "Updating"
)

func PossibleDatastoreProvisioningStateValues

func PossibleDatastoreProvisioningStateValues() []DatastoreProvisioningState

PossibleDatastoreProvisioningStateValues returns the possible values for the DatastoreProvisioningState const type.

type DatastoreStatus

type DatastoreStatus string

DatastoreStatus - The operational status of the datastore

const (
	DatastoreStatusAccessible        DatastoreStatus = "Accessible"
	DatastoreStatusAttached          DatastoreStatus = "Attached"
	DatastoreStatusDeadOrError       DatastoreStatus = "DeadOrError"
	DatastoreStatusDetached          DatastoreStatus = "Detached"
	DatastoreStatusInaccessible      DatastoreStatus = "Inaccessible"
	DatastoreStatusLostCommunication DatastoreStatus = "LostCommunication"
	DatastoreStatusUnknown           DatastoreStatus = "Unknown"
)

func PossibleDatastoreStatusValues

func PossibleDatastoreStatusValues() []DatastoreStatus

PossibleDatastoreStatusValues returns the possible values for the DatastoreStatus const type.

type DatastoresClient

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

DatastoresClient contains the methods for the Datastores group. Don't use this type directly, use NewDatastoresClient() instead.

func NewDatastoresClient

func NewDatastoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatastoresClient, error)

NewDatastoresClient creates a new instance of DatastoresClient 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 (*DatastoresClient) BeginCreateOrUpdate

func (client *DatastoresClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, datastoreName string, datastore Datastore, options *DatastoresClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatastoresClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a datastore in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • datastoreName - Name of the datastore in the private cloud cluster
  • datastore - A datastore in a private cloud cluster
  • options - DatastoresClientBeginCreateOrUpdateOptions contains the optional parameters for the DatastoresClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatastoresClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "cluster1", "datastore1", armavs.Datastore{
		Properties: &armavs.DatastoreProperties{
			NetAppVolume: &armavs.NetAppVolume{
				ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Datastore = armavs.Datastore{
	// 	Name: to.Ptr("datastore1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/datastores"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/datastores/datastore1"),
	// 	Properties: &armavs.DatastoreProperties{
	// 		NetAppVolume: &armavs.NetAppVolume{
	// 			ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armavs.DatastoreProvisioningStateSucceeded),
	// 		Status: to.Ptr(armavs.DatastoreStatusAccessible),
	// 	},
	// }
}
Output:

func (*DatastoresClient) BeginDelete

func (client *DatastoresClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, datastoreName string, options *DatastoresClientBeginDeleteOptions) (*runtime.Poller[DatastoresClientDeleteResponse], error)

BeginDelete - Delete a datastore in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • datastoreName - Name of the datastore in the private cloud cluster
  • options - DatastoresClientBeginDeleteOptions contains the optional parameters for the DatastoresClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatastoresClient().BeginDelete(ctx, "group1", "cloud1", "cluster1", "datastore1", 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 (*DatastoresClient) Get

func (client *DatastoresClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, datastoreName string, options *DatastoresClientGetOptions) (DatastoresClientGetResponse, error)

Get - Get a datastore in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • datastoreName - Name of the datastore in the private cloud cluster
  • options - DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatastoresClient().Get(ctx, "group1", "cloud1", "cluster1", "datastore1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Datastore = armavs.Datastore{
	// 	Name: to.Ptr("datastore1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/datastores"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/datastores/datastore1"),
	// 	Properties: &armavs.DatastoreProperties{
	// 		NetAppVolume: &armavs.NetAppVolume{
	// 			ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armavs.DatastoreProvisioningStateSucceeded),
	// 		Status: to.Ptr(armavs.DatastoreStatusAccessible),
	// 	},
	// }
}
Output:

func (*DatastoresClient) NewListPager added in v0.4.0

func (client *DatastoresClient) NewListPager(resourceGroupName string, privateCloudName string, clusterName string, options *DatastoresClientListOptions) *runtime.Pager[DatastoresClientListResponse]

NewListPager - List datastores in a private cloud cluster

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - DatastoresClientListOptions contains the optional parameters for the DatastoresClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatastoresClient().NewListPager("group1", "cloud1", "cluster1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DatastoreList = armavs.DatastoreList{
		// 	Value: []*armavs.Datastore{
		// 		{
		// 			Name: to.Ptr("datastore1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/datastores"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/datastores/datastore1"),
		// 			Properties: &armavs.DatastoreProperties{
		// 				NetAppVolume: &armavs.NetAppVolume{
		// 					ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armavs.DatastoreProvisioningStateSucceeded),
		// 				Status: to.Ptr(armavs.DatastoreStatusAccessible),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("datastore2"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/datastores"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/datastores/datastore2"),
		// 			Properties: &armavs.DatastoreProperties{
		// 				DiskPoolVolume: &armavs.DiskPoolVolume{
		// 					Path: to.Ptr("/vmfs/devices/disks/naa.6001405f75f6bdf7f6f49db8b4b21723"),
		// 					LunName: to.Ptr("lun0"),
		// 					MountOption: to.Ptr(armavs.MountOptionEnumMOUNT),
		// 					TargetID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.StoragePool/diskPools/DiskPool1/targets/Target1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armavs.DatastoreProvisioningStateSucceeded),
		// 				Status: to.Ptr(armavs.DatastoreStatusAccessible),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DatastoresClientBeginCreateOrUpdateOptions added in v0.2.0

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

DatastoresClientBeginCreateOrUpdateOptions contains the optional parameters for the DatastoresClient.BeginCreateOrUpdate method.

type DatastoresClientBeginDeleteOptions added in v0.2.0

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

DatastoresClientBeginDeleteOptions contains the optional parameters for the DatastoresClient.BeginDelete method.

type DatastoresClientCreateOrUpdateResponse added in v0.2.0

type DatastoresClientCreateOrUpdateResponse struct {
	// A datastore resource
	Datastore
}

DatastoresClientCreateOrUpdateResponse contains the response from method DatastoresClient.BeginCreateOrUpdate.

type DatastoresClientDeleteResponse added in v0.2.0

type DatastoresClientDeleteResponse struct {
}

DatastoresClientDeleteResponse contains the response from method DatastoresClient.BeginDelete.

type DatastoresClientGetOptions added in v0.2.0

type DatastoresClientGetOptions struct {
}

DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method.

type DatastoresClientGetResponse added in v0.2.0

type DatastoresClientGetResponse struct {
	// A datastore resource
	Datastore
}

DatastoresClientGetResponse contains the response from method DatastoresClient.Get.

type DatastoresClientListOptions added in v0.2.0

type DatastoresClientListOptions struct {
}

DatastoresClientListOptions contains the optional parameters for the DatastoresClient.NewListPager method.

type DatastoresClientListResponse added in v0.2.0

type DatastoresClientListResponse struct {
	// A paged list of datastores
	DatastoreList
}

DatastoresClientListResponse contains the response from method DatastoresClient.NewListPager.

type DhcpTypeEnum

type DhcpTypeEnum string

DhcpTypeEnum - Type of DHCP: SERVER or RELAY.

const (
	DhcpTypeEnumRELAY  DhcpTypeEnum = "RELAY"
	DhcpTypeEnumSERVER DhcpTypeEnum = "SERVER"
)

func PossibleDhcpTypeEnumValues

func PossibleDhcpTypeEnumValues() []DhcpTypeEnum

PossibleDhcpTypeEnumValues returns the possible values for the DhcpTypeEnum const type.

type DiskPoolVolume

type DiskPoolVolume struct {
	// REQUIRED; Name of the LUN to be used for datastore
	LunName *string

	// REQUIRED; Azure resource ID of the iSCSI target
	TargetID *string

	// Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
	MountOption *MountOptionEnum

	// READ-ONLY; Device path
	Path *string
}

DiskPoolVolume - An iSCSI volume from Microsoft.StoragePool provider

func (DiskPoolVolume) MarshalJSON added in v1.1.0

func (d DiskPoolVolume) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskPoolVolume.

func (*DiskPoolVolume) UnmarshalJSON added in v1.1.0

func (d *DiskPoolVolume) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiskPoolVolume.

type Encryption

type Encryption struct {
	// The key vault where the encryption key is stored
	KeyVaultProperties *EncryptionKeyVaultProperties

	// Status of customer managed encryption key
	Status *EncryptionState
}

Encryption - The properties of customer managed encryption key

func (Encryption) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Encryption.

func (*Encryption) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.

type EncryptionKeyStatus

type EncryptionKeyStatus string

EncryptionKeyStatus - The state of key provided

const (
	EncryptionKeyStatusAccessDenied EncryptionKeyStatus = "AccessDenied"
	EncryptionKeyStatusConnected    EncryptionKeyStatus = "Connected"
)

func PossibleEncryptionKeyStatusValues

func PossibleEncryptionKeyStatusValues() []EncryptionKeyStatus

PossibleEncryptionKeyStatusValues returns the possible values for the EncryptionKeyStatus const type.

type EncryptionKeyVaultProperties

type EncryptionKeyVaultProperties struct {
	// The name of the key.
	KeyName *string

	// The URL of the vault.
	KeyVaultURL *string

	// The version of the key.
	KeyVersion *string

	// READ-ONLY; The auto-detected version of the key if versionType is auto-detected.
	AutoDetectedKeyVersion *string

	// READ-ONLY; The state of key provided
	KeyState *EncryptionKeyStatus

	// READ-ONLY; Property of the key if user provided or auto detected
	VersionType *EncryptionVersionType
}

EncryptionKeyVaultProperties - An Encryption Key

func (EncryptionKeyVaultProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultProperties.

func (*EncryptionKeyVaultProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionKeyVaultProperties.

type EncryptionState

type EncryptionState string

EncryptionState - Status of customer managed encryption key

const (
	EncryptionStateDisabled EncryptionState = "Disabled"
	EncryptionStateEnabled  EncryptionState = "Enabled"
)

func PossibleEncryptionStateValues

func PossibleEncryptionStateValues() []EncryptionState

PossibleEncryptionStateValues returns the possible values for the EncryptionState const type.

type EncryptionVersionType

type EncryptionVersionType string

EncryptionVersionType - Property of the key if user provided or auto detected

const (
	EncryptionVersionTypeAutoDetected EncryptionVersionType = "AutoDetected"
	EncryptionVersionTypeFixed        EncryptionVersionType = "Fixed"
)

func PossibleEncryptionVersionTypeValues

func PossibleEncryptionVersionTypeValues() []EncryptionVersionType

PossibleEncryptionVersionTypeValues returns the possible values for the EncryptionVersionType const type.

type Endpoints

type Endpoints struct {
	// READ-ONLY; Endpoint for the HCX Cloud Manager
	HcxCloudManager *string

	// READ-ONLY; Endpoint for the NSX-T Data Center manager
	NsxtManager *string

	// READ-ONLY; Endpoint for Virtual Center Server Appliance
	Vcsa *string
}

Endpoints - Endpoint addresses

func (Endpoints) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Endpoints.

func (*Endpoints) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Endpoints.

type ExpressRouteAuthorization

type ExpressRouteAuthorization struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The properties of an ExpressRoute Circuit Authorization resource
	Properties *ExpressRouteAuthorizationProperties

	// READ-ONLY; Resource type.
	Type *string
}

ExpressRouteAuthorization - ExpressRoute Circuit Authorization

func (ExpressRouteAuthorization) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExpressRouteAuthorization.

func (*ExpressRouteAuthorization) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteAuthorization.

type ExpressRouteAuthorizationList

type ExpressRouteAuthorizationList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*ExpressRouteAuthorization
}

ExpressRouteAuthorizationList - A paged list of ExpressRoute Circuit Authorizations

func (ExpressRouteAuthorizationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExpressRouteAuthorizationList.

func (*ExpressRouteAuthorizationList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteAuthorizationList.

type ExpressRouteAuthorizationProperties

type ExpressRouteAuthorizationProperties struct {
	// The ID of the ExpressRoute Circuit
	ExpressRouteID *string

	// READ-ONLY; The ID of the ExpressRoute Circuit Authorization
	ExpressRouteAuthorizationID *string

	// READ-ONLY; The key of the ExpressRoute Circuit Authorization
	ExpressRouteAuthorizationKey *string

	// READ-ONLY; The state of the ExpressRoute Circuit Authorization provisioning
	ProvisioningState *ExpressRouteAuthorizationProvisioningState
}

ExpressRouteAuthorizationProperties - The properties of an ExpressRoute Circuit Authorization resource

func (ExpressRouteAuthorizationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ExpressRouteAuthorizationProperties.

func (*ExpressRouteAuthorizationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteAuthorizationProperties.

type ExpressRouteAuthorizationProvisioningState

type ExpressRouteAuthorizationProvisioningState string

ExpressRouteAuthorizationProvisioningState - The state of the ExpressRoute Circuit Authorization provisioning

const (
	ExpressRouteAuthorizationProvisioningStateCanceled  ExpressRouteAuthorizationProvisioningState = "Canceled"
	ExpressRouteAuthorizationProvisioningStateFailed    ExpressRouteAuthorizationProvisioningState = "Failed"
	ExpressRouteAuthorizationProvisioningStateSucceeded ExpressRouteAuthorizationProvisioningState = "Succeeded"
	ExpressRouteAuthorizationProvisioningStateUpdating  ExpressRouteAuthorizationProvisioningState = "Updating"
)

func PossibleExpressRouteAuthorizationProvisioningStateValues

func PossibleExpressRouteAuthorizationProvisioningStateValues() []ExpressRouteAuthorizationProvisioningState

PossibleExpressRouteAuthorizationProvisioningStateValues returns the possible values for the ExpressRouteAuthorizationProvisioningState const type.

type GlobalReachConnection

type GlobalReachConnection struct {
	// The properties of a global reach connection resource
	Properties *GlobalReachConnectionProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

GlobalReachConnection - A global reach connection resource

func (GlobalReachConnection) MarshalJSON

func (g GlobalReachConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GlobalReachConnection.

func (*GlobalReachConnection) UnmarshalJSON

func (g *GlobalReachConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalReachConnection.

type GlobalReachConnectionList

type GlobalReachConnectionList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*GlobalReachConnection
}

GlobalReachConnectionList - A paged list of global reach connections

func (GlobalReachConnectionList) MarshalJSON

func (g GlobalReachConnectionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GlobalReachConnectionList.

func (*GlobalReachConnectionList) UnmarshalJSON added in v1.1.0

func (g *GlobalReachConnectionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalReachConnectionList.

type GlobalReachConnectionProperties

type GlobalReachConnectionProperties struct {
	// Authorization key from the peer express route used for the global reach connection
	AuthorizationKey *string

	// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection
	ExpressRouteID *string

	// Identifier of the ExpressRoute Circuit to peer with in the global reach connection
	PeerExpressRouteCircuit *string

	// READ-ONLY; The network used for global reach carved out from the original network block provided for the private cloud
	AddressPrefix *string

	// READ-ONLY; The connection status of the global reach connection
	CircuitConnectionStatus *GlobalReachConnectionStatus

	// READ-ONLY; The state of the ExpressRoute Circuit Authorization provisioning
	ProvisioningState *GlobalReachConnectionProvisioningState
}

GlobalReachConnectionProperties - The properties of a global reach connection

func (GlobalReachConnectionProperties) MarshalJSON added in v1.1.0

func (g GlobalReachConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GlobalReachConnectionProperties.

func (*GlobalReachConnectionProperties) UnmarshalJSON added in v1.1.0

func (g *GlobalReachConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalReachConnectionProperties.

type GlobalReachConnectionProvisioningState

type GlobalReachConnectionProvisioningState string

GlobalReachConnectionProvisioningState - The state of the ExpressRoute Circuit Authorization provisioning

const (
	GlobalReachConnectionProvisioningStateCanceled  GlobalReachConnectionProvisioningState = "Canceled"
	GlobalReachConnectionProvisioningStateFailed    GlobalReachConnectionProvisioningState = "Failed"
	GlobalReachConnectionProvisioningStateSucceeded GlobalReachConnectionProvisioningState = "Succeeded"
	GlobalReachConnectionProvisioningStateUpdating  GlobalReachConnectionProvisioningState = "Updating"
)

func PossibleGlobalReachConnectionProvisioningStateValues

func PossibleGlobalReachConnectionProvisioningStateValues() []GlobalReachConnectionProvisioningState

PossibleGlobalReachConnectionProvisioningStateValues returns the possible values for the GlobalReachConnectionProvisioningState const type.

type GlobalReachConnectionStatus

type GlobalReachConnectionStatus string

GlobalReachConnectionStatus - The connection status of the global reach connection

const (
	GlobalReachConnectionStatusConnected    GlobalReachConnectionStatus = "Connected"
	GlobalReachConnectionStatusConnecting   GlobalReachConnectionStatus = "Connecting"
	GlobalReachConnectionStatusDisconnected GlobalReachConnectionStatus = "Disconnected"
)

func PossibleGlobalReachConnectionStatusValues

func PossibleGlobalReachConnectionStatusValues() []GlobalReachConnectionStatus

PossibleGlobalReachConnectionStatusValues returns the possible values for the GlobalReachConnectionStatus const type.

type GlobalReachConnectionsClient

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

GlobalReachConnectionsClient contains the methods for the GlobalReachConnections group. Don't use this type directly, use NewGlobalReachConnectionsClient() instead.

func NewGlobalReachConnectionsClient

func NewGlobalReachConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalReachConnectionsClient, error)

NewGlobalReachConnectionsClient creates a new instance of GlobalReachConnectionsClient 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 (*GlobalReachConnectionsClient) BeginCreateOrUpdate

func (client *GlobalReachConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, globalReachConnectionName string, globalReachConnection GlobalReachConnection, options *GlobalReachConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GlobalReachConnectionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a global reach connection in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • globalReachConnectionName - Name of the global reach connection in the private cloud
  • globalReachConnection - A global reach connection in the private cloud
  • options - GlobalReachConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalReachConnectionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGlobalReachConnectionsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "connection1", armavs.GlobalReachConnection{
		Properties: &armavs.GlobalReachConnectionProperties{
			AuthorizationKey:        to.Ptr("01010101-0101-0101-0101-010101010101"),
			PeerExpressRouteCircuit: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GlobalReachConnection = armavs.GlobalReachConnection{
	// 	Name: to.Ptr("connection1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/globalReachConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1"),
	// 	Properties: &armavs.GlobalReachConnectionProperties{
	// 		AddressPrefix: to.Ptr("10.2.3.16/29"),
	// 		AuthorizationKey: to.Ptr("01010101-0101-0101-0101-010101010101"),
	// 		CircuitConnectionStatus: to.Ptr(armavs.GlobalReachConnectionStatusConnected),
	// 		ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 		PeerExpressRouteCircuit: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
	// 		ProvisioningState: to.Ptr(armavs.GlobalReachConnectionProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*GlobalReachConnectionsClient) BeginDelete

func (client *GlobalReachConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, globalReachConnectionName string, options *GlobalReachConnectionsClientBeginDeleteOptions) (*runtime.Poller[GlobalReachConnectionsClientDeleteResponse], error)

BeginDelete - Delete a global reach connection in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • globalReachConnectionName - Name of the global reach connection in the private cloud
  • options - GlobalReachConnectionsClientBeginDeleteOptions contains the optional parameters for the GlobalReachConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGlobalReachConnectionsClient().BeginDelete(ctx, "group1", "cloud1", "connection1", 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 (*GlobalReachConnectionsClient) Get

func (client *GlobalReachConnectionsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, globalReachConnectionName string, options *GlobalReachConnectionsClientGetOptions) (GlobalReachConnectionsClientGetResponse, error)

Get - Get a global reach connection by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • globalReachConnectionName - Name of the global reach connection in the private cloud
  • options - GlobalReachConnectionsClientGetOptions contains the optional parameters for the GlobalReachConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGlobalReachConnectionsClient().Get(ctx, "group1", "cloud1", "connection1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GlobalReachConnection = armavs.GlobalReachConnection{
	// 	Name: to.Ptr("connection1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/globalReachConnections"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1"),
	// 	Properties: &armavs.GlobalReachConnectionProperties{
	// 		AddressPrefix: to.Ptr("10.2.3.16/29"),
	// 		AuthorizationKey: to.Ptr("01010101-0101-0101-0101-010101010101"),
	// 		CircuitConnectionStatus: to.Ptr(armavs.GlobalReachConnectionStatusConnected),
	// 		ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 		PeerExpressRouteCircuit: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
	// 		ProvisioningState: to.Ptr(armavs.GlobalReachConnectionProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*GlobalReachConnectionsClient) NewListPager added in v0.4.0

NewListPager - List global reach connections in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - GlobalReachConnectionsClientListOptions contains the optional parameters for the GlobalReachConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGlobalReachConnectionsClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GlobalReachConnectionList = armavs.GlobalReachConnectionList{
		// 	Value: []*armavs.GlobalReachConnection{
		// 		{
		// 			Name: to.Ptr("connection1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/globalReachConnections"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/globalReachConnections/connection1"),
		// 			Properties: &armavs.GlobalReachConnectionProperties{
		// 				AddressPrefix: to.Ptr("10.2.3.16/29"),
		// 				AuthorizationKey: to.Ptr("01010101-0101-0101-0101-010101010101"),
		// 				CircuitConnectionStatus: to.Ptr(armavs.GlobalReachConnectionStatusConnected),
		// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 				PeerExpressRouteCircuit: to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
		// 				ProvisioningState: to.Ptr(armavs.GlobalReachConnectionProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GlobalReachConnectionsClientBeginCreateOrUpdateOptions added in v0.2.0

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

GlobalReachConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalReachConnectionsClient.BeginCreateOrUpdate method.

type GlobalReachConnectionsClientBeginDeleteOptions added in v0.2.0

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

GlobalReachConnectionsClientBeginDeleteOptions contains the optional parameters for the GlobalReachConnectionsClient.BeginDelete method.

type GlobalReachConnectionsClientCreateOrUpdateResponse added in v0.2.0

type GlobalReachConnectionsClientCreateOrUpdateResponse struct {
	// A global reach connection resource
	GlobalReachConnection
}

GlobalReachConnectionsClientCreateOrUpdateResponse contains the response from method GlobalReachConnectionsClient.BeginCreateOrUpdate.

type GlobalReachConnectionsClientDeleteResponse added in v0.2.0

type GlobalReachConnectionsClientDeleteResponse struct {
}

GlobalReachConnectionsClientDeleteResponse contains the response from method GlobalReachConnectionsClient.BeginDelete.

type GlobalReachConnectionsClientGetOptions added in v0.2.0

type GlobalReachConnectionsClientGetOptions struct {
}

GlobalReachConnectionsClientGetOptions contains the optional parameters for the GlobalReachConnectionsClient.Get method.

type GlobalReachConnectionsClientGetResponse added in v0.2.0

type GlobalReachConnectionsClientGetResponse struct {
	// A global reach connection resource
	GlobalReachConnection
}

GlobalReachConnectionsClientGetResponse contains the response from method GlobalReachConnectionsClient.Get.

type GlobalReachConnectionsClientListOptions added in v0.2.0

type GlobalReachConnectionsClientListOptions struct {
}

GlobalReachConnectionsClientListOptions contains the optional parameters for the GlobalReachConnectionsClient.NewListPager method.

type GlobalReachConnectionsClientListResponse added in v0.2.0

type GlobalReachConnectionsClientListResponse struct {
	// A paged list of global reach connections
	GlobalReachConnectionList
}

GlobalReachConnectionsClientListResponse contains the response from method GlobalReachConnectionsClient.NewListPager.

type HcxEnterpriseSite

type HcxEnterpriseSite struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The properties of an HCX Enterprise Site resource
	Properties *HcxEnterpriseSiteProperties

	// READ-ONLY; Resource type.
	Type *string
}

HcxEnterpriseSite - An HCX Enterprise Site resource

func (HcxEnterpriseSite) MarshalJSON

func (h HcxEnterpriseSite) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HcxEnterpriseSite.

func (*HcxEnterpriseSite) UnmarshalJSON

func (h *HcxEnterpriseSite) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HcxEnterpriseSite.

type HcxEnterpriseSiteList

type HcxEnterpriseSiteList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on a page
	Value []*HcxEnterpriseSite
}

HcxEnterpriseSiteList - A paged list of HCX Enterprise Sites

func (HcxEnterpriseSiteList) MarshalJSON

func (h HcxEnterpriseSiteList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HcxEnterpriseSiteList.

func (*HcxEnterpriseSiteList) UnmarshalJSON added in v1.1.0

func (h *HcxEnterpriseSiteList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HcxEnterpriseSiteList.

type HcxEnterpriseSiteProperties

type HcxEnterpriseSiteProperties struct {
	// READ-ONLY; The activation key
	ActivationKey *string

	// READ-ONLY; The status of the HCX Enterprise Site
	Status *HcxEnterpriseSiteStatus
}

HcxEnterpriseSiteProperties - The properties of an HCX Enterprise Site

func (HcxEnterpriseSiteProperties) MarshalJSON added in v1.1.0

func (h HcxEnterpriseSiteProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HcxEnterpriseSiteProperties.

func (*HcxEnterpriseSiteProperties) UnmarshalJSON added in v1.1.0

func (h *HcxEnterpriseSiteProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HcxEnterpriseSiteProperties.

type HcxEnterpriseSiteStatus

type HcxEnterpriseSiteStatus string

HcxEnterpriseSiteStatus - The status of the HCX Enterprise Site

const (
	HcxEnterpriseSiteStatusAvailable   HcxEnterpriseSiteStatus = "Available"
	HcxEnterpriseSiteStatusConsumed    HcxEnterpriseSiteStatus = "Consumed"
	HcxEnterpriseSiteStatusDeactivated HcxEnterpriseSiteStatus = "Deactivated"
	HcxEnterpriseSiteStatusDeleted     HcxEnterpriseSiteStatus = "Deleted"
)

func PossibleHcxEnterpriseSiteStatusValues

func PossibleHcxEnterpriseSiteStatusValues() []HcxEnterpriseSiteStatus

PossibleHcxEnterpriseSiteStatusValues returns the possible values for the HcxEnterpriseSiteStatus const type.

type HcxEnterpriseSitesClient

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

HcxEnterpriseSitesClient contains the methods for the HcxEnterpriseSites group. Don't use this type directly, use NewHcxEnterpriseSitesClient() instead.

func NewHcxEnterpriseSitesClient

func NewHcxEnterpriseSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HcxEnterpriseSitesClient, error)

NewHcxEnterpriseSitesClient creates a new instance of HcxEnterpriseSitesClient 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 (*HcxEnterpriseSitesClient) CreateOrUpdate

func (client *HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite HcxEnterpriseSite, options *HcxEnterpriseSitesClientCreateOrUpdateOptions) (HcxEnterpriseSitesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update an activation key for on-premises HCX site If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • hcxEnterpriseSiteName - Name of the HCX Enterprise Site in the private cloud
  • hcxEnterpriseSite - The HCX Enterprise Site
  • options - HcxEnterpriseSitesClientCreateOrUpdateOptions contains the optional parameters for the HcxEnterpriseSitesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHcxEnterpriseSitesClient().CreateOrUpdate(ctx, "group1", "cloud1", "site1", armavs.HcxEnterpriseSite{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.HcxEnterpriseSite = armavs.HcxEnterpriseSite{
	// 	Name: to.Ptr("site1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/site1"),
	// 	Properties: &armavs.HcxEnterpriseSiteProperties{
	// 		ActivationKey: to.Ptr("0276EF1A9A1749A5A362BF73EA9F8D0D"),
	// 		Status: to.Ptr(armavs.HcxEnterpriseSiteStatusAvailable),
	// 	},
	// }
}
Output:

func (*HcxEnterpriseSitesClient) Delete

func (client *HcxEnterpriseSitesClient) Delete(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, options *HcxEnterpriseSitesClientDeleteOptions) (HcxEnterpriseSitesClientDeleteResponse, error)

Delete - Delete HCX on-premises key in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • hcxEnterpriseSiteName - Name of the HCX Enterprise Site in the private cloud
  • options - HcxEnterpriseSitesClientDeleteOptions contains the optional parameters for the HcxEnterpriseSitesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewHcxEnterpriseSitesClient().Delete(ctx, "group1", "cloud1", "site1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*HcxEnterpriseSitesClient) Get

func (client *HcxEnterpriseSitesClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, options *HcxEnterpriseSitesClientGetOptions) (HcxEnterpriseSitesClientGetResponse, error)

Get - Get an HCX on-premises key by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • hcxEnterpriseSiteName - Name of the HCX Enterprise Site in the private cloud
  • options - HcxEnterpriseSitesClientGetOptions contains the optional parameters for the HcxEnterpriseSitesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHcxEnterpriseSitesClient().Get(ctx, "group1", "cloud1", "site1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.HcxEnterpriseSite = armavs.HcxEnterpriseSite{
	// 	Name: to.Ptr("site1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/site1"),
	// 	Properties: &armavs.HcxEnterpriseSiteProperties{
	// 		ActivationKey: to.Ptr("0276EF1A9A1749A5A362BF73EA9F8D0D"),
	// 		Status: to.Ptr(armavs.HcxEnterpriseSiteStatusAvailable),
	// 	},
	// }
}
Output:

func (*HcxEnterpriseSitesClient) NewListPager added in v0.4.0

func (client *HcxEnterpriseSitesClient) NewListPager(resourceGroupName string, privateCloudName string, options *HcxEnterpriseSitesClientListOptions) *runtime.Pager[HcxEnterpriseSitesClientListResponse]

NewListPager - List HCX on-premises key in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - HcxEnterpriseSitesClientListOptions contains the optional parameters for the HcxEnterpriseSitesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHcxEnterpriseSitesClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.HcxEnterpriseSiteList = armavs.HcxEnterpriseSiteList{
		// 	Value: []*armavs.HcxEnterpriseSite{
		// 		{
		// 			Name: to.Ptr("site1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/hcxEnterpriseSites/site1"),
		// 			Properties: &armavs.HcxEnterpriseSiteProperties{
		// 				ActivationKey: to.Ptr("0276EF1A9A1749A5A362BF73EA9F8D0D"),
		// 				Status: to.Ptr(armavs.HcxEnterpriseSiteStatusAvailable),
		// 			},
		// 	}},
		// }
	}
}
Output:

type HcxEnterpriseSitesClientCreateOrUpdateOptions added in v0.2.0

type HcxEnterpriseSitesClientCreateOrUpdateOptions struct {
}

HcxEnterpriseSitesClientCreateOrUpdateOptions contains the optional parameters for the HcxEnterpriseSitesClient.CreateOrUpdate method.

type HcxEnterpriseSitesClientCreateOrUpdateResponse added in v0.2.0

type HcxEnterpriseSitesClientCreateOrUpdateResponse struct {
	// An HCX Enterprise Site resource
	HcxEnterpriseSite
}

HcxEnterpriseSitesClientCreateOrUpdateResponse contains the response from method HcxEnterpriseSitesClient.CreateOrUpdate.

type HcxEnterpriseSitesClientDeleteOptions added in v0.2.0

type HcxEnterpriseSitesClientDeleteOptions struct {
}

HcxEnterpriseSitesClientDeleteOptions contains the optional parameters for the HcxEnterpriseSitesClient.Delete method.

type HcxEnterpriseSitesClientDeleteResponse added in v0.2.0

type HcxEnterpriseSitesClientDeleteResponse struct {
}

HcxEnterpriseSitesClientDeleteResponse contains the response from method HcxEnterpriseSitesClient.Delete.

type HcxEnterpriseSitesClientGetOptions added in v0.2.0

type HcxEnterpriseSitesClientGetOptions struct {
}

HcxEnterpriseSitesClientGetOptions contains the optional parameters for the HcxEnterpriseSitesClient.Get method.

type HcxEnterpriseSitesClientGetResponse added in v0.2.0

type HcxEnterpriseSitesClientGetResponse struct {
	// An HCX Enterprise Site resource
	HcxEnterpriseSite
}

HcxEnterpriseSitesClientGetResponse contains the response from method HcxEnterpriseSitesClient.Get.

type HcxEnterpriseSitesClientListOptions added in v0.2.0

type HcxEnterpriseSitesClientListOptions struct {
}

HcxEnterpriseSitesClientListOptions contains the optional parameters for the HcxEnterpriseSitesClient.NewListPager method.

type HcxEnterpriseSitesClientListResponse added in v0.2.0

type HcxEnterpriseSitesClientListResponse struct {
	// A paged list of HCX Enterprise Sites
	HcxEnterpriseSiteList
}

HcxEnterpriseSitesClientListResponse contains the response from method HcxEnterpriseSitesClient.NewListPager.

type IdentitySource

type IdentitySource struct {
	// The domain's NetBIOS name
	Alias *string

	// The base distinguished name for groups
	BaseGroupDN *string

	// The base distinguished name for users
	BaseUserDN *string

	// The domain's dns name
	Domain *string

	// The name of the identity source
	Name *string

	// The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups.
	Password *string

	// Primary server URL
	PrimaryServer *string

	// Protect LDAP communication using SSL certificate (LDAPS)
	SSL *SSLEnum

	// Secondary server URL
	SecondaryServer *string

	// The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group
	Username *string
}

IdentitySource - vCenter Single Sign On Identity Source

func (IdentitySource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type IdentitySource.

func (*IdentitySource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentitySource.

type InternetEnum

type InternetEnum string

InternetEnum - Connectivity to internet is enabled or disabled

const (
	InternetEnumDisabled InternetEnum = "Disabled"
	InternetEnumEnabled  InternetEnum = "Enabled"
)

func PossibleInternetEnumValues

func PossibleInternetEnumValues() []InternetEnum

PossibleInternetEnumValues returns the possible values for the InternetEnum const type.

type LocationsClient

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

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient 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 (*LocationsClient) CheckQuotaAvailability

CheckQuotaAvailability - Return quota for subscription by region If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • location - Azure region
  • options - LocationsClientCheckQuotaAvailabilityOptions contains the optional parameters for the LocationsClient.CheckQuotaAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckQuotaAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().CheckQuotaAvailability(ctx, "eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Quota = armavs.Quota{
	// 	HostsRemaining: map[string]*int32{
	// 		"AV20": to.Ptr[int32](0),
	// 		"AV36": to.Ptr[int32](999),
	// 	},
	// 	QuotaEnabled: to.Ptr(armavs.QuotaEnabledEnabled),
	// }
}
Output:

func (*LocationsClient) CheckTrialAvailability

CheckTrialAvailability - Return trial status for subscription by region If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • location - Azure region
  • options - LocationsClientCheckTrialAvailabilityOptions contains the optional parameters for the LocationsClient.CheckTrialAvailability method.
Example (LocationsCheckTrialAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().CheckTrialAvailability(ctx, "eastus", &armavs.LocationsClientCheckTrialAvailabilityOptions{SKU: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Trial = armavs.Trial{
	// 	AvailableHosts: to.Ptr[int32](4),
	// 	Status: to.Ptr(armavs.TrialStatusTrialAvailable),
	// }
}
Output:

Example (LocationsCheckTrialAvailabilityWithSku)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailabilityWithSku.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().CheckTrialAvailability(ctx, "eastus", &armavs.LocationsClientCheckTrialAvailabilityOptions{SKU: &armavs.SKU{
		Name: to.Ptr("avs52t"),
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Trial = armavs.Trial{
	// 	AvailableHosts: to.Ptr[int32](4),
	// 	Status: to.Ptr(armavs.TrialStatusTrialAvailable),
	// }
}
Output:

type LocationsClientCheckQuotaAvailabilityOptions added in v0.2.0

type LocationsClientCheckQuotaAvailabilityOptions struct {
}

LocationsClientCheckQuotaAvailabilityOptions contains the optional parameters for the LocationsClient.CheckQuotaAvailability method.

type LocationsClientCheckQuotaAvailabilityResponse added in v0.2.0

type LocationsClientCheckQuotaAvailabilityResponse struct {
	// Subscription quotas
	Quota
}

LocationsClientCheckQuotaAvailabilityResponse contains the response from method LocationsClient.CheckQuotaAvailability.

type LocationsClientCheckTrialAvailabilityOptions added in v0.2.0

type LocationsClientCheckTrialAvailabilityOptions struct {
	// The sku to check for trial availability
	SKU *SKU
}

LocationsClientCheckTrialAvailabilityOptions contains the optional parameters for the LocationsClient.CheckTrialAvailability method.

type LocationsClientCheckTrialAvailabilityResponse added in v0.2.0

type LocationsClientCheckTrialAvailabilityResponse struct {
	// Subscription trial availability
	Trial
}

LocationsClientCheckTrialAvailabilityResponse contains the response from method LocationsClient.CheckTrialAvailability.

type LogSpecification

type LogSpecification struct {
	// Blob duration of the log
	BlobDuration *string

	// Localized friendly display name of the log
	DisplayName *string

	// Name of the log
	Name *string
}

LogSpecification - Specifications of the Log for Azure Monitoring

func (LogSpecification) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type ManagementCluster

type ManagementCluster struct {
	// The cluster size
	ClusterSize *int32

	// The hosts
	Hosts []*string

	// READ-ONLY; The identity
	ClusterID *int32

	// READ-ONLY; The state of the cluster provisioning
	ProvisioningState *ClusterProvisioningState
}

ManagementCluster - The properties of a management cluster

func (ManagementCluster) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagementCluster.

func (*ManagementCluster) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagementCluster.

type MetricDimension

type MetricDimension struct {
	// Localized friendly display name of the dimension
	DisplayName *string

	// Name of the dimension as it appears in MDM
	InternalName *string

	// Name of the dimension
	Name *string

	// A boolean flag indicating whether this dimension should be included for the shoebox export scenario
	ToBeExportedForShoebox *bool
}

MetricDimension - Specifications of the Dimension of metrics

func (MetricDimension) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MetricDimension.

func (*MetricDimension) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension.

type MetricSpecification

type MetricSpecification struct {
	// Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
	AggregationType *string

	// Name of the metric category that the metric belongs to. A metric can only belong to a single category.
	Category *string

	// Dimensions of the metric
	Dimensions []*MetricDimension

	// Localized friendly description of the metric
	DisplayDescription *string

	// Localized friendly display name of the metric
	DisplayName *string

	// Whether or not the service is using regional MDM accounts.
	EnableRegionalMdmAccount *string

	// Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published.
	FillGapWithZero *bool

	// Name of the metric
	Name *string

	// The name of the MDM account.
	SourceMdmAccount *string

	// The name of the MDM namespace.
	SourceMdmNamespace *string

	// Supported aggregation types
	SupportedAggregationTypes []*string

	// Supported time grain types
	SupportedTimeGrainTypes []*string

	// Unit that makes sense for the metric
	Unit *string
}

MetricSpecification - Specifications of the Metrics for Azure Monitoring

func (MetricSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type MountOptionEnum

type MountOptionEnum string

MountOptionEnum - Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN

const (
	MountOptionEnumATTACH MountOptionEnum = "ATTACH"
	MountOptionEnumMOUNT  MountOptionEnum = "MOUNT"
)

func PossibleMountOptionEnumValues

func PossibleMountOptionEnumValues() []MountOptionEnum

PossibleMountOptionEnumValues returns the possible values for the MountOptionEnum const type.

type NetAppVolume

type NetAppVolume struct {
	// REQUIRED; Azure resource ID of the NetApp volume
	ID *string
}

NetAppVolume - An Azure NetApp Files volume from Microsoft.NetApp provider

func (NetAppVolume) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type NetAppVolume.

func (*NetAppVolume) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetAppVolume.

type NsxPublicIPQuotaRaisedEnum added in v1.1.0

type NsxPublicIPQuotaRaisedEnum string

NsxPublicIPQuotaRaisedEnum - Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024

const (
	NsxPublicIPQuotaRaisedEnumDisabled NsxPublicIPQuotaRaisedEnum = "Disabled"
	NsxPublicIPQuotaRaisedEnumEnabled  NsxPublicIPQuotaRaisedEnum = "Enabled"
)

func PossibleNsxPublicIPQuotaRaisedEnumValues added in v1.1.0

func PossibleNsxPublicIPQuotaRaisedEnumValues() []NsxPublicIPQuotaRaisedEnum

PossibleNsxPublicIPQuotaRaisedEnumValues returns the possible values for the NsxPublicIPQuotaRaisedEnum const type.

type Operation

type Operation struct {
	// Gets or sets a value indicating whether the operation is a data action or not
	IsDataAction *bool

	// Origin of the operation
	Origin *string

	// Properties of the operation
	Properties *OperationProperties

	// READ-ONLY; Contains the localized display information for this operation
	Display *OperationDisplay

	// READ-ONLY; Name of the operation being performed on this object
	Name *string
}

Operation - A REST API operation

func (Operation) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Localized friendly description for the operation
	Description *string

	// READ-ONLY; Localized friendly name for the operation
	Operation *string

	// READ-ONLY; Localized friendly form of the resource provider name
	Provider *string

	// READ-ONLY; Localized friendly form of the resource type related to this operation
	Resource *string
}

OperationDisplay - Contains the localized display information for this operation

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; List of operations
	Value []*Operation
}

OperationList - Pageable list of operations

func (OperationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationProperties

type OperationProperties struct {
	// Service specifications of the operation
	ServiceSpecification *ServiceSpecification
}

OperationProperties - Extra Operation properties

func (OperationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

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 added in v0.4.0

NewListPager - Lists all of the available operations

Generated from API version 2023-03-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armavs.OperationList{
		// 	Value: []*armavs.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/operations/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Lists operations available on Microsoft.AVS resource provider."),
		// 				Operation: to.Ptr("List available Microsoft.AVS operations"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("operations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/register/action"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Register Subscription for Microsoft.AVS resource provider."),
		// 				Operation: to.Ptr("Register Subscription for Microsoft.AVS"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr(""),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/unregister/action"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Unregister Subscription for Microsoft.AVS resource provider."),
		// 				Operation: to.Ptr("Unregister Subscription for Microsoft.AVS"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr(""),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/checkNameAvailability/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Checks if the privateCloud Name is available"),
		// 				Operation: to.Ptr("Check Name Availability"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("checkNameAvailability"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/locations/checkNameAvailability/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Checks if the privateCloud Name is available"),
		// 				Operation: to.Ptr("Check Name Availability"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("locations/checkNameAvailability"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/locations/checkQuotaAvailability/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Checks if quota is available for the subscription"),
		// 				Operation: to.Ptr("Check Quota Availability"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("locations/checkQuotaAvailability"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/locations/checkTrialAvailability/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Checks if trial is available for the subscription"),
		// 				Operation: to.Ptr("Check Trial Availability"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("locations/checkTrialAvailability"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/register/action"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Registers the Microsoft Microsoft.AVS resource provider and enables creation of Private Clouds."),
		// 				Operation: to.Ptr("Register Microsoft.AVS resource provider."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/write"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Creates or updates a PrivateCloud resource."),
		// 				Operation: to.Ptr("Create or update a PrivateCloud."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the settings for the specified PrivateCloud."),
		// 				Operation: to.Ptr("Read PrivateCloud settings"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/delete"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Delete a specific PrivateCloud."),
		// 				Operation: to.Ptr("Delete a PrivateCloud."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/operationstatuses/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Reads privateClouds operationstatuses."),
		// 				Operation: to.Ptr("Read privateClouds operationstatuses"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/operationstatuses"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/clusters/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the cluster settings for a PrivateCloud cluster."),
		// 				Operation: to.Ptr("Read Cluster settings."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/clusters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/clusters/write"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Create or update a PrivateCloud cluster resource."),
		// 				Operation: to.Ptr("Create or update a PrivateCloud cluster."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/clusters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/clusters/delete"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Delete a specific PrivateCloud cluster."),
		// 				Operation: to.Ptr("Delete a PriveCloud cluster."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/clusters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/clusters/operationstatuses/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Reads privateClouds/clusters operationstatuses."),
		// 				Operation: to.Ptr("Read privateClouds/clusters operationstatuses"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/clusters/operationstatuses"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateclouds/clusters/operationresults/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Reads privateClouds/clusters operationresults."),
		// 				Operation: to.Ptr("Read privateClouds/clusters operationresults"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateclouds/clusters/operationresults"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/operationresults/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Reads privateClouds operationresults."),
		// 				Operation: to.Ptr("Read privateClouds operationresults"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/operationresults"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/authorizations/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the authorization settings for a PrivateCloud cluster."),
		// 				Operation: to.Ptr("Read Authorization settings."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/authorizations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/authorizations/write"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Create or update a PrivateCloud authorization resource."),
		// 				Operation: to.Ptr("Create or update a PrivateCloud authorization."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/authorizations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/authorizations/delete"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Delete a specific PrivateCloud authorization."),
		// 				Operation: to.Ptr("Delete a PriveCloud authorization."),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/authorizations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/listAdminCredentials/action"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Lists the AdminCredentials for privateClouds."),
		// 				Operation: to.Ptr("List privateClouds AdminCredentials"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the hcxEnterpriseSites for a PrivateCloud."),
		// 				Operation: to.Ptr("Read hcxEnterpriseSites"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hcxEnterpriseSites"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites/write"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Create or update a hcxEnterpriseSites."),
		// 				Operation: to.Ptr("Create or update a hcxEnterpriseSites"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hcxEnterpriseSites"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hcxEnterpriseSites/delete"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Delete a specific hcxEnterpriseSites."),
		// 				Operation: to.Ptr("Delete a hcxEnterpriseSites"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hcxEnterpriseSites"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hostInstances/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the hostInstances for a PrivateCloud."),
		// 				Operation: to.Ptr("Read hostInstances"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hostInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hostInstances/write"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Create or update a hostInstances."),
		// 				Operation: to.Ptr("Create or update a hostInstances"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hostInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/hostInstances/delete"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Delete a specific hostInstances."),
		// 				Operation: to.Ptr("Delete a hostInstances"),
		// 				Provider: to.Ptr("Microsoft.AVS"),
		// 				Resource: to.Ptr("privateClouds/hostInstances"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armavs.OperationProperties{
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS/privateClouds/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armavs.OperationDisplay{
		// 				Description: to.Ptr("Gets the available metrics for Private Cloud"),
		// 				Operation: to.Ptr("Read Private Cloud metric definitions"),
		// 				Provider: to.Ptr("Microsoft Azure Dedicated"),
		// 				Resource: to.Ptr("privateClouds"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 			Properties: &armavs.OperationProperties{
		// 				ServiceSpecification: &armavs.ServiceSpecification{
		// 					MetricSpecifications: []*armavs.MetricSpecification{
		// 						{
		// 							Name: to.Ptr("UsedLatest"),
		// 							AggregationType: to.Ptr("Average"),
		// 							DisplayDescription: to.Ptr("The total amount of disk used in SDDC"),
		// 							DisplayName: to.Ptr("Datastore disk used"),
		// 							EnableRegionalMdmAccount: to.Ptr("true"),
		// 							SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 							SourceMdmNamespace: to.Ptr("Vsphere.Datastore.Disk"),
		// 							SupportedTimeGrainTypes: []*string{
		// 								to.Ptr("PT5M"),
		// 								to.Ptr("PT15M"),
		// 								to.Ptr("PT30M"),
		// 								to.Ptr("PT1H"),
		// 								to.Ptr("PT6H"),
		// 								to.Ptr("PT12H"),
		// 								to.Ptr("P1D")},
		// 								Unit: to.Ptr("Bytes"),
		// 							},
		// 							{
		// 								Name: to.Ptr("CapacityLatest"),
		// 								AggregationType: to.Ptr("Average"),
		// 								DisplayDescription: to.Ptr("The total capacity of disk in SDDC"),
		// 								DisplayName: to.Ptr("Datastore disk total capacity"),
		// 								EnableRegionalMdmAccount: to.Ptr("true"),
		// 								SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 								SourceMdmNamespace: to.Ptr("Vsphere.Datastore.Disk"),
		// 								SupportedTimeGrainTypes: []*string{
		// 									to.Ptr("PT5M"),
		// 									to.Ptr("PT15M"),
		// 									to.Ptr("PT30M"),
		// 									to.Ptr("PT1H"),
		// 									to.Ptr("PT6H"),
		// 									to.Ptr("PT12H"),
		// 									to.Ptr("P1D")},
		// 									Unit: to.Ptr("Bytes"),
		// 								},
		// 								{
		// 									Name: to.Ptr("EffectiveMemAverage"),
		// 									AggregationType: to.Ptr("Average"),
		// 									DisplayDescription: to.Ptr("Total amount of machine memory in cluster that is available"),
		// 									DisplayName: to.Ptr("Average Effective Memory"),
		// 									EnableRegionalMdmAccount: to.Ptr("true"),
		// 									SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 									SourceMdmNamespace: to.Ptr("Vsphere.Cluster.ClusterServices"),
		// 									SupportedTimeGrainTypes: []*string{
		// 										to.Ptr("PT5M"),
		// 										to.Ptr("PT15M"),
		// 										to.Ptr("PT30M"),
		// 										to.Ptr("PT1H"),
		// 										to.Ptr("PT6H"),
		// 										to.Ptr("PT12H"),
		// 										to.Ptr("P1D")},
		// 										Unit: to.Ptr("Bytes"),
		// 									},
		// 									{
		// 										Name: to.Ptr("TotalMbAverage"),
		// 										AggregationType: to.Ptr("Average"),
		// 										DisplayDescription: to.Ptr("Total memory in cluster"),
		// 										DisplayName: to.Ptr("Average Total Memory"),
		// 										EnableRegionalMdmAccount: to.Ptr("true"),
		// 										SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 										SourceMdmNamespace: to.Ptr("Vsphere.Cluster.Mem"),
		// 										SupportedTimeGrainTypes: []*string{
		// 											to.Ptr("PT5M"),
		// 											to.Ptr("PT15M"),
		// 											to.Ptr("PT30M"),
		// 											to.Ptr("PT1H"),
		// 											to.Ptr("PT6H"),
		// 											to.Ptr("PT12H"),
		// 											to.Ptr("P1D")},
		// 											Unit: to.Ptr("Bytes"),
		// 										},
		// 										{
		// 											Name: to.Ptr("OverheadAverage"),
		// 											AggregationType: to.Ptr("Average"),
		// 											DisplayDescription: to.Ptr("Host physical memory consumed by the virtualization infrastructure"),
		// 											DisplayName: to.Ptr("Average Memory Overhead"),
		// 											EnableRegionalMdmAccount: to.Ptr("true"),
		// 											SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 											SourceMdmNamespace: to.Ptr("Vsphere.Cluster.Mem"),
		// 											SupportedTimeGrainTypes: []*string{
		// 												to.Ptr("PT5M"),
		// 												to.Ptr("PT15M"),
		// 												to.Ptr("PT30M"),
		// 												to.Ptr("PT1H"),
		// 												to.Ptr("PT6H"),
		// 												to.Ptr("PT12H"),
		// 												to.Ptr("P1D")},
		// 												Unit: to.Ptr("Bytes"),
		// 											},
		// 											{
		// 												Name: to.Ptr("UsageAverage"),
		// 												AggregationType: to.Ptr("Average"),
		// 												DisplayDescription: to.Ptr("Memory usage as percentage of total configured or available memory"),
		// 												DisplayName: to.Ptr("Average Memory Usage"),
		// 												EnableRegionalMdmAccount: to.Ptr("true"),
		// 												SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 												SourceMdmNamespace: to.Ptr("Vsphere.Cluster.Mem"),
		// 												SupportedTimeGrainTypes: []*string{
		// 													to.Ptr("PT5M"),
		// 													to.Ptr("PT15M"),
		// 													to.Ptr("PT30M"),
		// 													to.Ptr("PT1H"),
		// 													to.Ptr("PT6H"),
		// 													to.Ptr("PT12H"),
		// 													to.Ptr("P1D")},
		// 													Unit: to.Ptr("Percent"),
		// 												},
		// 												{
		// 													Name: to.Ptr("EffectiveCpuAverage"),
		// 													AggregationType: to.Ptr("Average"),
		// 													DisplayDescription: to.Ptr("Total available CPU resources in cluster"),
		// 													DisplayName: to.Ptr("Effective CPU available"),
		// 													EnableRegionalMdmAccount: to.Ptr("true"),
		// 													SourceMdmAccount: to.Ptr("AVSShoebox2"),
		// 													SourceMdmNamespace: to.Ptr("Vsphere.Cluster.ClusterServices"),
		// 													SupportedTimeGrainTypes: []*string{
		// 														to.Ptr("PT5M"),
		// 														to.Ptr("PT15M"),
		// 														to.Ptr("PT30M"),
		// 														to.Ptr("PT1H"),
		// 														to.Ptr("PT6H"),
		// 														to.Ptr("PT12H"),
		// 														to.Ptr("P1D")},
		// 														Unit: to.Ptr("Percent"),
		// 												}},
		// 											},
		// 										},
		// 									},
		// 									{
		// 										Name: to.Ptr("Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/read"),
		// 										Display: &armavs.OperationDisplay{
		// 											Description: to.Ptr("Gets the diagnostic setting for the resource"),
		// 											Operation: to.Ptr("Read diagnostic setting"),
		// 											Provider: to.Ptr("Microsoft.AVS"),
		// 											Resource: to.Ptr("privateClouds"),
		// 										},
		// 										IsDataAction: to.Ptr(false),
		// 										Origin: to.Ptr("system"),
		// 										Properties: &armavs.OperationProperties{
		// 										},
		// 									},
		// 									{
		// 										Name: to.Ptr("Microsoft.AVS/privateClouds/providers/Microsoft.Insights/diagnosticSettings/write"),
		// 										Display: &armavs.OperationDisplay{
		// 											Description: to.Ptr("Creates or updates the diagnostic setting for the resource"),
		// 											Operation: to.Ptr("Write diagnostic setting"),
		// 											Provider: to.Ptr("Microsoft.AVS"),
		// 											Resource: to.Ptr("privateClouds"),
		// 										},
		// 										IsDataAction: to.Ptr(false),
		// 										Origin: to.Ptr("system"),
		// 										Properties: &armavs.OperationProperties{
		// 										},
		// 								}},
		// 							}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Pageable list of operations
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OptionalParamEnum

type OptionalParamEnum string

OptionalParamEnum - Is this parameter required or optional

const (
	OptionalParamEnumOptional OptionalParamEnum = "Optional"
	OptionalParamEnumRequired OptionalParamEnum = "Required"
)

func PossibleOptionalParamEnumValues

func PossibleOptionalParamEnumValues() []OptionalParamEnum

PossibleOptionalParamEnumValues returns the possible values for the OptionalParamEnum const type.

type PSCredentialExecutionParameter

type PSCredentialExecutionParameter struct {
	// REQUIRED; The parameter name
	Name *string

	// REQUIRED; The type of execution parameter
	Type *ScriptExecutionParameterType

	// password for login
	Password *string

	// username for login
	Username *string
}

PSCredentialExecutionParameter - a powershell credential object

func (*PSCredentialExecutionParameter) GetScriptExecutionParameter added in v0.2.0

func (p *PSCredentialExecutionParameter) GetScriptExecutionParameter() *ScriptExecutionParameter

GetScriptExecutionParameter implements the ScriptExecutionParameterClassification interface for type PSCredentialExecutionParameter.

func (PSCredentialExecutionParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PSCredentialExecutionParameter.

func (*PSCredentialExecutionParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PSCredentialExecutionParameter.

type PlacementPoliciesClient

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

PlacementPoliciesClient contains the methods for the PlacementPolicies group. Don't use this type directly, use NewPlacementPoliciesClient() instead.

func NewPlacementPoliciesClient

func NewPlacementPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PlacementPoliciesClient, error)

NewPlacementPoliciesClient creates a new instance of PlacementPoliciesClient 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 (*PlacementPoliciesClient) BeginCreateOrUpdate

func (client *PlacementPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, placementPolicyName string, placementPolicy PlacementPolicy, options *PlacementPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PlacementPoliciesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a placement policy in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • placementPolicyName - Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy
  • placementPolicy - A placement policy in the private cloud cluster
  • options - PlacementPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PlacementPoliciesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPlacementPoliciesClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "cluster1", "policy1", armavs.PlacementPolicy{
		Properties: &armavs.VMHostPlacementPolicyProperties{
			Type:                   to.Ptr(armavs.PlacementPolicyTypeVMHost),
			AffinityStrength:       to.Ptr(armavs.AffinityStrengthMust),
			AffinityType:           to.Ptr(armavs.AffinityTypeAntiAffinity),
			AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
			HostMembers: []*string{
				to.Ptr("fakehost22.nyc1.kubernetes.center"),
				to.Ptr("fakehost23.nyc1.kubernetes.center"),
				to.Ptr("fakehost24.nyc1.kubernetes.center")},
			VMMembers: []*string{
				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PlacementPolicy = armavs.PlacementPolicy{
	// 	Name: to.Ptr("policy1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/placementPolicies"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/placementPolicies/policy1"),
	// 	Properties: &armavs.VMHostPlacementPolicyProperties{
	// 		Type: to.Ptr(armavs.PlacementPolicyTypeVMHost),
	// 		DisplayName: to.Ptr("policy1"),
	// 		ProvisioningState: to.Ptr(armavs.PlacementPolicyProvisioningStateSucceeded),
	// 		State: to.Ptr(armavs.PlacementPolicyStateEnabled),
	// 		AffinityStrength: to.Ptr(armavs.AffinityStrengthMust),
	// 		AffinityType: to.Ptr(armavs.AffinityTypeAntiAffinity),
	// 		AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
	// 		HostMembers: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 			VMMembers: []*string{
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
	// 			},
	// 		}
}
Output:

func (*PlacementPoliciesClient) BeginDelete

func (client *PlacementPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, placementPolicyName string, options *PlacementPoliciesClientBeginDeleteOptions) (*runtime.Poller[PlacementPoliciesClientDeleteResponse], error)

BeginDelete - Delete a placement policy in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • placementPolicyName - Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy
  • options - PlacementPoliciesClientBeginDeleteOptions contains the optional parameters for the PlacementPoliciesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPlacementPoliciesClient().BeginDelete(ctx, "group1", "cloud1", "cluster1", "policy1", 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 (*PlacementPoliciesClient) BeginUpdate

func (client *PlacementPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, placementPolicyName string, placementPolicyUpdate PlacementPolicyUpdate, options *PlacementPoliciesClientBeginUpdateOptions) (*runtime.Poller[PlacementPoliciesClientUpdateResponse], error)

BeginUpdate - Update a placement policy in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • placementPolicyName - Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy
  • placementPolicyUpdate - The placement policy properties that may be updated
  • options - PlacementPoliciesClientBeginUpdateOptions contains the optional parameters for the PlacementPoliciesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Update.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPlacementPoliciesClient().BeginUpdate(ctx, "group1", "cloud1", "cluster1", "policy1", armavs.PlacementPolicyUpdate{
		Properties: &armavs.PlacementPolicyUpdateProperties{
			AffinityStrength:       to.Ptr(armavs.AffinityStrengthMust),
			AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
			HostMembers: []*string{
				to.Ptr("fakehost22.nyc1.kubernetes.center"),
				to.Ptr("fakehost23.nyc1.kubernetes.center"),
				to.Ptr("fakehost24.nyc1.kubernetes.center")},
			State: to.Ptr(armavs.PlacementPolicyStateDisabled),
			VMMembers: []*string{
				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PlacementPolicy = armavs.PlacementPolicy{
	// 	Name: to.Ptr("policy1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/placementPolicies"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/placementPolicies/policy1"),
	// 	Properties: &armavs.VMHostPlacementPolicyProperties{
	// 		Type: to.Ptr(armavs.PlacementPolicyTypeVMHost),
	// 		DisplayName: to.Ptr("policy1"),
	// 		ProvisioningState: to.Ptr(armavs.PlacementPolicyProvisioningStateSucceeded),
	// 		State: to.Ptr(armavs.PlacementPolicyStateDisabled),
	// 		AffinityStrength: to.Ptr(armavs.AffinityStrengthMust),
	// 		AffinityType: to.Ptr(armavs.AffinityTypeAntiAffinity),
	// 		AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
	// 		HostMembers: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 			VMMembers: []*string{
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
	// 			},
	// 		}
}
Output:

func (*PlacementPoliciesClient) Get

func (client *PlacementPoliciesClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, placementPolicyName string, options *PlacementPoliciesClientGetOptions) (PlacementPoliciesClientGetResponse, error)

Get - Get a placement policy by name in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • placementPolicyName - Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy
  • options - PlacementPoliciesClientGetOptions contains the optional parameters for the PlacementPoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPlacementPoliciesClient().Get(ctx, "group1", "cloud1", "cluster1", "policy1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PlacementPolicy = armavs.PlacementPolicy{
	// 	Name: to.Ptr("policy1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/placementPolicies"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/placementPolicies/policy1"),
	// 	Properties: &armavs.VMHostPlacementPolicyProperties{
	// 		Type: to.Ptr(armavs.PlacementPolicyTypeVMHost),
	// 		DisplayName: to.Ptr("policy1"),
	// 		ProvisioningState: to.Ptr(armavs.PlacementPolicyProvisioningStateSucceeded),
	// 		State: to.Ptr(armavs.PlacementPolicyStateEnabled),
	// 		AffinityStrength: to.Ptr(armavs.AffinityStrengthMust),
	// 		AffinityType: to.Ptr(armavs.AffinityTypeAntiAffinity),
	// 		AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
	// 		HostMembers: []*string{
	// 			to.Ptr("fakehost22.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost23.nyc1.kubernetes.center"),
	// 			to.Ptr("fakehost24.nyc1.kubernetes.center")},
	// 			VMMembers: []*string{
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
	// 				to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
	// 			},
	// 		}
}
Output:

func (*PlacementPoliciesClient) NewListPager added in v0.4.0

func (client *PlacementPoliciesClient) NewListPager(resourceGroupName string, privateCloudName string, clusterName string, options *PlacementPoliciesClientListOptions) *runtime.Pager[PlacementPoliciesClientListResponse]

NewListPager - List placement policies in a private cloud cluster

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - PlacementPoliciesClientListOptions contains the optional parameters for the PlacementPoliciesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPlacementPoliciesClient().NewListPager("group1", "cloud1", "cluster1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PlacementPoliciesList = armavs.PlacementPoliciesList{
		// 	Value: []*armavs.PlacementPolicy{
		// 		{
		// 			Name: to.Ptr("policy1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/placementPolicies"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/placementPolicies/policy1"),
		// 			Properties: &armavs.VMHostPlacementPolicyProperties{
		// 				Type: to.Ptr(armavs.PlacementPolicyTypeVMHost),
		// 				DisplayName: to.Ptr("policy1"),
		// 				ProvisioningState: to.Ptr(armavs.PlacementPolicyProvisioningStateSucceeded),
		// 				State: to.Ptr(armavs.PlacementPolicyStateEnabled),
		// 				AffinityStrength: to.Ptr(armavs.AffinityStrengthMust),
		// 				AffinityType: to.Ptr(armavs.AffinityTypeAntiAffinity),
		// 				AzureHybridBenefitType: to.Ptr(armavs.AzureHybridBenefitTypeSQLHost),
		// 				HostMembers: []*string{
		// 					to.Ptr("fakehost22.nyc1.kubernetes.center"),
		// 					to.Ptr("fakehost23.nyc1.kubernetes.center"),
		// 					to.Ptr("fakehost24.nyc1.kubernetes.center")},
		// 					VMMembers: []*string{
		// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
		// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("policy2"),
		// 					Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/placementPolicies"),
		// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/placementPolicies/policy2"),
		// 					Properties: &armavs.VMPlacementPolicyProperties{
		// 						Type: to.Ptr(armavs.PlacementPolicyTypeVMVM),
		// 						DisplayName: to.Ptr("policy2"),
		// 						ProvisioningState: to.Ptr(armavs.PlacementPolicyProvisioningStateSucceeded),
		// 						State: to.Ptr(armavs.PlacementPolicyStateEnabled),
		// 						AffinityType: to.Ptr(armavs.AffinityTypeAffinity),
		// 						VMMembers: []*string{
		// 							to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
		// 							to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")},
		// 						},
		// 				}},
		// 			}
	}
}
Output:

type PlacementPoliciesClientBeginCreateOrUpdateOptions added in v0.2.0

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

PlacementPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PlacementPoliciesClient.BeginCreateOrUpdate method.

type PlacementPoliciesClientBeginDeleteOptions added in v0.2.0

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

PlacementPoliciesClientBeginDeleteOptions contains the optional parameters for the PlacementPoliciesClient.BeginDelete method.

type PlacementPoliciesClientBeginUpdateOptions added in v0.2.0

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

PlacementPoliciesClientBeginUpdateOptions contains the optional parameters for the PlacementPoliciesClient.BeginUpdate method.

type PlacementPoliciesClientCreateOrUpdateResponse added in v0.2.0

type PlacementPoliciesClientCreateOrUpdateResponse struct {
	// A vSphere Distributed Resource Scheduler (DRS) placement policy
	PlacementPolicy
}

PlacementPoliciesClientCreateOrUpdateResponse contains the response from method PlacementPoliciesClient.BeginCreateOrUpdate.

type PlacementPoliciesClientDeleteResponse added in v0.2.0

type PlacementPoliciesClientDeleteResponse struct {
}

PlacementPoliciesClientDeleteResponse contains the response from method PlacementPoliciesClient.BeginDelete.

type PlacementPoliciesClientGetOptions added in v0.2.0

type PlacementPoliciesClientGetOptions struct {
}

PlacementPoliciesClientGetOptions contains the optional parameters for the PlacementPoliciesClient.Get method.

type PlacementPoliciesClientGetResponse added in v0.2.0

type PlacementPoliciesClientGetResponse struct {
	// A vSphere Distributed Resource Scheduler (DRS) placement policy
	PlacementPolicy
}

PlacementPoliciesClientGetResponse contains the response from method PlacementPoliciesClient.Get.

type PlacementPoliciesClientListOptions added in v0.2.0

type PlacementPoliciesClientListOptions struct {
}

PlacementPoliciesClientListOptions contains the optional parameters for the PlacementPoliciesClient.NewListPager method.

type PlacementPoliciesClientListResponse added in v0.2.0

type PlacementPoliciesClientListResponse struct {
	// Represents list of placement policies
	PlacementPoliciesList
}

PlacementPoliciesClientListResponse contains the response from method PlacementPoliciesClient.NewListPager.

type PlacementPoliciesClientUpdateResponse added in v0.2.0

type PlacementPoliciesClientUpdateResponse struct {
	// A vSphere Distributed Resource Scheduler (DRS) placement policy
	PlacementPolicy
}

PlacementPoliciesClientUpdateResponse contains the response from method PlacementPoliciesClient.BeginUpdate.

type PlacementPoliciesList

type PlacementPoliciesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*PlacementPolicy
}

PlacementPoliciesList - Represents list of placement policies

func (PlacementPoliciesList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PlacementPoliciesList.

func (*PlacementPoliciesList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementPoliciesList.

type PlacementPolicy

type PlacementPolicy struct {
	// placement policy properties
	Properties PlacementPolicyPropertiesClassification

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

PlacementPolicy - A vSphere Distributed Resource Scheduler (DRS) placement policy

func (PlacementPolicy) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PlacementPolicy.

func (*PlacementPolicy) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementPolicy.

type PlacementPolicyProperties

type PlacementPolicyProperties struct {
	// REQUIRED; placement policy type
	Type *PlacementPolicyType

	// Display name of the placement policy
	DisplayName *string

	// Whether the placement policy is enabled or disabled
	State *PlacementPolicyState

	// READ-ONLY; The provisioning state
	ProvisioningState *PlacementPolicyProvisioningState
}

PlacementPolicyProperties - Abstract placement policy properties

func (*PlacementPolicyProperties) GetPlacementPolicyProperties

func (p *PlacementPolicyProperties) GetPlacementPolicyProperties() *PlacementPolicyProperties

GetPlacementPolicyProperties implements the PlacementPolicyPropertiesClassification interface for type PlacementPolicyProperties.

func (PlacementPolicyProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PlacementPolicyProperties.

func (*PlacementPolicyProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementPolicyProperties.

type PlacementPolicyPropertiesClassification

type PlacementPolicyPropertiesClassification interface {
	// GetPlacementPolicyProperties returns the PlacementPolicyProperties content of the underlying type.
	GetPlacementPolicyProperties() *PlacementPolicyProperties
}

PlacementPolicyPropertiesClassification provides polymorphic access to related types. Call the interface's GetPlacementPolicyProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *PlacementPolicyProperties, *VMHostPlacementPolicyProperties, *VMPlacementPolicyProperties

type PlacementPolicyProvisioningState

type PlacementPolicyProvisioningState string

PlacementPolicyProvisioningState - The provisioning state

const (
	PlacementPolicyProvisioningStateBuilding  PlacementPolicyProvisioningState = "Building"
	PlacementPolicyProvisioningStateCanceled  PlacementPolicyProvisioningState = "Canceled"
	PlacementPolicyProvisioningStateDeleting  PlacementPolicyProvisioningState = "Deleting"
	PlacementPolicyProvisioningStateFailed    PlacementPolicyProvisioningState = "Failed"
	PlacementPolicyProvisioningStateSucceeded PlacementPolicyProvisioningState = "Succeeded"
	PlacementPolicyProvisioningStateUpdating  PlacementPolicyProvisioningState = "Updating"
)

func PossiblePlacementPolicyProvisioningStateValues

func PossiblePlacementPolicyProvisioningStateValues() []PlacementPolicyProvisioningState

PossiblePlacementPolicyProvisioningStateValues returns the possible values for the PlacementPolicyProvisioningState const type.

type PlacementPolicyState

type PlacementPolicyState string

PlacementPolicyState - Whether the placement policy is enabled or disabled

const (
	PlacementPolicyStateDisabled PlacementPolicyState = "Disabled"
	PlacementPolicyStateEnabled  PlacementPolicyState = "Enabled"
)

func PossiblePlacementPolicyStateValues

func PossiblePlacementPolicyStateValues() []PlacementPolicyState

PossiblePlacementPolicyStateValues returns the possible values for the PlacementPolicyState const type.

type PlacementPolicyType

type PlacementPolicyType string

PlacementPolicyType - placement policy type

const (
	PlacementPolicyTypeVMHost PlacementPolicyType = "VmHost"
	PlacementPolicyTypeVMVM   PlacementPolicyType = "VmVm"
)

func PossiblePlacementPolicyTypeValues

func PossiblePlacementPolicyTypeValues() []PlacementPolicyType

PossiblePlacementPolicyTypeValues returns the possible values for the PlacementPolicyType const type.

type PlacementPolicyUpdate

type PlacementPolicyUpdate struct {
	// The properties of a placement policy resource that may be updated
	Properties *PlacementPolicyUpdateProperties
}

PlacementPolicyUpdate - An update of a DRS placement policy resource

func (PlacementPolicyUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PlacementPolicyUpdate.

func (*PlacementPolicyUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementPolicyUpdate.

type PlacementPolicyUpdateProperties

type PlacementPolicyUpdateProperties struct {
	// vm-host placement policy affinity strength (should/must)
	AffinityStrength *AffinityStrength

	// placement policy azure hybrid benefit opt-in type
	AzureHybridBenefitType *AzureHybridBenefitType

	// Host members list
	HostMembers []*string

	// Whether the placement policy is enabled or disabled
	State *PlacementPolicyState

	// Virtual machine members list
	VMMembers []*string
}

PlacementPolicyUpdateProperties - The properties of a placement policy resource that may be updated

func (PlacementPolicyUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PlacementPolicyUpdateProperties.

func (*PlacementPolicyUpdateProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementPolicyUpdateProperties.

type PortMirroringDirectionEnum

type PortMirroringDirectionEnum string

PortMirroringDirectionEnum - Direction of port mirroring profile.

const (
	PortMirroringDirectionEnumBIDIRECTIONAL PortMirroringDirectionEnum = "BIDIRECTIONAL"
	PortMirroringDirectionEnumEGRESS        PortMirroringDirectionEnum = "EGRESS"
	PortMirroringDirectionEnumINGRESS       PortMirroringDirectionEnum = "INGRESS"
)

func PossiblePortMirroringDirectionEnumValues

func PossiblePortMirroringDirectionEnumValues() []PortMirroringDirectionEnum

PossiblePortMirroringDirectionEnumValues returns the possible values for the PortMirroringDirectionEnum const type.

type PortMirroringStatusEnum

type PortMirroringStatusEnum string

PortMirroringStatusEnum - Port Mirroring Status.

const (
	PortMirroringStatusEnumFAILURE PortMirroringStatusEnum = "FAILURE"
	PortMirroringStatusEnumSUCCESS PortMirroringStatusEnum = "SUCCESS"
)

func PossiblePortMirroringStatusEnumValues

func PossiblePortMirroringStatusEnumValues() []PortMirroringStatusEnum

PossiblePortMirroringStatusEnumValues returns the possible values for the PortMirroringStatusEnum const type.

type PrivateCloud

type PrivateCloud struct {
	// REQUIRED; The private cloud SKU
	SKU *SKU

	// The identity of the private cloud, if configured.
	Identity *PrivateCloudIdentity

	// Resource location
	Location *string

	// The properties of a private cloud resource
	Properties *PrivateCloudProperties

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

PrivateCloud - A private cloud resource

func (PrivateCloud) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloud.

func (*PrivateCloud) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloud.

type PrivateCloudIdentity

type PrivateCloudIdentity struct {
	// The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. The
	// type 'None' will remove any identities from the Private Cloud.
	Type *ResourceIdentityType

	// READ-ONLY; The principal ID of private cloud identity. This property will only be provided for a system assigned identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID associated with the private cloud. This property will only be provided for a system assigned identity.
	TenantID *string
}

PrivateCloudIdentity - Identity for the virtual machine.

func (PrivateCloudIdentity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloudIdentity.

func (*PrivateCloudIdentity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudIdentity.

type PrivateCloudList

type PrivateCloudList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*PrivateCloud
}

PrivateCloudList - A paged list of private clouds

func (PrivateCloudList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloudList.

func (*PrivateCloudList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudList.

type PrivateCloudProperties

type PrivateCloudProperties struct {
	// REQUIRED; The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the
	// CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is
	// between 0 and 22
	NetworkBlock *string

	// Properties describing how the cloud is distributed across availability zones
	Availability *AvailabilityProperties

	// An ExpressRoute Circuit
	Circuit *Circuit

	// Customer managed key encryption, can be enabled or disabled
	Encryption *Encryption

	// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in
	// your subscription, on-premise, and this privateCloud networkBlock attribute.
	// Make sure the CIDR format conforms to (A.B.C.D/X).
	ExtendedNetworkBlocks []*string

	// vCenter Single Sign On Identity Sources
	IdentitySources []*IdentitySource

	// Connectivity to internet is enabled or disabled
	Internet *InternetEnum

	// The default cluster used for management
	ManagementCluster *ManagementCluster

	// Optionally, set the NSX-T Manager password when the private cloud is created
	NsxtPassword *string

	// A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud
	SecondaryCircuit *Circuit

	// Optionally, set the vCenter admin password when the private cloud is created
	VcenterPassword *string

	// READ-ONLY; The endpoints
	Endpoints *Endpoints

	// READ-ONLY; Array of cloud link IDs from other clouds that connect to this one
	ExternalCloudLinks []*string

	// READ-ONLY; Network used to access vCenter Server and NSX-T Manager
	ManagementNetwork *string

	// READ-ONLY; Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64
	// to 1024
	NsxPublicIPQuotaRaised *NsxPublicIPQuotaRaisedEnum

	// READ-ONLY; Thumbprint of the NSX-T Manager SSL certificate
	NsxtCertificateThumbprint *string

	// READ-ONLY; Used for virtual machine cold migration, cloning, and snapshot migration
	ProvisioningNetwork *string

	// READ-ONLY; The provisioning state
	ProvisioningState *PrivateCloudProvisioningState

	// READ-ONLY; Thumbprint of the vCenter Server SSL certificate
	VcenterCertificateThumbprint *string

	// READ-ONLY; Used for live migration of virtual machines
	VmotionNetwork *string
}

PrivateCloudProperties - The properties of a private cloud resource

func (PrivateCloudProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloudProperties.

func (*PrivateCloudProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudProperties.

type PrivateCloudProvisioningState

type PrivateCloudProvisioningState string

PrivateCloudProvisioningState - The provisioning state

const (
	PrivateCloudProvisioningStateBuilding  PrivateCloudProvisioningState = "Building"
	PrivateCloudProvisioningStateCanceled  PrivateCloudProvisioningState = "Canceled"
	PrivateCloudProvisioningStateCancelled PrivateCloudProvisioningState = "Cancelled"
	PrivateCloudProvisioningStateDeleting  PrivateCloudProvisioningState = "Deleting"
	PrivateCloudProvisioningStateFailed    PrivateCloudProvisioningState = "Failed"
	PrivateCloudProvisioningStatePending   PrivateCloudProvisioningState = "Pending"
	PrivateCloudProvisioningStateSucceeded PrivateCloudProvisioningState = "Succeeded"
	PrivateCloudProvisioningStateUpdating  PrivateCloudProvisioningState = "Updating"
)

func PossiblePrivateCloudProvisioningStateValues

func PossiblePrivateCloudProvisioningStateValues() []PrivateCloudProvisioningState

PossiblePrivateCloudProvisioningStateValues returns the possible values for the PrivateCloudProvisioningState const type.

type PrivateCloudUpdate

type PrivateCloudUpdate struct {
	// The identity of the private cloud, if configured.
	Identity *PrivateCloudIdentity

	// The updatable properties of a private cloud resource
	Properties *PrivateCloudUpdateProperties

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

PrivateCloudUpdate - An update to a private cloud resource

func (PrivateCloudUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloudUpdate.

func (*PrivateCloudUpdate) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudUpdate.

type PrivateCloudUpdateProperties

type PrivateCloudUpdateProperties struct {
	// Properties describing how the cloud is distributed across availability zones
	Availability *AvailabilityProperties

	// Customer managed key encryption, can be enabled or disabled
	Encryption *Encryption

	// Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across VNet in
	// your subscription, on-premise, and this privateCloud networkBlock attribute.
	// Make sure the CIDR format conforms to (A.B.C.D/X).
	ExtendedNetworkBlocks []*string

	// vCenter Single Sign On Identity Sources
	IdentitySources []*IdentitySource

	// Connectivity to internet is enabled or disabled
	Internet *InternetEnum

	// The default cluster used for management
	ManagementCluster *ManagementCluster
}

PrivateCloudUpdateProperties - The properties of a private cloud resource that may be updated

func (PrivateCloudUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateCloudUpdateProperties.

func (*PrivateCloudUpdateProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateCloudUpdateProperties.

type PrivateCloudsClient

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

PrivateCloudsClient contains the methods for the PrivateClouds group. Don't use this type directly, use NewPrivateCloudsClient() instead.

func NewPrivateCloudsClient

func NewPrivateCloudsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateCloudsClient, error)

NewPrivateCloudsClient creates a new instance of PrivateCloudsClient 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 (*PrivateCloudsClient) BeginCreateOrUpdate

func (client *PrivateCloudsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, privateCloud PrivateCloud, options *PrivateCloudsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateCloudsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • privateCloud - The private cloud
  • options - PrivateCloudsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateCloudsClient.BeginCreateOrUpdate method.
Example (PrivateCloudsCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", armavs.PrivateCloud{
		Location: to.Ptr("eastus2"),
		Tags:     map[string]*string{},
		Identity: &armavs.PrivateCloudIdentity{
			Type: to.Ptr(armavs.ResourceIdentityTypeSystemAssigned),
		},
		Properties: &armavs.PrivateCloudProperties{
			ManagementCluster: &armavs.ManagementCluster{
				ClusterSize: to.Ptr[int32](4),
			},
			NetworkBlock: to.Ptr("192.168.48.0/22"),
		},
		SKU: &armavs.SKU{
			Name: to.Ptr("AV36"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategySingleZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

Example (PrivateCloudsCreateOrUpdateStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate_Stretched.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", armavs.PrivateCloud{
		Location: to.Ptr("eastus2"),
		Tags:     map[string]*string{},
		Properties: &armavs.PrivateCloudProperties{
			Availability: &armavs.AvailabilityProperties{
				SecondaryZone: to.Ptr[int32](2),
				Strategy:      to.Ptr(armavs.AvailabilityStrategyDualZone),
				Zone:          to.Ptr[int32](1),
			},
			ManagementCluster: &armavs.ManagementCluster{
				ClusterSize: to.Ptr[int32](4),
			},
			NetworkBlock: to.Ptr("192.168.48.0/22"),
		},
		SKU: &armavs.SKU{
			Name: to.Ptr("AV36"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			SecondaryZone: to.Ptr[int32](2),
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategyDualZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 				SecondaryCircuit: &armavs.Circuit{
	// 					ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect2"),
	// 					PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 					SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 				},
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

func (*PrivateCloudsClient) BeginDelete

func (client *PrivateCloudsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, options *PrivateCloudsClientBeginDeleteOptions) (*runtime.Poller[PrivateCloudsClientDeleteResponse], error)

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

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - PrivateCloudsClientBeginDeleteOptions contains the optional parameters for the PrivateCloudsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginDelete(ctx, "group1", "cloud1", 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 (*PrivateCloudsClient) BeginRotateNsxtPassword

func (client *PrivateCloudsClient) BeginRotateNsxtPassword(ctx context.Context, resourceGroupName string, privateCloudName string, options *PrivateCloudsClientBeginRotateNsxtPasswordOptions) (*runtime.Poller[PrivateCloudsClientRotateNsxtPasswordResponse], error)

BeginRotateNsxtPassword - Rotate the NSX-T Manager password If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - PrivateCloudsClientBeginRotateNsxtPasswordOptions contains the optional parameters for the PrivateCloudsClient.BeginRotateNsxtPassword method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateNsxtPassword.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginRotateNsxtPassword(ctx, "group1", "cloud1", 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 (*PrivateCloudsClient) BeginRotateVcenterPassword

func (client *PrivateCloudsClient) BeginRotateVcenterPassword(ctx context.Context, resourceGroupName string, privateCloudName string, options *PrivateCloudsClientBeginRotateVcenterPasswordOptions) (*runtime.Poller[PrivateCloudsClientRotateVcenterPasswordResponse], error)

BeginRotateVcenterPassword - Rotate the vCenter password If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - PrivateCloudsClientBeginRotateVcenterPasswordOptions contains the optional parameters for the PrivateCloudsClient.BeginRotateVcenterPassword method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateVcenterPassword.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginRotateVcenterPassword(ctx, "group1", "cloud1", 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 (*PrivateCloudsClient) BeginUpdate

func (client *PrivateCloudsClient) BeginUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, privateCloudUpdate PrivateCloudUpdate, options *PrivateCloudsClientBeginUpdateOptions) (*runtime.Poller[PrivateCloudsClientUpdateResponse], error)

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

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • privateCloudUpdate - The private cloud properties to be updated
  • options - PrivateCloudsClientBeginUpdateOptions contains the optional parameters for the PrivateCloudsClient.BeginUpdate method.
Example (PrivateCloudsUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginUpdate(ctx, "group1", "cloud1", armavs.PrivateCloudUpdate{
		Identity: &armavs.PrivateCloudIdentity{
			Type: to.Ptr(armavs.ResourceIdentityTypeNone),
		},
		Properties: &armavs.PrivateCloudUpdateProperties{
			Encryption: &armavs.Encryption{
				KeyVaultProperties: &armavs.EncryptionKeyVaultProperties{
					KeyName:     to.Ptr("keyname1"),
					KeyVaultURL: to.Ptr("https://keyvault1-kmip-kvault.vault.azure.net/"),
					KeyVersion:  to.Ptr("ver1.0"),
				},
				Status: to.Ptr(armavs.EncryptionStateEnabled),
			},
			ManagementCluster: &armavs.ManagementCluster{
				ClusterSize: to.Ptr[int32](4),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategySingleZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		Encryption: &armavs.Encryption{
	// 			KeyVaultProperties: &armavs.EncryptionKeyVaultProperties{
	// 				KeyName: to.Ptr("keyname1"),
	// 				KeyVaultURL: to.Ptr("https://keyvault1-kmip-kvault.vault.azure.net/"),
	// 				KeyVersion: to.Ptr("ver1.0"),
	// 				VersionType: to.Ptr(armavs.EncryptionVersionTypeFixed),
	// 			},
	// 			Status: to.Ptr(armavs.EncryptionStateEnabled),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				HcxCloudManager: to.Ptr("https://192.168.50.4/"),
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

Example (PrivateCloudsUpdateStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update_Stretched.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateCloudsClient().BeginUpdate(ctx, "group1", "cloud1", armavs.PrivateCloudUpdate{
		Properties: &armavs.PrivateCloudUpdateProperties{
			ManagementCluster: &armavs.ManagementCluster{
				ClusterSize: to.Ptr[int32](4),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			SecondaryZone: to.Ptr[int32](2),
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategyDualZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				HcxCloudManager: to.Ptr("https://192.168.50.4/"),
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 				SecondaryCircuit: &armavs.Circuit{
	// 					ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect2"),
	// 					ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er2/peerings/AzurePrivatePeering"),
	// 					PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 					SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 				},
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

func (*PrivateCloudsClient) Get

func (client *PrivateCloudsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, options *PrivateCloudsClientGetOptions) (PrivateCloudsClientGetResponse, error)

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

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - PrivateCloudsClientGetOptions contains the optional parameters for the PrivateCloudsClient.Get method.
Example (PrivateCloudsGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateCloudsClient().Get(ctx, "group1", "cloud1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Identity: &armavs.PrivateCloudIdentity{
	// 		Type: to.Ptr(armavs.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("881e5573-063f-49e4-8c08-79d7df0169d8"),
	// 		TenantID: to.Ptr("881e5573-063f-49e4-8c08-79d7df0169d8"),
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategySingleZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		Encryption: &armavs.Encryption{
	// 			KeyVaultProperties: &armavs.EncryptionKeyVaultProperties{
	// 				KeyName: to.Ptr("keyname1"),
	// 				KeyState: to.Ptr(armavs.EncryptionKeyStatusConnected),
	// 				KeyVaultURL: to.Ptr("https://keyvault1-kmip-kvault.vault.azure.net/"),
	// 				KeyVersion: to.Ptr("ver1.0"),
	// 				VersionType: to.Ptr(armavs.EncryptionVersionTypeFixed),
	// 			},
	// 			Status: to.Ptr(armavs.EncryptionStateEnabled),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				HcxCloudManager: to.Ptr("https://192.168.50.4/"),
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

Example (PrivateCloudsGetStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get_Stretched.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateCloudsClient().Get(ctx, "group1", "cloud1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateCloud = armavs.PrivateCloud{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
	// 	Location: to.Ptr("eastus2"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armavs.PrivateCloudProperties{
	// 		Availability: &armavs.AvailabilityProperties{
	// 			SecondaryZone: to.Ptr[int32](2),
	// 			Strategy: to.Ptr(armavs.AvailabilityStrategyDualZone),
	// 			Zone: to.Ptr[int32](1),
	// 		},
	// 		IdentitySources: []*armavs.IdentitySource{
	// 			{
	// 				Name: to.Ptr("group1"),
	// 				Alias: to.Ptr("groupAlias"),
	// 				BaseGroupDN: to.Ptr("ou=baseGroup"),
	// 				BaseUserDN: to.Ptr("ou=baseUser"),
	// 				Domain: to.Ptr("domain1"),
	// 				PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
	// 				SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
	// 				SSL: to.Ptr(armavs.SSLEnumEnabled),
	// 		}},
	// 		Internet: to.Ptr(armavs.InternetEnumDisabled),
	// 		ManagementCluster: &armavs.ManagementCluster{
	// 			ClusterID: to.Ptr[int32](1),
	// 			ClusterSize: to.Ptr[int32](4),
	// 			Hosts: []*string{
	// 				to.Ptr("fakehost18.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost19.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost20.nyc1.kubernetes.center"),
	// 				to.Ptr("fakehost21.nyc1.kubernetes.center")},
	// 			},
	// 			Circuit: &armavs.Circuit{
	// 				ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 				ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
	// 				PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 				SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 			},
	// 			Endpoints: &armavs.Endpoints{
	// 				HcxCloudManager: to.Ptr("https://192.168.50.4/"),
	// 				NsxtManager: to.Ptr("https://192.168.50.3/"),
	// 				Vcsa: to.Ptr("https://192.168.50.2/"),
	// 			},
	// 			ExternalCloudLinks: []*string{
	// 				to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
	// 				NetworkBlock: to.Ptr("192.168.48.0/22"),
	// 				ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
	// 				SecondaryCircuit: &armavs.Circuit{
	// 					ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
	// 					ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er2/peerings/AzurePrivatePeering"),
	// 					PrimarySubnet: to.Ptr("192.168.53.0/30"),
	// 					SecondarySubnet: to.Ptr("192.168.53.4/30"),
	// 				},
	// 			},
	// 			SKU: &armavs.SKU{
	// 				Name: to.Ptr("AV36"),
	// 			},
	// 		}
}
Output:

func (*PrivateCloudsClient) ListAdminCredentials

func (client *PrivateCloudsClient) ListAdminCredentials(ctx context.Context, resourceGroupName string, privateCloudName string, options *PrivateCloudsClientListAdminCredentialsOptions) (PrivateCloudsClientListAdminCredentialsResponse, error)

ListAdminCredentials - List the admin credentials for the private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - PrivateCloudsClientListAdminCredentialsOptions contains the optional parameters for the PrivateCloudsClient.ListAdminCredentials method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListAdminCredentials.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateCloudsClient().ListAdminCredentials(ctx, "group1", "cloud1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AdminCredentials = armavs.AdminCredentials{
	// 	NsxtPassword: to.Ptr("$(1X4Dkk"),
	// 	NsxtUsername: to.Ptr("admin"),
	// 	VcenterPassword: to.Ptr("<vcenterPassword>"),
	// 	VcenterUsername: to.Ptr("cloudadmin@vsphere.local"),
	// }
}
Output:

func (*PrivateCloudsClient) NewListInSubscriptionPager added in v0.4.0

NewListInSubscriptionPager - List private clouds in a subscription

Generated from API version 2023-03-01

  • options - PrivateCloudsClientListInSubscriptionOptions contains the optional parameters for the PrivateCloudsClient.NewListInSubscriptionPager method.
Example (PrivateCloudsListInSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateCloudsClient().NewListInSubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateCloudList = armavs.PrivateCloudList{
		// 	Value: []*armavs.PrivateCloud{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
		// 			Location: to.Ptr("eastus2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armavs.PrivateCloudProperties{
		// 				Availability: &armavs.AvailabilityProperties{
		// 					Strategy: to.Ptr(armavs.AvailabilityStrategySingleZone),
		// 					Zone: to.Ptr[int32](1),
		// 				},
		// 				IdentitySources: []*armavs.IdentitySource{
		// 					{
		// 						Name: to.Ptr("group1"),
		// 						Alias: to.Ptr("groupAlias"),
		// 						BaseGroupDN: to.Ptr("ou=baseGroup"),
		// 						BaseUserDN: to.Ptr("ou=baseUser"),
		// 						Domain: to.Ptr("domain1"),
		// 						PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
		// 						SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
		// 						SSL: to.Ptr(armavs.SSLEnumEnabled),
		// 				}},
		// 				Internet: to.Ptr(armavs.InternetEnumDisabled),
		// 				ManagementCluster: &armavs.ManagementCluster{
		// 					ClusterID: to.Ptr[int32](1),
		// 					ClusterSize: to.Ptr[int32](4),
		// 					Hosts: []*string{
		// 						to.Ptr("fakehost18.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost19.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost20.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost21.nyc1.kubernetes.center")},
		// 					},
		// 					Circuit: &armavs.Circuit{
		// 						ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 						ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
		// 						PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 						SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 					},
		// 					Endpoints: &armavs.Endpoints{
		// 						HcxCloudManager: to.Ptr("https://192.168.50.4/"),
		// 						NsxtManager: to.Ptr("https://192.168.50.3/"),
		// 						Vcsa: to.Ptr("https://192.168.50.2/"),
		// 					},
		// 					NetworkBlock: to.Ptr("192.168.48.0/22"),
		// 					ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armavs.SKU{
		// 					Name: to.Ptr("AV36"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

Example (PrivateCloudsListInSubscriptionStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription_Stretched.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateCloudsClient().NewListInSubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateCloudList = armavs.PrivateCloudList{
		// 	Value: []*armavs.PrivateCloud{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
		// 			Location: to.Ptr("eastus2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armavs.PrivateCloudProperties{
		// 				Availability: &armavs.AvailabilityProperties{
		// 					SecondaryZone: to.Ptr[int32](2),
		// 					Strategy: to.Ptr(armavs.AvailabilityStrategyDualZone),
		// 					Zone: to.Ptr[int32](1),
		// 				},
		// 				IdentitySources: []*armavs.IdentitySource{
		// 					{
		// 						Name: to.Ptr("group1"),
		// 						Alias: to.Ptr("groupAlias"),
		// 						BaseGroupDN: to.Ptr("ou=baseGroup"),
		// 						BaseUserDN: to.Ptr("ou=baseUser"),
		// 						Domain: to.Ptr("domain1"),
		// 						PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
		// 						SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
		// 						SSL: to.Ptr(armavs.SSLEnumEnabled),
		// 				}},
		// 				Internet: to.Ptr(armavs.InternetEnumDisabled),
		// 				ManagementCluster: &armavs.ManagementCluster{
		// 					ClusterID: to.Ptr[int32](1),
		// 					ClusterSize: to.Ptr[int32](4),
		// 					Hosts: []*string{
		// 						to.Ptr("fakehost18.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost19.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost20.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost21.nyc1.kubernetes.center")},
		// 					},
		// 					Circuit: &armavs.Circuit{
		// 						ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 						ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
		// 						PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 						SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 					},
		// 					Endpoints: &armavs.Endpoints{
		// 						HcxCloudManager: to.Ptr("https://192.168.50.4/"),
		// 						NsxtManager: to.Ptr("https://192.168.50.3/"),
		// 						Vcsa: to.Ptr("https://192.168.50.2/"),
		// 					},
		// 					NetworkBlock: to.Ptr("192.168.48.0/22"),
		// 					ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
		// 					SecondaryCircuit: &armavs.Circuit{
		// 						ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect2"),
		// 						ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er2/peerings/AzurePrivatePeering"),
		// 						PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 						SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 					},
		// 				},
		// 				SKU: &armavs.SKU{
		// 					Name: to.Ptr("AV36"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*PrivateCloudsClient) NewListPager added in v0.4.0

func (client *PrivateCloudsClient) NewListPager(resourceGroupName string, options *PrivateCloudsClientListOptions) *runtime.Pager[PrivateCloudsClientListResponse]

NewListPager - List private clouds in a resource group

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - PrivateCloudsClientListOptions contains the optional parameters for the PrivateCloudsClient.NewListPager method.
Example (PrivateCloudsList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateCloudsClient().NewListPager("group1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateCloudList = armavs.PrivateCloudList{
		// 	Value: []*armavs.PrivateCloud{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
		// 			Location: to.Ptr("eastus2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armavs.PrivateCloudProperties{
		// 				Availability: &armavs.AvailabilityProperties{
		// 					Strategy: to.Ptr(armavs.AvailabilityStrategySingleZone),
		// 					Zone: to.Ptr[int32](1),
		// 				},
		// 				IdentitySources: []*armavs.IdentitySource{
		// 					{
		// 						Name: to.Ptr("group1"),
		// 						Alias: to.Ptr("groupAlias"),
		// 						BaseGroupDN: to.Ptr("ou=baseGroup"),
		// 						BaseUserDN: to.Ptr("ou=baseUser"),
		// 						Domain: to.Ptr("domain1"),
		// 						PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
		// 						SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
		// 						SSL: to.Ptr(armavs.SSLEnumEnabled),
		// 				}},
		// 				Internet: to.Ptr(armavs.InternetEnumDisabled),
		// 				ManagementCluster: &armavs.ManagementCluster{
		// 					ClusterID: to.Ptr[int32](1),
		// 					ClusterSize: to.Ptr[int32](4),
		// 					Hosts: []*string{
		// 						to.Ptr("fakehost18.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost19.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost20.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost21.nyc1.kubernetes.center")},
		// 					},
		// 					Circuit: &armavs.Circuit{
		// 						ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 						ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
		// 						PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 						SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 					},
		// 					Endpoints: &armavs.Endpoints{
		// 						HcxCloudManager: to.Ptr("https://192.168.50.4/"),
		// 						NsxtManager: to.Ptr("https://192.168.50.3/"),
		// 						Vcsa: to.Ptr("https://192.168.50.2/"),
		// 					},
		// 					ExternalCloudLinks: []*string{
		// 						to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
		// 						NetworkBlock: to.Ptr("192.168.48.0/22"),
		// 						ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
		// 					},
		// 					SKU: &armavs.SKU{
		// 						Name: to.Ptr("AV36"),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

Example (PrivateCloudsListStretched)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List_Stretched.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateCloudsClient().NewListPager("group1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateCloudList = armavs.PrivateCloudList{
		// 	Value: []*armavs.PrivateCloud{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1"),
		// 			Location: to.Ptr("eastus2"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armavs.PrivateCloudProperties{
		// 				Availability: &armavs.AvailabilityProperties{
		// 					SecondaryZone: to.Ptr[int32](2),
		// 					Strategy: to.Ptr(armavs.AvailabilityStrategyDualZone),
		// 					Zone: to.Ptr[int32](1),
		// 				},
		// 				IdentitySources: []*armavs.IdentitySource{
		// 					{
		// 						Name: to.Ptr("group1"),
		// 						Alias: to.Ptr("groupAlias"),
		// 						BaseGroupDN: to.Ptr("ou=baseGroup"),
		// 						BaseUserDN: to.Ptr("ou=baseUser"),
		// 						Domain: to.Ptr("domain1"),
		// 						PrimaryServer: to.Ptr("ldaps://1.1.1.1:636/"),
		// 						SecondaryServer: to.Ptr("ldaps://1.1.1.2:636/"),
		// 						SSL: to.Ptr(armavs.SSLEnumEnabled),
		// 				}},
		// 				Internet: to.Ptr(armavs.InternetEnumDisabled),
		// 				ManagementCluster: &armavs.ManagementCluster{
		// 					ClusterID: to.Ptr[int32](1),
		// 					ClusterSize: to.Ptr[int32](4),
		// 					Hosts: []*string{
		// 						to.Ptr("fakehost18.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost19.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost20.nyc1.kubernetes.center"),
		// 						to.Ptr("fakehost21.nyc1.kubernetes.center")},
		// 					},
		// 					Circuit: &armavs.Circuit{
		// 						ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"),
		// 						ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"),
		// 						PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 						SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 					},
		// 					Endpoints: &armavs.Endpoints{
		// 						HcxCloudManager: to.Ptr("https://192.168.50.4/"),
		// 						NsxtManager: to.Ptr("https://192.168.50.3/"),
		// 						Vcsa: to.Ptr("https://192.168.50.2/"),
		// 					},
		// 					ExternalCloudLinks: []*string{
		// 						to.Ptr("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2")},
		// 						NetworkBlock: to.Ptr("192.168.48.0/22"),
		// 						ProvisioningState: to.Ptr(armavs.PrivateCloudProvisioningStateSucceeded),
		// 						SecondaryCircuit: &armavs.Circuit{
		// 							ExpressRouteID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect2"),
		// 							ExpressRoutePrivatePeeringID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er2/peerings/AzurePrivatePeering"),
		// 							PrimarySubnet: to.Ptr("192.168.53.0/30"),
		// 							SecondarySubnet: to.Ptr("192.168.53.4/30"),
		// 						},
		// 					},
		// 					SKU: &armavs.SKU{
		// 						Name: to.Ptr("AV36"),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type PrivateCloudsClientBeginCreateOrUpdateOptions added in v0.2.0

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

PrivateCloudsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateCloudsClient.BeginCreateOrUpdate method.

type PrivateCloudsClientBeginDeleteOptions added in v0.2.0

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

PrivateCloudsClientBeginDeleteOptions contains the optional parameters for the PrivateCloudsClient.BeginDelete method.

type PrivateCloudsClientBeginRotateNsxtPasswordOptions added in v0.2.0

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

PrivateCloudsClientBeginRotateNsxtPasswordOptions contains the optional parameters for the PrivateCloudsClient.BeginRotateNsxtPassword method.

type PrivateCloudsClientBeginRotateVcenterPasswordOptions added in v0.2.0

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

PrivateCloudsClientBeginRotateVcenterPasswordOptions contains the optional parameters for the PrivateCloudsClient.BeginRotateVcenterPassword method.

type PrivateCloudsClientBeginUpdateOptions added in v0.2.0

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

PrivateCloudsClientBeginUpdateOptions contains the optional parameters for the PrivateCloudsClient.BeginUpdate method.

type PrivateCloudsClientCreateOrUpdateResponse added in v0.2.0

type PrivateCloudsClientCreateOrUpdateResponse struct {
	// A private cloud resource
	PrivateCloud
}

PrivateCloudsClientCreateOrUpdateResponse contains the response from method PrivateCloudsClient.BeginCreateOrUpdate.

type PrivateCloudsClientDeleteResponse added in v0.2.0

type PrivateCloudsClientDeleteResponse struct {
}

PrivateCloudsClientDeleteResponse contains the response from method PrivateCloudsClient.BeginDelete.

type PrivateCloudsClientGetOptions added in v0.2.0

type PrivateCloudsClientGetOptions struct {
}

PrivateCloudsClientGetOptions contains the optional parameters for the PrivateCloudsClient.Get method.

type PrivateCloudsClientGetResponse added in v0.2.0

type PrivateCloudsClientGetResponse struct {
	// A private cloud resource
	PrivateCloud
}

PrivateCloudsClientGetResponse contains the response from method PrivateCloudsClient.Get.

type PrivateCloudsClientListAdminCredentialsOptions added in v0.2.0

type PrivateCloudsClientListAdminCredentialsOptions struct {
}

PrivateCloudsClientListAdminCredentialsOptions contains the optional parameters for the PrivateCloudsClient.ListAdminCredentials method.

type PrivateCloudsClientListAdminCredentialsResponse added in v0.2.0

type PrivateCloudsClientListAdminCredentialsResponse struct {
	// Administrative credentials for accessing vCenter and NSX-T
	AdminCredentials
}

PrivateCloudsClientListAdminCredentialsResponse contains the response from method PrivateCloudsClient.ListAdminCredentials.

type PrivateCloudsClientListInSubscriptionOptions added in v0.2.0

type PrivateCloudsClientListInSubscriptionOptions struct {
}

PrivateCloudsClientListInSubscriptionOptions contains the optional parameters for the PrivateCloudsClient.NewListInSubscriptionPager method.

type PrivateCloudsClientListInSubscriptionResponse added in v0.2.0

type PrivateCloudsClientListInSubscriptionResponse struct {
	// A paged list of private clouds
	PrivateCloudList
}

PrivateCloudsClientListInSubscriptionResponse contains the response from method PrivateCloudsClient.NewListInSubscriptionPager.

type PrivateCloudsClientListOptions added in v0.2.0

type PrivateCloudsClientListOptions struct {
}

PrivateCloudsClientListOptions contains the optional parameters for the PrivateCloudsClient.NewListPager method.

type PrivateCloudsClientListResponse added in v0.2.0

type PrivateCloudsClientListResponse struct {
	// A paged list of private clouds
	PrivateCloudList
}

PrivateCloudsClientListResponse contains the response from method PrivateCloudsClient.NewListPager.

type PrivateCloudsClientRotateNsxtPasswordResponse added in v0.2.0

type PrivateCloudsClientRotateNsxtPasswordResponse struct {
}

PrivateCloudsClientRotateNsxtPasswordResponse contains the response from method PrivateCloudsClient.BeginRotateNsxtPassword.

type PrivateCloudsClientRotateVcenterPasswordResponse added in v0.2.0

type PrivateCloudsClientRotateVcenterPasswordResponse struct {
}

PrivateCloudsClientRotateVcenterPasswordResponse contains the response from method PrivateCloudsClient.BeginRotateVcenterPassword.

type PrivateCloudsClientUpdateResponse added in v0.2.0

type PrivateCloudsClientUpdateResponse struct {
	// A private cloud resource
	PrivateCloud
}

PrivateCloudsClientUpdateResponse contains the response from method PrivateCloudsClient.BeginUpdate.

type Quota

type Quota struct {
	// READ-ONLY; Remaining hosts quota by sku type
	HostsRemaining map[string]*int32

	// READ-ONLY; Host quota is active for current subscription
	QuotaEnabled *QuotaEnabled
}

Quota - Subscription quotas

func (Quota) MarshalJSON

func (q Quota) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Quota.

func (*Quota) UnmarshalJSON added in v1.1.0

func (q *Quota) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Quota.

type QuotaEnabled

type QuotaEnabled string

QuotaEnabled - Host quota is active for current subscription

const (
	QuotaEnabledDisabled QuotaEnabled = "Disabled"
	QuotaEnabledEnabled  QuotaEnabled = "Enabled"
)

func PossibleQuotaEnabledValues

func PossibleQuotaEnabledValues() []QuotaEnabled

PossibleQuotaEnabledValues returns the possible values for the QuotaEnabled const type.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. The type 'None' will remove any identities from the Private Cloud.

const (
	ResourceIdentityTypeNone           ResourceIdentityType = "None"
	ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type SKU

type SKU struct {
	// REQUIRED; The name of the SKU.
	Name *string
}

SKU - The resource model definition representing SKU

func (SKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SSLEnum

type SSLEnum string

SSLEnum - Protect LDAP communication using SSL certificate (LDAPS)

const (
	SSLEnumDisabled SSLEnum = "Disabled"
	SSLEnumEnabled  SSLEnum = "Enabled"
)

func PossibleSSLEnumValues

func PossibleSSLEnumValues() []SSLEnum

PossibleSSLEnumValues returns the possible values for the SSLEnum const type.

type ScriptCmdlet

type ScriptCmdlet struct {
	// The properties of a script cmdlet resource
	Properties *ScriptCmdletProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ScriptCmdlet - A cmdlet available for script execution

func (ScriptCmdlet) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptCmdlet.

func (*ScriptCmdlet) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptCmdlet.

type ScriptCmdletProperties

type ScriptCmdletProperties struct {
	// READ-ONLY; Description of the scripts functionality
	Description *string

	// READ-ONLY; Parameters the script will accept
	Parameters []*ScriptParameter

	// READ-ONLY; Recommended time limit for execution
	Timeout *string
}

ScriptCmdletProperties - Properties of a pre-canned script

func (ScriptCmdletProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptCmdletProperties.

func (*ScriptCmdletProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptCmdletProperties.

type ScriptCmdletsClient

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

ScriptCmdletsClient contains the methods for the ScriptCmdlets group. Don't use this type directly, use NewScriptCmdletsClient() instead.

func NewScriptCmdletsClient

func NewScriptCmdletsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptCmdletsClient, error)

NewScriptCmdletsClient creates a new instance of ScriptCmdletsClient 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 (*ScriptCmdletsClient) Get

func (client *ScriptCmdletsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, scriptPackageName string, scriptCmdletName string, options *ScriptCmdletsClientGetOptions) (ScriptCmdletsClientGetResponse, error)

Get - Return information about a script cmdlet resource in a specific package on a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptPackageName - Name of the script package in the private cloud
  • scriptCmdletName - Name of the script cmdlet resource in the script package in the private cloud
  • options - ScriptCmdletsClientGetOptions contains the optional parameters for the ScriptCmdletsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScriptCmdletsClient().Get(ctx, "group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScriptCmdlet = armavs.ScriptCmdlet{
	// 	Name: to.Ptr("New-ExternalSsoDomain"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages/scriptCmdlets"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/package@1.0.2/scriptCmdlets/New-ExternalSsoDomain"),
	// 	Properties: &armavs.ScriptCmdletProperties{
	// 		Description: to.Ptr("Add an external Sso domain to their vCenter"),
	// 		Parameters: []*armavs.ScriptParameter{
	// 			{
	// 				Name: to.Ptr("DomainName"),
	// 				Type: to.Ptr(armavs.ScriptParameterTypesString),
	// 				Description: to.Ptr("Domain name of the Server"),
	// 				Optional: to.Ptr(armavs.OptionalParamEnumRequired),
	// 				Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
	// 			},
	// 			{
	// 				Name: to.Ptr("BaseUserDN"),
	// 				Type: to.Ptr(armavs.ScriptParameterTypesString),
	// 				Description: to.Ptr("Base User DN of the Server"),
	// 				Optional: to.Ptr(armavs.OptionalParamEnumRequired),
	// 				Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
	// 			},
	// 			{
	// 				Name: to.Ptr("Password"),
	// 				Type: to.Ptr(armavs.ScriptParameterTypesSecureString),
	// 				Description: to.Ptr("Password for authenticating to the server"),
	// 				Optional: to.Ptr(armavs.OptionalParamEnumRequired),
	// 				Visibility: to.Ptr(armavs.VisibilityParameterEnumHidden),
	// 		}},
	// 		Timeout: to.Ptr("P0Y0M0DT0H60M0S"),
	// 	},
	// }
}
Output:

func (*ScriptCmdletsClient) NewListPager added in v0.4.0

func (client *ScriptCmdletsClient) NewListPager(resourceGroupName string, privateCloudName string, scriptPackageName string, options *ScriptCmdletsClientListOptions) *runtime.Pager[ScriptCmdletsClientListResponse]

NewListPager - List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptPackageName - Name of the script package in the private cloud
  • options - ScriptCmdletsClientListOptions contains the optional parameters for the ScriptCmdletsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewScriptCmdletsClient().NewListPager("group1", "cloud1", "package@1.0.2", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ScriptCmdletsList = armavs.ScriptCmdletsList{
		// 	Value: []*armavs.ScriptCmdlet{
		// 		{
		// 			Name: to.Ptr("Set-AvsStoragePolicy"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages/scriptCmdlets"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/package@1.0.2/scriptCmdlets/Set-AvsStoragePolicy"),
		// 			Properties: &armavs.ScriptCmdletProperties{
		// 				Description: to.Ptr("Allow user to set the storage policy of the specified VM"),
		// 				Parameters: []*armavs.ScriptParameter{
		// 					{
		// 						Name: to.Ptr("VM"),
		// 						Type: to.Ptr(armavs.ScriptParameterTypesString),
		// 						Description: to.Ptr("VM to set the storage policy on"),
		// 						Optional: to.Ptr(armavs.OptionalParamEnumRequired),
		// 						Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
		// 					},
		// 					{
		// 						Name: to.Ptr("StoragePolicyName"),
		// 						Type: to.Ptr(armavs.ScriptParameterTypesString),
		// 						Description: to.Ptr("Name of the storage policy to set"),
		// 						Optional: to.Ptr(armavs.OptionalParamEnumRequired),
		// 						Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
		// 				}},
		// 				Timeout: to.Ptr("P0Y0M0DT0H60M0S"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("New-ExternalSsoDomain"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages/scriptCmdlets"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/package@1.0.2/scriptCmdlets/New-ExternalSsoDomain"),
		// 			Properties: &armavs.ScriptCmdletProperties{
		// 				Description: to.Ptr("Add an external Sso domain to their vCenter"),
		// 				Parameters: []*armavs.ScriptParameter{
		// 					{
		// 						Name: to.Ptr("DomainName"),
		// 						Type: to.Ptr(armavs.ScriptParameterTypesString),
		// 						Description: to.Ptr("Domain name of the Server"),
		// 						Optional: to.Ptr(armavs.OptionalParamEnumRequired),
		// 						Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
		// 					},
		// 					{
		// 						Name: to.Ptr("BaseUserDN"),
		// 						Type: to.Ptr(armavs.ScriptParameterTypesString),
		// 						Description: to.Ptr("Base User DN of the Server"),
		// 						Optional: to.Ptr(armavs.OptionalParamEnumRequired),
		// 						Visibility: to.Ptr(armavs.VisibilityParameterEnumVisible),
		// 					},
		// 					{
		// 						Name: to.Ptr("Password"),
		// 						Type: to.Ptr(armavs.ScriptParameterTypesSecureString),
		// 						Description: to.Ptr("Password for authenticating to the server"),
		// 						Optional: to.Ptr(armavs.OptionalParamEnumRequired),
		// 						Visibility: to.Ptr(armavs.VisibilityParameterEnumHidden),
		// 				}},
		// 				Timeout: to.Ptr("P0Y0M0DT0H60M0S"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ScriptCmdletsClientGetOptions added in v0.2.0

type ScriptCmdletsClientGetOptions struct {
}

ScriptCmdletsClientGetOptions contains the optional parameters for the ScriptCmdletsClient.Get method.

type ScriptCmdletsClientGetResponse added in v0.2.0

type ScriptCmdletsClientGetResponse struct {
	// A cmdlet available for script execution
	ScriptCmdlet
}

ScriptCmdletsClientGetResponse contains the response from method ScriptCmdletsClient.Get.

type ScriptCmdletsClientListOptions added in v0.2.0

type ScriptCmdletsClientListOptions struct {
}

ScriptCmdletsClientListOptions contains the optional parameters for the ScriptCmdletsClient.NewListPager method.

type ScriptCmdletsClientListResponse added in v0.2.0

type ScriptCmdletsClientListResponse struct {
	// Pageable list of scripts/cmdlets
	ScriptCmdletsList
}

ScriptCmdletsClientListResponse contains the response from method ScriptCmdletsClient.NewListPager.

type ScriptCmdletsList

type ScriptCmdletsList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; List of scripts
	Value []*ScriptCmdlet
}

ScriptCmdletsList - Pageable list of scripts/cmdlets

func (ScriptCmdletsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptCmdletsList.

func (*ScriptCmdletsList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptCmdletsList.

type ScriptExecution

type ScriptExecution struct {
	// The properties of a script execution resource
	Properties *ScriptExecutionProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ScriptExecution - An instance of a script executed by a user - custom or AVS

func (ScriptExecution) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptExecution.

func (*ScriptExecution) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecution.

type ScriptExecutionParameter

type ScriptExecutionParameter struct {
	// REQUIRED; The parameter name
	Name *string

	// REQUIRED; The type of execution parameter
	Type *ScriptExecutionParameterType
}

ScriptExecutionParameter - The arguments passed in to the execution

func (*ScriptExecutionParameter) GetScriptExecutionParameter

func (s *ScriptExecutionParameter) GetScriptExecutionParameter() *ScriptExecutionParameter

GetScriptExecutionParameter implements the ScriptExecutionParameterClassification interface for type ScriptExecutionParameter.

func (ScriptExecutionParameter) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ScriptExecutionParameter.

func (*ScriptExecutionParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecutionParameter.

type ScriptExecutionParameterClassification

type ScriptExecutionParameterClassification interface {
	// GetScriptExecutionParameter returns the ScriptExecutionParameter content of the underlying type.
	GetScriptExecutionParameter() *ScriptExecutionParameter
}

ScriptExecutionParameterClassification provides polymorphic access to related types. Call the interface's GetScriptExecutionParameter() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *PSCredentialExecutionParameter, *ScriptExecutionParameter, *ScriptSecureStringExecutionParameter, *ScriptStringExecutionParameter

type ScriptExecutionParameterType

type ScriptExecutionParameterType string

ScriptExecutionParameterType - The type of execution parameter

const (
	ScriptExecutionParameterTypeCredential  ScriptExecutionParameterType = "Credential"
	ScriptExecutionParameterTypeSecureValue ScriptExecutionParameterType = "SecureValue"
	ScriptExecutionParameterTypeValue       ScriptExecutionParameterType = "Value"
)

func PossibleScriptExecutionParameterTypeValues

func PossibleScriptExecutionParameterTypeValues() []ScriptExecutionParameterType

PossibleScriptExecutionParameterTypeValues returns the possible values for the ScriptExecutionParameterType const type.

type ScriptExecutionProperties

type ScriptExecutionProperties struct {
	// REQUIRED; Time limit for execution
	Timeout *string

	// Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
	FailureReason *string

	// Parameters that will be hidden/not visible to ARM, such as passwords and credentials
	HiddenParameters []ScriptExecutionParameterClassification

	// User-defined dictionary.
	NamedOutputs map[string]any

	// Standard output stream from the powershell execution
	Output []*string

	// Parameters the script will accept
	Parameters []ScriptExecutionParameterClassification

	// Time to live for the resource. If not provided, will be available for 60 days
	Retention *string

	// A reference to the script cmdlet resource if user is running a AVS script
	ScriptCmdletID *string

	// READ-ONLY; Standard error output stream from the powershell execution
	Errors []*string

	// READ-ONLY; Time the script execution was finished
	FinishedAt *time.Time

	// READ-ONLY; Standard information out stream from the powershell execution
	Information []*string

	// READ-ONLY; The state of the script execution resource
	ProvisioningState *ScriptExecutionProvisioningState

	// READ-ONLY; Time the script execution was started
	StartedAt *time.Time

	// READ-ONLY; Time the script execution was submitted
	SubmittedAt *time.Time

	// READ-ONLY; Standard warning out stream from the powershell execution
	Warnings []*string
}

ScriptExecutionProperties - Properties of a user-invoked script

func (ScriptExecutionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptExecutionProperties.

func (*ScriptExecutionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecutionProperties.

type ScriptExecutionProvisioningState

type ScriptExecutionProvisioningState string

ScriptExecutionProvisioningState - The state of the script execution resource

const (
	ScriptExecutionProvisioningStateCanceled   ScriptExecutionProvisioningState = "Canceled"
	ScriptExecutionProvisioningStateCancelled  ScriptExecutionProvisioningState = "Cancelled"
	ScriptExecutionProvisioningStateCancelling ScriptExecutionProvisioningState = "Cancelling"
	ScriptExecutionProvisioningStateDeleting   ScriptExecutionProvisioningState = "Deleting"
	ScriptExecutionProvisioningStateFailed     ScriptExecutionProvisioningState = "Failed"
	ScriptExecutionProvisioningStatePending    ScriptExecutionProvisioningState = "Pending"
	ScriptExecutionProvisioningStateRunning    ScriptExecutionProvisioningState = "Running"
	ScriptExecutionProvisioningStateSucceeded  ScriptExecutionProvisioningState = "Succeeded"
)

func PossibleScriptExecutionProvisioningStateValues

func PossibleScriptExecutionProvisioningStateValues() []ScriptExecutionProvisioningState

PossibleScriptExecutionProvisioningStateValues returns the possible values for the ScriptExecutionProvisioningState const type.

type ScriptExecutionsClient

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

ScriptExecutionsClient contains the methods for the ScriptExecutions group. Don't use this type directly, use NewScriptExecutionsClient() instead.

func NewScriptExecutionsClient

func NewScriptExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptExecutionsClient, error)

NewScriptExecutionsClient creates a new instance of ScriptExecutionsClient 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 (*ScriptExecutionsClient) BeginCreateOrUpdate

func (client *ScriptExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, scriptExecutionName string, scriptExecution ScriptExecution, options *ScriptExecutionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ScriptExecutionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a script execution in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - The name of the private cloud.
  • scriptExecutionName - Name of the user-invoked script execution resource
  • scriptExecution - A script running in the private cloud
  • options - ScriptExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptExecutionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_CreateOrUpdate.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewScriptExecutionsClient().BeginCreateOrUpdate(ctx, "group1", "cloud1", "addSsoServer", armavs.ScriptExecution{
		Properties: &armavs.ScriptExecutionProperties{
			HiddenParameters: []armavs.ScriptExecutionParameterClassification{
				&armavs.ScriptSecureStringExecutionParameter{
					Name:        to.Ptr("Password"),
					Type:        to.Ptr(armavs.ScriptExecutionParameterTypeSecureValue),
					SecureValue: to.Ptr("PlaceholderPassword"),
				}},
			Parameters: []armavs.ScriptExecutionParameterClassification{
				&armavs.ScriptStringExecutionParameter{
					Name:  to.Ptr("DomainName"),
					Type:  to.Ptr(armavs.ScriptExecutionParameterTypeValue),
					Value: to.Ptr("placeholderDomain.local"),
				},
				&armavs.ScriptStringExecutionParameter{
					Name:  to.Ptr("BaseUserDN"),
					Type:  to.Ptr(armavs.ScriptExecutionParameterTypeValue),
					Value: to.Ptr("DC=placeholder, DC=placeholder"),
				}},
			Retention:      to.Ptr("P0Y0M60DT0H60M60S"),
			ScriptCmdletID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
			Timeout:        to.Ptr("P0Y0M0DT0H60M60S"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScriptExecution = armavs.ScriptExecution{
	// 	Name: to.Ptr("addSsoServer"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/scriptExecutions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer"),
	// 	Properties: &armavs.ScriptExecutionProperties{
	// 		FailureReason: to.Ptr("vCenter failed to connect to the external server"),
	
Output:

func (*ScriptExecutionsClient) BeginDelete

func (client *ScriptExecutionsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateCloudName string, scriptExecutionName string, options *ScriptExecutionsClientBeginDeleteOptions) (*runtime.Poller[ScriptExecutionsClientDeleteResponse], error)

BeginDelete - Cancel a ScriptExecution in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptExecutionName - Name of the user-invoked script execution resource
  • options - ScriptExecutionsClientBeginDeleteOptions contains the optional parameters for the ScriptExecutionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewScriptExecutionsClient().BeginDelete(ctx, "group1", "cloud1", "addSsoServer", 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 (*ScriptExecutionsClient) Get

func (client *ScriptExecutionsClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, scriptExecutionName string, options *ScriptExecutionsClientGetOptions) (ScriptExecutionsClientGetResponse, error)

Get - Get an script execution by name in a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptExecutionName - Name of the user-invoked script execution resource
  • options - ScriptExecutionsClientGetOptions contains the optional parameters for the ScriptExecutionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScriptExecutionsClient().Get(ctx, "group1", "cloud1", "addSsoServer", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScriptExecution = armavs.ScriptExecution{
	// 	Name: to.Ptr("addSsoServer"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/scriptExecutions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer"),
	// 	Properties: &armavs.ScriptExecutionProperties{
	// 		FailureReason: to.Ptr("vCenter failed to connect to the external server"),
	// 		FinishedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T18:32:28.000Z"); return t}()),
	// 		Parameters: []armavs.ScriptExecutionParameterClassification{
	// 			&armavs.ScriptStringExecutionParameter{
	// 				Name: to.Ptr("DomainName"),
	// 				Type: to.Ptr(armavs.ScriptExecutionParameterTypeValue),
	// 				Value: to.Ptr("placeholderDomain.local"),
	// 			},
	// 			&armavs.ScriptStringExecutionParameter{
	// 				Name: to.Ptr("BaseUserDN"),
	// 				Type: to.Ptr(armavs.ScriptExecutionParameterTypeValue),
	// 				Value: to.Ptr("DC=placeholder, DC=placeholder"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armavs.ScriptExecutionProvisioningStateSucceeded),
	// 		Retention: to.Ptr("P0Y0M60DT0H60M60S"),
	// 		ScriptCmdletID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
	// 		StartedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T17:32:28.000Z"); return t}()),
	// 		SubmittedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T17:31:28.000Z"); return t}()),
	// 		Timeout: to.Ptr("P0Y0M0DT0H60M60S"),
	// 	},
	// }
}
Output:

func (*ScriptExecutionsClient) GetExecutionLogs

func (client *ScriptExecutionsClient) GetExecutionLogs(ctx context.Context, resourceGroupName string, privateCloudName string, scriptExecutionName string, options *ScriptExecutionsClientGetExecutionLogsOptions) (ScriptExecutionsClientGetExecutionLogsResponse, error)

GetExecutionLogs - Return the logs for a script execution resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptExecutionName - Name of the user-invoked script execution resource
  • options - ScriptExecutionsClientGetExecutionLogsOptions contains the optional parameters for the ScriptExecutionsClient.GetExecutionLogs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_GetExecutionLogs.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScriptExecutionsClient().GetExecutionLogs(ctx, "group1", "cloud1", "addSsoServer", &armavs.ScriptExecutionsClientGetExecutionLogsOptions{ScriptOutputStreamType: []*armavs.ScriptOutputStreamType{
		to.Ptr(armavs.ScriptOutputStreamTypeInformation),
		to.Ptr(armavs.ScriptOutputStreamType("Warnings")),
		to.Ptr(armavs.ScriptOutputStreamType("Errors")),
		to.Ptr(armavs.ScriptOutputStreamTypeOutput)},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScriptExecution = armavs.ScriptExecution{
	// 	Name: to.Ptr("addSsoServer"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer"),
	// 	Properties: &armavs.ScriptExecutionProperties{
	// 		Errors: []*string{
	// 			to.Ptr("Most recent error output"),
	// 			to.Ptr("Second most error recent output")},
	// 			Information: []*string{
	// 				to.Ptr("Most recent information output"),
	// 				to.Ptr("Second most recent information output")},
	
Output:

func (*ScriptExecutionsClient) NewListPager added in v0.4.0

func (client *ScriptExecutionsClient) NewListPager(resourceGroupName string, privateCloudName string, options *ScriptExecutionsClientListOptions) *runtime.Pager[ScriptExecutionsClientListResponse]

NewListPager - List script executions in a private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - ScriptExecutionsClientListOptions contains the optional parameters for the ScriptExecutionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewScriptExecutionsClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ScriptExecutionsList = armavs.ScriptExecutionsList{
		// 	Value: []*armavs.ScriptExecution{
		// 		{
		// 			Name: to.Ptr("addSsoServer"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/scriptExecutions"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer"),
		// 			Properties: &armavs.ScriptExecutionProperties{
		// 				FailureReason: to.Ptr("vCenter failed to connect to the external server"),
		// 				FinishedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T18:32:28.000Z"); return t}()),
		// 				Parameters: []armavs.ScriptExecutionParameterClassification{
		// 					&armavs.ScriptStringExecutionParameter{
		// 						Name: to.Ptr("DomainName"),
		// 						Type: to.Ptr(armavs.ScriptExecutionParameterTypeValue),
		// 						Value: to.Ptr("placeholderDomain.local"),
		// 					},
		// 					&armavs.ScriptStringExecutionParameter{
		// 						Name: to.Ptr("BaseUserDN"),
		// 						Type: to.Ptr(armavs.ScriptExecutionParameterTypeValue),
		// 						Value: to.Ptr("DC=placeholder, DC=placeholder"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armavs.ScriptExecutionProvisioningStateSucceeded),
		// 				Retention: to.Ptr("P0Y0M60DT0H60M60S"),
		// 				ScriptCmdletID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS:1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
		// 				StartedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T17:32:28.000Z"); return t}()),
		// 				SubmittedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-21T17:31:28.000Z"); return t}()),
		// 				Timeout: to.Ptr("P0Y0M0DT0H60M60S"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ScriptExecutionsClientBeginCreateOrUpdateOptions added in v0.2.0

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

ScriptExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptExecutionsClient.BeginCreateOrUpdate method.

type ScriptExecutionsClientBeginDeleteOptions added in v0.2.0

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

ScriptExecutionsClientBeginDeleteOptions contains the optional parameters for the ScriptExecutionsClient.BeginDelete method.

type ScriptExecutionsClientCreateOrUpdateResponse added in v0.2.0

type ScriptExecutionsClientCreateOrUpdateResponse struct {
	// An instance of a script executed by a user - custom or AVS
	ScriptExecution
}

ScriptExecutionsClientCreateOrUpdateResponse contains the response from method ScriptExecutionsClient.BeginCreateOrUpdate.

type ScriptExecutionsClientDeleteResponse added in v0.2.0

type ScriptExecutionsClientDeleteResponse struct {
}

ScriptExecutionsClientDeleteResponse contains the response from method ScriptExecutionsClient.BeginDelete.

type ScriptExecutionsClientGetExecutionLogsOptions added in v0.2.0

type ScriptExecutionsClientGetExecutionLogsOptions struct {
	// Name of the desired output stream to return. If not provided, will return all. An empty array will return nothing
	ScriptOutputStreamType []*ScriptOutputStreamType
}

ScriptExecutionsClientGetExecutionLogsOptions contains the optional parameters for the ScriptExecutionsClient.GetExecutionLogs method.

type ScriptExecutionsClientGetExecutionLogsResponse added in v0.2.0

type ScriptExecutionsClientGetExecutionLogsResponse struct {
	// An instance of a script executed by a user - custom or AVS
	ScriptExecution
}

ScriptExecutionsClientGetExecutionLogsResponse contains the response from method ScriptExecutionsClient.GetExecutionLogs.

type ScriptExecutionsClientGetOptions added in v0.2.0

type ScriptExecutionsClientGetOptions struct {
}

ScriptExecutionsClientGetOptions contains the optional parameters for the ScriptExecutionsClient.Get method.

type ScriptExecutionsClientGetResponse added in v0.2.0

type ScriptExecutionsClientGetResponse struct {
	// An instance of a script executed by a user - custom or AVS
	ScriptExecution
}

ScriptExecutionsClientGetResponse contains the response from method ScriptExecutionsClient.Get.

type ScriptExecutionsClientListOptions added in v0.2.0

type ScriptExecutionsClientListOptions struct {
}

ScriptExecutionsClientListOptions contains the optional parameters for the ScriptExecutionsClient.NewListPager method.

type ScriptExecutionsClientListResponse added in v0.2.0

type ScriptExecutionsClientListResponse struct {
	// Pageable list of script executions
	ScriptExecutionsList
}

ScriptExecutionsClientListResponse contains the response from method ScriptExecutionsClient.NewListPager.

type ScriptExecutionsList

type ScriptExecutionsList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; List of scripts
	Value []*ScriptExecution
}

ScriptExecutionsList - Pageable list of script executions

func (ScriptExecutionsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptExecutionsList.

func (*ScriptExecutionsList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecutionsList.

type ScriptOutputStreamType

type ScriptOutputStreamType string
const (
	ScriptOutputStreamTypeError       ScriptOutputStreamType = "Error"
	ScriptOutputStreamTypeInformation ScriptOutputStreamType = "Information"
	ScriptOutputStreamTypeOutput      ScriptOutputStreamType = "Output"
	ScriptOutputStreamTypeWarning     ScriptOutputStreamType = "Warning"
)

func PossibleScriptOutputStreamTypeValues

func PossibleScriptOutputStreamTypeValues() []ScriptOutputStreamType

PossibleScriptOutputStreamTypeValues returns the possible values for the ScriptOutputStreamType const type.

type ScriptPackage

type ScriptPackage struct {
	// ScriptPackage resource properties
	Properties *ScriptPackageProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ScriptPackage - Script Package resources available for execution

func (ScriptPackage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptPackage.

func (*ScriptPackage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptPackage.

type ScriptPackageProperties

type ScriptPackageProperties struct {
	// READ-ONLY; Company that created and supports the package
	Company *string

	// READ-ONLY; User friendly description of the package
	Description *string

	// READ-ONLY; Link to support by the package vendor
	URI *string

	// READ-ONLY; Module version
	Version *string
}

ScriptPackageProperties - Properties of a Script Package subresource

func (ScriptPackageProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ScriptPackageProperties.

func (*ScriptPackageProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptPackageProperties.

type ScriptPackagesClient

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

ScriptPackagesClient contains the methods for the ScriptPackages group. Don't use this type directly, use NewScriptPackagesClient() instead.

func NewScriptPackagesClient

func NewScriptPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptPackagesClient, error)

NewScriptPackagesClient creates a new instance of ScriptPackagesClient 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 (*ScriptPackagesClient) Get

func (client *ScriptPackagesClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, scriptPackageName string, options *ScriptPackagesClientGetOptions) (ScriptPackagesClientGetResponse, error)

Get - Get a script package available to run on a private cloud If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • scriptPackageName - Name of the script package in the private cloud
  • options - ScriptPackagesClientGetOptions contains the optional parameters for the ScriptPackagesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewScriptPackagesClient().Get(ctx, "group1", "cloud1", "Microsoft.AVS.Management@3.0.48", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ScriptPackage = armavs.ScriptPackage{
	// 	Name: to.Ptr("Microsoft.AVS.Management@3.0.48"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/Microsoft.AVS.Management@3.0.48"),
	// 	Properties: &armavs.ScriptPackageProperties{
	// 		Description: to.Ptr("Various cmdlets for elevated access to Private Cloud administrative functions"),
	// 		Company: to.Ptr("Microsoft"),
	// 		URI: to.Ptr("https://microsoft.com"),
	// 		Version: to.Ptr("3.0.48"),
	// 	},
	// }
}
Output:

func (*ScriptPackagesClient) NewListPager added in v0.4.0

func (client *ScriptPackagesClient) NewListPager(resourceGroupName string, privateCloudName string, options *ScriptPackagesClientListOptions) *runtime.Pager[ScriptPackagesClientListResponse]

NewListPager - List script packages available to run on the private cloud

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - ScriptPackagesClientListOptions contains the optional parameters for the ScriptPackagesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewScriptPackagesClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ScriptPackagesList = armavs.ScriptPackagesList{
		// 	Value: []*armavs.ScriptPackage{
		// 		{
		// 			Name: to.Ptr("Microsoft.AVS.Management@3.0.48"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/Microsoft.AVS.Management@3.0.48"),
		// 			Properties: &armavs.ScriptPackageProperties{
		// 				Description: to.Ptr("Various cmdlets for elevated access to Private Cloud administrative functions"),
		// 				Company: to.Ptr("Microsoft"),
		// 				URI: to.Ptr("https://microsoft.com"),
		// 				Version: to.Ptr("3.0.48"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("JSDR.Configuration@1.0.0"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/scriptPackages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/JSDR.Configuration@1.0.0"),
		// 			Properties: &armavs.ScriptPackageProperties{
		// 				Description: to.Ptr("Various cmdlets by Jetstream for Private Cloud administration"),
		// 				Company: to.Ptr("Jetstream Software"),
		// 				URI: to.Ptr("https://www.jetstreamsoft.com/about/support/"),
		// 				Version: to.Ptr("1.0.0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ScriptPackagesClientGetOptions added in v0.2.0

type ScriptPackagesClientGetOptions struct {
}

ScriptPackagesClientGetOptions contains the optional parameters for the ScriptPackagesClient.Get method.

type ScriptPackagesClientGetResponse added in v0.2.0

type ScriptPackagesClientGetResponse struct {
	// Script Package resources available for execution
	ScriptPackage
}

ScriptPackagesClientGetResponse contains the response from method ScriptPackagesClient.Get.

type ScriptPackagesClientListOptions added in v0.2.0

type ScriptPackagesClientListOptions struct {
}

ScriptPackagesClientListOptions contains the optional parameters for the ScriptPackagesClient.NewListPager method.

type ScriptPackagesClientListResponse added in v0.2.0

type ScriptPackagesClientListResponse struct {
	// A list of the available script packages
	ScriptPackagesList
}

ScriptPackagesClientListResponse contains the response from method ScriptPackagesClient.NewListPager.

type ScriptPackagesList

type ScriptPackagesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; List of script package resources
	Value []*ScriptPackage
}

ScriptPackagesList - A list of the available script packages

func (ScriptPackagesList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptPackagesList.

func (*ScriptPackagesList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptPackagesList.

type ScriptParameter

type ScriptParameter struct {
	// The parameter name that the script will expect a parameter value for
	Name *string

	// READ-ONLY; User friendly description of the parameter
	Description *string

	// READ-ONLY; Is this parameter required or optional
	Optional *OptionalParamEnum

	// READ-ONLY; The type of parameter the script is expecting. psCredential is a PSCredentialObject
	Type *ScriptParameterTypes

	// READ-ONLY; Should this parameter be visible to arm and passed in the parameters argument when executing
	Visibility *VisibilityParameterEnum
}

ScriptParameter - An parameter that the script will accept

func (ScriptParameter) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ScriptParameter.

func (*ScriptParameter) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptParameter.

type ScriptParameterTypes

type ScriptParameterTypes string

ScriptParameterTypes - The type of parameter the script is expecting. psCredential is a PSCredentialObject

const (
	ScriptParameterTypesBool         ScriptParameterTypes = "Bool"
	ScriptParameterTypesCredential   ScriptParameterTypes = "Credential"
	ScriptParameterTypesFloat        ScriptParameterTypes = "Float"
	ScriptParameterTypesInt          ScriptParameterTypes = "Int"
	ScriptParameterTypesSecureString ScriptParameterTypes = "SecureString"
	ScriptParameterTypesString       ScriptParameterTypes = "String"
)

func PossibleScriptParameterTypesValues

func PossibleScriptParameterTypesValues() []ScriptParameterTypes

PossibleScriptParameterTypesValues returns the possible values for the ScriptParameterTypes const type.

type ScriptSecureStringExecutionParameter

type ScriptSecureStringExecutionParameter struct {
	// REQUIRED; The parameter name
	Name *string

	// REQUIRED; The type of execution parameter
	Type *ScriptExecutionParameterType

	// A secure value for the passed parameter, not to be stored in logs
	SecureValue *string
}

ScriptSecureStringExecutionParameter - a plain text value execution parameter

func (*ScriptSecureStringExecutionParameter) GetScriptExecutionParameter added in v0.2.0

func (s *ScriptSecureStringExecutionParameter) GetScriptExecutionParameter() *ScriptExecutionParameter

GetScriptExecutionParameter implements the ScriptExecutionParameterClassification interface for type ScriptSecureStringExecutionParameter.

func (ScriptSecureStringExecutionParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptSecureStringExecutionParameter.

func (*ScriptSecureStringExecutionParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptSecureStringExecutionParameter.

type ScriptStringExecutionParameter

type ScriptStringExecutionParameter struct {
	// REQUIRED; The parameter name
	Name *string

	// REQUIRED; The type of execution parameter
	Type *ScriptExecutionParameterType

	// The value for the passed parameter
	Value *string
}

ScriptStringExecutionParameter - a plain text value execution parameter

func (*ScriptStringExecutionParameter) GetScriptExecutionParameter added in v0.2.0

func (s *ScriptStringExecutionParameter) GetScriptExecutionParameter() *ScriptExecutionParameter

GetScriptExecutionParameter implements the ScriptExecutionParameterClassification interface for type ScriptStringExecutionParameter.

func (ScriptStringExecutionParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptStringExecutionParameter.

func (*ScriptStringExecutionParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptStringExecutionParameter.

type SegmentStatusEnum

type SegmentStatusEnum string

SegmentStatusEnum - Segment status.

const (
	SegmentStatusEnumFAILURE SegmentStatusEnum = "FAILURE"
	SegmentStatusEnumSUCCESS SegmentStatusEnum = "SUCCESS"
)

func PossibleSegmentStatusEnumValues

func PossibleSegmentStatusEnumValues() []SegmentStatusEnum

PossibleSegmentStatusEnumValues returns the possible values for the SegmentStatusEnum const type.

type ServiceSpecification

type ServiceSpecification struct {
	// Specifications of the Log for Azure Monitoring
	LogSpecifications []*LogSpecification

	// Specifications of the Metrics for Azure Monitoring
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - Service specification payload

func (ServiceSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type Trial

type Trial struct {
	// READ-ONLY; Number of trial hosts available
	AvailableHosts *int32

	// READ-ONLY; Trial status
	Status *TrialStatus
}

Trial - Subscription trial availability

func (Trial) MarshalJSON added in v1.1.0

func (t Trial) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Trial.

func (*Trial) UnmarshalJSON added in v1.1.0

func (t *Trial) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Trial.

type TrialStatus

type TrialStatus string

TrialStatus - Trial status

const (
	TrialStatusTrialAvailable TrialStatus = "TrialAvailable"
	TrialStatusTrialDisabled  TrialStatus = "TrialDisabled"
	TrialStatusTrialUsed      TrialStatus = "TrialUsed"
)

func PossibleTrialStatusValues

func PossibleTrialStatusValues() []TrialStatus

PossibleTrialStatusValues returns the possible values for the TrialStatus const type.

type VMGroupStatusEnum

type VMGroupStatusEnum string

VMGroupStatusEnum - VM Group status.

const (
	VMGroupStatusEnumFAILURE VMGroupStatusEnum = "FAILURE"
	VMGroupStatusEnumSUCCESS VMGroupStatusEnum = "SUCCESS"
)

func PossibleVMGroupStatusEnumValues

func PossibleVMGroupStatusEnumValues() []VMGroupStatusEnum

PossibleVMGroupStatusEnumValues returns the possible values for the VMGroupStatusEnum const type.

type VMHostPlacementPolicyProperties

type VMHostPlacementPolicyProperties struct {
	// REQUIRED; placement policy affinity type
	AffinityType *AffinityType

	// REQUIRED; Host members list
	HostMembers []*string

	// REQUIRED; placement policy type
	Type *PlacementPolicyType

	// REQUIRED; Virtual machine members list
	VMMembers []*string

	// vm-host placement policy affinity strength (should/must)
	AffinityStrength *AffinityStrength

	// placement policy azure hybrid benefit opt-in type
	AzureHybridBenefitType *AzureHybridBenefitType

	// Display name of the placement policy
	DisplayName *string

	// Whether the placement policy is enabled or disabled
	State *PlacementPolicyState

	// READ-ONLY; The provisioning state
	ProvisioningState *PlacementPolicyProvisioningState
}

VMHostPlacementPolicyProperties - VM-Host placement policy properties

func (*VMHostPlacementPolicyProperties) GetPlacementPolicyProperties added in v0.2.0

func (v *VMHostPlacementPolicyProperties) GetPlacementPolicyProperties() *PlacementPolicyProperties

GetPlacementPolicyProperties implements the PlacementPolicyPropertiesClassification interface for type VMHostPlacementPolicyProperties.

func (VMHostPlacementPolicyProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VMHostPlacementPolicyProperties.

func (*VMHostPlacementPolicyProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMHostPlacementPolicyProperties.

type VMPlacementPolicyProperties

type VMPlacementPolicyProperties struct {
	// REQUIRED; placement policy affinity type
	AffinityType *AffinityType

	// REQUIRED; placement policy type
	Type *PlacementPolicyType

	// REQUIRED; Virtual machine members list
	VMMembers []*string

	// Display name of the placement policy
	DisplayName *string

	// Whether the placement policy is enabled or disabled
	State *PlacementPolicyState

	// READ-ONLY; The provisioning state
	ProvisioningState *PlacementPolicyProvisioningState
}

VMPlacementPolicyProperties - VM-VM placement policy properties

func (*VMPlacementPolicyProperties) GetPlacementPolicyProperties added in v0.2.0

func (v *VMPlacementPolicyProperties) GetPlacementPolicyProperties() *PlacementPolicyProperties

GetPlacementPolicyProperties implements the PlacementPolicyPropertiesClassification interface for type VMPlacementPolicyProperties.

func (VMPlacementPolicyProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VMPlacementPolicyProperties.

func (*VMPlacementPolicyProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMPlacementPolicyProperties.

type VMTypeEnum

type VMTypeEnum string

VMTypeEnum - Virtual machine type.

const (
	VMTypeEnumEDGE    VMTypeEnum = "EDGE"
	VMTypeEnumREGULAR VMTypeEnum = "REGULAR"
	VMTypeEnumSERVICE VMTypeEnum = "SERVICE"
)

func PossibleVMTypeEnumValues

func PossibleVMTypeEnumValues() []VMTypeEnum

PossibleVMTypeEnumValues returns the possible values for the VMTypeEnum const type.

type VirtualMachine

type VirtualMachine struct {
	// Virtual machine properties.
	Properties *VirtualMachineProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

VirtualMachine - Virtual Machine

func (VirtualMachine) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachine.

func (*VirtualMachine) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine.

type VirtualMachineProperties

type VirtualMachineProperties struct {
	// READ-ONLY; Display name of the VM.
	DisplayName *string

	// READ-ONLY; Path to virtual machine's folder starting from datacenter virtual machine folder
	FolderPath *string

	// READ-ONLY; Virtual machine managed object reference id
	MoRefID *string

	// READ-ONLY; Whether VM DRS-driven movement is restricted (enabled) or not (disabled)
	RestrictMovement *VirtualMachineRestrictMovementState
}

VirtualMachineProperties - Virtual Machine Properties

func (VirtualMachineProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.

func (*VirtualMachineProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.

type VirtualMachineRestrictMovement

type VirtualMachineRestrictMovement struct {
	// Whether VM DRS-driven movement is restricted (enabled) or not (disabled)
	RestrictMovement *VirtualMachineRestrictMovementState
}

VirtualMachineRestrictMovement - Set VM DRS-driven movement to restricted (enabled) or not (disabled)

func (VirtualMachineRestrictMovement) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineRestrictMovement.

func (*VirtualMachineRestrictMovement) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRestrictMovement.

type VirtualMachineRestrictMovementState

type VirtualMachineRestrictMovementState string

VirtualMachineRestrictMovementState - Whether VM DRS-driven movement is restricted (enabled) or not (disabled)

const (
	VirtualMachineRestrictMovementStateDisabled VirtualMachineRestrictMovementState = "Disabled"
	VirtualMachineRestrictMovementStateEnabled  VirtualMachineRestrictMovementState = "Enabled"
)

func PossibleVirtualMachineRestrictMovementStateValues

func PossibleVirtualMachineRestrictMovementStateValues() []VirtualMachineRestrictMovementState

PossibleVirtualMachineRestrictMovementStateValues returns the possible values for the VirtualMachineRestrictMovementState const type.

type VirtualMachinesClient

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

VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.

func NewVirtualMachinesClient

func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)

NewVirtualMachinesClient creates a new instance of VirtualMachinesClient 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 (*VirtualMachinesClient) BeginRestrictMovement

func (client *VirtualMachinesClient) BeginRestrictMovement(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, virtualMachineID string, restrictMovement VirtualMachineRestrictMovement, options *VirtualMachinesClientBeginRestrictMovementOptions) (*runtime.Poller[VirtualMachinesClientRestrictMovementResponse], error)

BeginRestrictMovement - Enable or disable DRS-driven VM movement restriction If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • virtualMachineID - Virtual Machine identifier
  • restrictMovement - Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled)
  • options - VirtualMachinesClientBeginRestrictMovementOptions contains the optional parameters for the VirtualMachinesClient.BeginRestrictMovement method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_RestrictMovement.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachinesClient().BeginRestrictMovement(ctx, "group1", "cloud1", "cluster1", "vm-209", armavs.VirtualMachineRestrictMovement{
		RestrictMovement: to.Ptr(armavs.VirtualMachineRestrictMovementStateEnabled),
	}, 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 (*VirtualMachinesClient) Get

func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, clusterName string, virtualMachineID string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)

Get - Get a virtual machine by id in a private cloud cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • virtualMachineID - Virtual Machine identifier
  • options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualMachinesClient().Get(ctx, "group1", "cloud1", "cluster1", "vm-209", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VirtualMachine = armavs.VirtualMachine{
	// 	Name: to.Ptr("vm-209"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/virtualMachines"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-209"),
	// 	Properties: &armavs.VirtualMachineProperties{
	// 		DisplayName: to.Ptr("contoso-vm"),
	// 		FolderPath: to.Ptr("vm/folder-1"),
	// 		MoRefID: to.Ptr("vm-209"),
	// 		RestrictMovement: to.Ptr(armavs.VirtualMachineRestrictMovementStateDisabled),
	// 	},
	// }
}
Output:

func (*VirtualMachinesClient) NewListPager added in v0.4.0

func (client *VirtualMachinesClient) NewListPager(resourceGroupName string, privateCloudName string, clusterName string, options *VirtualMachinesClientListOptions) *runtime.Pager[VirtualMachinesClientListResponse]

NewListPager - List of virtual machines in a private cloud cluster

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • clusterName - Name of the cluster in the private cloud
  • options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualMachinesClient().NewListPager("group1", "cloud1", "cluster1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VirtualMachinesList = armavs.VirtualMachinesList{
		// 	Value: []*armavs.VirtualMachine{
		// 		{
		// 			Name: to.Ptr("vm-209"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/virtualMachines"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-209"),
		// 			Properties: &armavs.VirtualMachineProperties{
		// 				DisplayName: to.Ptr("contoso-vm1"),
		// 				FolderPath: to.Ptr("vm/folder-1"),
		// 				MoRefID: to.Ptr("vm-209"),
		// 				RestrictMovement: to.Ptr(armavs.VirtualMachineRestrictMovementStateDisabled),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("vm-128"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/clusters/virtualMachines"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"),
		// 			Properties: &armavs.VirtualMachineProperties{
		// 				DisplayName: to.Ptr("contoso-vm2"),
		// 				FolderPath: to.Ptr("vm"),
		// 				MoRefID: to.Ptr("vm-128"),
		// 				RestrictMovement: to.Ptr(armavs.VirtualMachineRestrictMovementStateEnabled),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VirtualMachinesClientBeginRestrictMovementOptions added in v0.2.0

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

VirtualMachinesClientBeginRestrictMovementOptions contains the optional parameters for the VirtualMachinesClient.BeginRestrictMovement method.

type VirtualMachinesClientGetOptions added in v0.2.0

type VirtualMachinesClientGetOptions struct {
}

VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.

type VirtualMachinesClientGetResponse added in v0.2.0

type VirtualMachinesClientGetResponse struct {
	// Virtual Machine
	VirtualMachine
}

VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.

type VirtualMachinesClientListOptions added in v0.2.0

type VirtualMachinesClientListOptions struct {
}

VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager method.

type VirtualMachinesClientListResponse added in v0.2.0

type VirtualMachinesClientListResponse struct {
	// A list of Virtual Machines
	VirtualMachinesList
}

VirtualMachinesClientListResponse contains the response from method VirtualMachinesClient.NewListPager.

type VirtualMachinesClientRestrictMovementResponse added in v0.2.0

type VirtualMachinesClientRestrictMovementResponse struct {
}

VirtualMachinesClientRestrictMovementResponse contains the response from method VirtualMachinesClient.BeginRestrictMovement.

type VirtualMachinesList

type VirtualMachinesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items to be displayed on the page
	Value []*VirtualMachine
}

VirtualMachinesList - A list of Virtual Machines

func (VirtualMachinesList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachinesList.

func (*VirtualMachinesList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinesList.

type VisibilityParameterEnum

type VisibilityParameterEnum string

VisibilityParameterEnum - Should this parameter be visible to arm and passed in the parameters argument when executing

const (
	VisibilityParameterEnumHidden  VisibilityParameterEnum = "Hidden"
	VisibilityParameterEnumVisible VisibilityParameterEnum = "Visible"
)

func PossibleVisibilityParameterEnumValues

func PossibleVisibilityParameterEnumValues() []VisibilityParameterEnum

PossibleVisibilityParameterEnumValues returns the possible values for the VisibilityParameterEnum const type.

type WorkloadNetwork added in v1.1.0

type WorkloadNetwork struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetwork - Workload Network

func (WorkloadNetwork) MarshalJSON added in v1.1.0

func (w WorkloadNetwork) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetwork.

func (*WorkloadNetwork) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetwork) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetwork.

type WorkloadNetworkDNSService

type WorkloadNetworkDNSService struct {
	// DNS Service properties
	Properties *WorkloadNetworkDNSServiceProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkDNSService - NSX DNS Service

func (WorkloadNetworkDNSService) MarshalJSON

func (w WorkloadNetworkDNSService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSService.

func (*WorkloadNetworkDNSService) UnmarshalJSON

func (w *WorkloadNetworkDNSService) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSService.

type WorkloadNetworkDNSServiceProperties

type WorkloadNetworkDNSServiceProperties struct {
	// DNS service IP of the DNS Service.
	DNSServiceIP *string

	// Default DNS zone of the DNS Service.
	DefaultDNSZone *string

	// Display name of the DNS Service.
	DisplayName *string

	// FQDN zones of the DNS Service.
	FqdnZones []*string

	// DNS Service log level.
	LogLevel *DNSServiceLogLevelEnum

	// NSX revision number.
	Revision *int64

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkDNSServiceProvisioningState

	// READ-ONLY; DNS Service status.
	Status *DNSServiceStatusEnum
}

WorkloadNetworkDNSServiceProperties - NSX DNS Service Properties

func (WorkloadNetworkDNSServiceProperties) MarshalJSON

func (w WorkloadNetworkDNSServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSServiceProperties.

func (*WorkloadNetworkDNSServiceProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkDNSServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSServiceProperties.

type WorkloadNetworkDNSServiceProvisioningState

type WorkloadNetworkDNSServiceProvisioningState string

WorkloadNetworkDNSServiceProvisioningState - The provisioning state

const (
	WorkloadNetworkDNSServiceProvisioningStateBuilding  WorkloadNetworkDNSServiceProvisioningState = "Building"
	WorkloadNetworkDNSServiceProvisioningStateCanceled  WorkloadNetworkDNSServiceProvisioningState = "Canceled"
	WorkloadNetworkDNSServiceProvisioningStateDeleting  WorkloadNetworkDNSServiceProvisioningState = "Deleting"
	WorkloadNetworkDNSServiceProvisioningStateFailed    WorkloadNetworkDNSServiceProvisioningState = "Failed"
	WorkloadNetworkDNSServiceProvisioningStateSucceeded WorkloadNetworkDNSServiceProvisioningState = "Succeeded"
	WorkloadNetworkDNSServiceProvisioningStateUpdating  WorkloadNetworkDNSServiceProvisioningState = "Updating"
)

func PossibleWorkloadNetworkDNSServiceProvisioningStateValues

func PossibleWorkloadNetworkDNSServiceProvisioningStateValues() []WorkloadNetworkDNSServiceProvisioningState

PossibleWorkloadNetworkDNSServiceProvisioningStateValues returns the possible values for the WorkloadNetworkDNSServiceProvisioningState const type.

type WorkloadNetworkDNSServicesList

type WorkloadNetworkDNSServicesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkDNSService
}

WorkloadNetworkDNSServicesList - A list of NSX DNS Services

func (WorkloadNetworkDNSServicesList) MarshalJSON

func (w WorkloadNetworkDNSServicesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSServicesList.

func (*WorkloadNetworkDNSServicesList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkDNSServicesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSServicesList.

type WorkloadNetworkDNSZone

type WorkloadNetworkDNSZone struct {
	// DNS Zone properties
	Properties *WorkloadNetworkDNSZoneProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkDNSZone - NSX DNS Zone

func (WorkloadNetworkDNSZone) MarshalJSON

func (w WorkloadNetworkDNSZone) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSZone.

func (*WorkloadNetworkDNSZone) UnmarshalJSON

func (w *WorkloadNetworkDNSZone) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSZone.

type WorkloadNetworkDNSZoneProperties

type WorkloadNetworkDNSZoneProperties struct {
	// DNS Server IP array of the DNS Zone.
	DNSServerIPs []*string

	// Number of DNS Services using the DNS zone.
	DNSServices *int64

	// Display name of the DNS Zone.
	DisplayName *string

	// Domain names of the DNS Zone.
	Domain []*string

	// NSX revision number.
	Revision *int64

	// Source IP of the DNS Zone.
	SourceIP *string

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkDNSZoneProvisioningState
}

WorkloadNetworkDNSZoneProperties - NSX DNS Zone Properties

func (WorkloadNetworkDNSZoneProperties) MarshalJSON

func (w WorkloadNetworkDNSZoneProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSZoneProperties.

func (*WorkloadNetworkDNSZoneProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkDNSZoneProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSZoneProperties.

type WorkloadNetworkDNSZoneProvisioningState

type WorkloadNetworkDNSZoneProvisioningState string

WorkloadNetworkDNSZoneProvisioningState - The provisioning state

const (
	WorkloadNetworkDNSZoneProvisioningStateBuilding  WorkloadNetworkDNSZoneProvisioningState = "Building"
	WorkloadNetworkDNSZoneProvisioningStateCanceled  WorkloadNetworkDNSZoneProvisioningState = "Canceled"
	WorkloadNetworkDNSZoneProvisioningStateDeleting  WorkloadNetworkDNSZoneProvisioningState = "Deleting"
	WorkloadNetworkDNSZoneProvisioningStateFailed    WorkloadNetworkDNSZoneProvisioningState = "Failed"
	WorkloadNetworkDNSZoneProvisioningStateSucceeded WorkloadNetworkDNSZoneProvisioningState = "Succeeded"
	WorkloadNetworkDNSZoneProvisioningStateUpdating  WorkloadNetworkDNSZoneProvisioningState = "Updating"
)

func PossibleWorkloadNetworkDNSZoneProvisioningStateValues

func PossibleWorkloadNetworkDNSZoneProvisioningStateValues() []WorkloadNetworkDNSZoneProvisioningState

PossibleWorkloadNetworkDNSZoneProvisioningStateValues returns the possible values for the WorkloadNetworkDNSZoneProvisioningState const type.

type WorkloadNetworkDNSZonesList

type WorkloadNetworkDNSZonesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkDNSZone
}

WorkloadNetworkDNSZonesList - A list of NSX DNS Zones

func (WorkloadNetworkDNSZonesList) MarshalJSON

func (w WorkloadNetworkDNSZonesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDNSZonesList.

func (*WorkloadNetworkDNSZonesList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkDNSZonesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDNSZonesList.

type WorkloadNetworkDhcp

type WorkloadNetworkDhcp struct {
	// DHCP properties.
	Properties WorkloadNetworkDhcpEntityClassification

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkDhcp - NSX DHCP

func (WorkloadNetworkDhcp) MarshalJSON

func (w WorkloadNetworkDhcp) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDhcp.

func (*WorkloadNetworkDhcp) UnmarshalJSON

func (w *WorkloadNetworkDhcp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDhcp.

type WorkloadNetworkDhcpEntity

type WorkloadNetworkDhcpEntity struct {
	// REQUIRED; Type of DHCP: SERVER or RELAY.
	DhcpType *DhcpTypeEnum

	// Display name of the DHCP entity.
	DisplayName *string

	// NSX revision number.
	Revision *int64

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkDhcpProvisioningState

	// READ-ONLY; NSX Segments consuming DHCP.
	Segments []*string
}

WorkloadNetworkDhcpEntity - Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from

func (*WorkloadNetworkDhcpEntity) GetWorkloadNetworkDhcpEntity

func (w *WorkloadNetworkDhcpEntity) GetWorkloadNetworkDhcpEntity() *WorkloadNetworkDhcpEntity

GetWorkloadNetworkDhcpEntity implements the WorkloadNetworkDhcpEntityClassification interface for type WorkloadNetworkDhcpEntity.

func (WorkloadNetworkDhcpEntity) MarshalJSON added in v0.2.0

func (w WorkloadNetworkDhcpEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDhcpEntity.

func (*WorkloadNetworkDhcpEntity) UnmarshalJSON

func (w *WorkloadNetworkDhcpEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDhcpEntity.

type WorkloadNetworkDhcpEntityClassification

type WorkloadNetworkDhcpEntityClassification interface {
	// GetWorkloadNetworkDhcpEntity returns the WorkloadNetworkDhcpEntity content of the underlying type.
	GetWorkloadNetworkDhcpEntity() *WorkloadNetworkDhcpEntity
}

WorkloadNetworkDhcpEntityClassification provides polymorphic access to related types. Call the interface's GetWorkloadNetworkDhcpEntity() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *WorkloadNetworkDhcpEntity, *WorkloadNetworkDhcpRelay, *WorkloadNetworkDhcpServer

type WorkloadNetworkDhcpList

type WorkloadNetworkDhcpList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkDhcp
}

WorkloadNetworkDhcpList - A list of NSX dhcp entities

func (WorkloadNetworkDhcpList) MarshalJSON

func (w WorkloadNetworkDhcpList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDhcpList.

func (*WorkloadNetworkDhcpList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkDhcpList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDhcpList.

type WorkloadNetworkDhcpProvisioningState

type WorkloadNetworkDhcpProvisioningState string

WorkloadNetworkDhcpProvisioningState - The provisioning state

const (
	WorkloadNetworkDhcpProvisioningStateBuilding  WorkloadNetworkDhcpProvisioningState = "Building"
	WorkloadNetworkDhcpProvisioningStateCanceled  WorkloadNetworkDhcpProvisioningState = "Canceled"
	WorkloadNetworkDhcpProvisioningStateDeleting  WorkloadNetworkDhcpProvisioningState = "Deleting"
	WorkloadNetworkDhcpProvisioningStateFailed    WorkloadNetworkDhcpProvisioningState = "Failed"
	WorkloadNetworkDhcpProvisioningStateSucceeded WorkloadNetworkDhcpProvisioningState = "Succeeded"
	WorkloadNetworkDhcpProvisioningStateUpdating  WorkloadNetworkDhcpProvisioningState = "Updating"
)

func PossibleWorkloadNetworkDhcpProvisioningStateValues

func PossibleWorkloadNetworkDhcpProvisioningStateValues() []WorkloadNetworkDhcpProvisioningState

PossibleWorkloadNetworkDhcpProvisioningStateValues returns the possible values for the WorkloadNetworkDhcpProvisioningState const type.

type WorkloadNetworkDhcpRelay

type WorkloadNetworkDhcpRelay struct {
	// REQUIRED; Type of DHCP: SERVER or RELAY.
	DhcpType *DhcpTypeEnum

	// Display name of the DHCP entity.
	DisplayName *string

	// NSX revision number.
	Revision *int64

	// DHCP Relay Addresses. Max 3.
	ServerAddresses []*string

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkDhcpProvisioningState

	// READ-ONLY; NSX Segments consuming DHCP.
	Segments []*string
}

WorkloadNetworkDhcpRelay - NSX DHCP Relay

func (*WorkloadNetworkDhcpRelay) GetWorkloadNetworkDhcpEntity added in v0.2.0

func (w *WorkloadNetworkDhcpRelay) GetWorkloadNetworkDhcpEntity() *WorkloadNetworkDhcpEntity

GetWorkloadNetworkDhcpEntity implements the WorkloadNetworkDhcpEntityClassification interface for type WorkloadNetworkDhcpRelay.

func (WorkloadNetworkDhcpRelay) MarshalJSON

func (w WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDhcpRelay.

func (*WorkloadNetworkDhcpRelay) UnmarshalJSON

func (w *WorkloadNetworkDhcpRelay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDhcpRelay.

type WorkloadNetworkDhcpServer

type WorkloadNetworkDhcpServer struct {
	// REQUIRED; Type of DHCP: SERVER or RELAY.
	DhcpType *DhcpTypeEnum

	// Display name of the DHCP entity.
	DisplayName *string

	// DHCP Server Lease Time.
	LeaseTime *int64

	// NSX revision number.
	Revision *int64

	// DHCP Server Address.
	ServerAddress *string

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkDhcpProvisioningState

	// READ-ONLY; NSX Segments consuming DHCP.
	Segments []*string
}

WorkloadNetworkDhcpServer - NSX DHCP Server

func (*WorkloadNetworkDhcpServer) GetWorkloadNetworkDhcpEntity added in v0.2.0

func (w *WorkloadNetworkDhcpServer) GetWorkloadNetworkDhcpEntity() *WorkloadNetworkDhcpEntity

GetWorkloadNetworkDhcpEntity implements the WorkloadNetworkDhcpEntityClassification interface for type WorkloadNetworkDhcpServer.

func (WorkloadNetworkDhcpServer) MarshalJSON

func (w WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkDhcpServer.

func (*WorkloadNetworkDhcpServer) UnmarshalJSON

func (w *WorkloadNetworkDhcpServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkDhcpServer.

type WorkloadNetworkGateway

type WorkloadNetworkGateway struct {
	// Gateway properties.
	Properties *WorkloadNetworkGatewayProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkGateway - NSX Gateway.

func (WorkloadNetworkGateway) MarshalJSON

func (w WorkloadNetworkGateway) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkGateway.

func (*WorkloadNetworkGateway) UnmarshalJSON

func (w *WorkloadNetworkGateway) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkGateway.

type WorkloadNetworkGatewayList

type WorkloadNetworkGatewayList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkGateway
}

WorkloadNetworkGatewayList - A list of NSX Gateways

func (WorkloadNetworkGatewayList) MarshalJSON

func (w WorkloadNetworkGatewayList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkGatewayList.

func (*WorkloadNetworkGatewayList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkGatewayList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkGatewayList.

type WorkloadNetworkGatewayProperties

type WorkloadNetworkGatewayProperties struct {
	// Display name of the DHCP entity.
	DisplayName *string

	// READ-ONLY; NSX Gateway Path.
	Path *string
}

WorkloadNetworkGatewayProperties - Properties of a NSX Gateway.

func (WorkloadNetworkGatewayProperties) MarshalJSON added in v1.1.0

func (w WorkloadNetworkGatewayProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkGatewayProperties.

func (*WorkloadNetworkGatewayProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkGatewayProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkGatewayProperties.

type WorkloadNetworkList added in v1.1.0

type WorkloadNetworkList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetwork
}

WorkloadNetworkList - A list of workload networks

func (WorkloadNetworkList) MarshalJSON added in v1.1.0

func (w WorkloadNetworkList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkList.

func (*WorkloadNetworkList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkList.

type WorkloadNetworkName added in v1.1.0

type WorkloadNetworkName string
const (
	WorkloadNetworkNameDefault WorkloadNetworkName = "default"
)

func PossibleWorkloadNetworkNameValues added in v1.1.0

func PossibleWorkloadNetworkNameValues() []WorkloadNetworkName

PossibleWorkloadNetworkNameValues returns the possible values for the WorkloadNetworkName const type.

type WorkloadNetworkPortMirroring

type WorkloadNetworkPortMirroring struct {
	// Port Mirroring Properties.
	Properties *WorkloadNetworkPortMirroringProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkPortMirroring - NSX Port Mirroring

func (WorkloadNetworkPortMirroring) MarshalJSON

func (w WorkloadNetworkPortMirroring) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPortMirroring.

func (*WorkloadNetworkPortMirroring) UnmarshalJSON

func (w *WorkloadNetworkPortMirroring) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPortMirroring.

type WorkloadNetworkPortMirroringList

type WorkloadNetworkPortMirroringList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkPortMirroring
}

WorkloadNetworkPortMirroringList - A list of NSX Port Mirroring

func (WorkloadNetworkPortMirroringList) MarshalJSON

func (w WorkloadNetworkPortMirroringList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPortMirroringList.

func (*WorkloadNetworkPortMirroringList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkPortMirroringList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPortMirroringList.

type WorkloadNetworkPortMirroringProperties

type WorkloadNetworkPortMirroringProperties struct {
	// Destination VM Group.
	Destination *string

	// Direction of port mirroring profile.
	Direction *PortMirroringDirectionEnum

	// Display name of the port mirroring profile.
	DisplayName *string

	// NSX revision number.
	Revision *int64

	// Source VM Group.
	Source *string

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkPortMirroringProvisioningState

	// READ-ONLY; Port Mirroring Status.
	Status *PortMirroringStatusEnum
}

WorkloadNetworkPortMirroringProperties - NSX Port Mirroring Properties

func (WorkloadNetworkPortMirroringProperties) MarshalJSON added in v1.1.0

func (w WorkloadNetworkPortMirroringProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPortMirroringProperties.

func (*WorkloadNetworkPortMirroringProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkPortMirroringProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPortMirroringProperties.

type WorkloadNetworkPortMirroringProvisioningState

type WorkloadNetworkPortMirroringProvisioningState string

WorkloadNetworkPortMirroringProvisioningState - The provisioning state

const (
	WorkloadNetworkPortMirroringProvisioningStateBuilding  WorkloadNetworkPortMirroringProvisioningState = "Building"
	WorkloadNetworkPortMirroringProvisioningStateCanceled  WorkloadNetworkPortMirroringProvisioningState = "Canceled"
	WorkloadNetworkPortMirroringProvisioningStateDeleting  WorkloadNetworkPortMirroringProvisioningState = "Deleting"
	WorkloadNetworkPortMirroringProvisioningStateFailed    WorkloadNetworkPortMirroringProvisioningState = "Failed"
	WorkloadNetworkPortMirroringProvisioningStateSucceeded WorkloadNetworkPortMirroringProvisioningState = "Succeeded"
	WorkloadNetworkPortMirroringProvisioningStateUpdating  WorkloadNetworkPortMirroringProvisioningState = "Updating"
)

func PossibleWorkloadNetworkPortMirroringProvisioningStateValues

func PossibleWorkloadNetworkPortMirroringProvisioningStateValues() []WorkloadNetworkPortMirroringProvisioningState

PossibleWorkloadNetworkPortMirroringProvisioningStateValues returns the possible values for the WorkloadNetworkPortMirroringProvisioningState const type.

type WorkloadNetworkPublicIP

type WorkloadNetworkPublicIP struct {
	// Public IP Block properties
	Properties *WorkloadNetworkPublicIPProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkPublicIP - NSX Public IP Block

func (WorkloadNetworkPublicIP) MarshalJSON

func (w WorkloadNetworkPublicIP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPublicIP.

func (*WorkloadNetworkPublicIP) UnmarshalJSON

func (w *WorkloadNetworkPublicIP) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPublicIP.

type WorkloadNetworkPublicIPProperties

type WorkloadNetworkPublicIPProperties struct {
	// Display name of the Public IP Block.
	DisplayName *string

	// Number of Public IPs requested.
	NumberOfPublicIPs *int64

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkPublicIPProvisioningState

	// READ-ONLY; CIDR Block of the Public IP Block.
	PublicIPBlock *string
}

WorkloadNetworkPublicIPProperties - NSX Public IP Block Properties

func (WorkloadNetworkPublicIPProperties) MarshalJSON added in v1.1.0

func (w WorkloadNetworkPublicIPProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPublicIPProperties.

func (*WorkloadNetworkPublicIPProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkPublicIPProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPublicIPProperties.

type WorkloadNetworkPublicIPProvisioningState

type WorkloadNetworkPublicIPProvisioningState string

WorkloadNetworkPublicIPProvisioningState - The provisioning state

const (
	WorkloadNetworkPublicIPProvisioningStateBuilding  WorkloadNetworkPublicIPProvisioningState = "Building"
	WorkloadNetworkPublicIPProvisioningStateCanceled  WorkloadNetworkPublicIPProvisioningState = "Canceled"
	WorkloadNetworkPublicIPProvisioningStateDeleting  WorkloadNetworkPublicIPProvisioningState = "Deleting"
	WorkloadNetworkPublicIPProvisioningStateFailed    WorkloadNetworkPublicIPProvisioningState = "Failed"
	WorkloadNetworkPublicIPProvisioningStateSucceeded WorkloadNetworkPublicIPProvisioningState = "Succeeded"
	WorkloadNetworkPublicIPProvisioningStateUpdating  WorkloadNetworkPublicIPProvisioningState = "Updating"
)

func PossibleWorkloadNetworkPublicIPProvisioningStateValues

func PossibleWorkloadNetworkPublicIPProvisioningStateValues() []WorkloadNetworkPublicIPProvisioningState

PossibleWorkloadNetworkPublicIPProvisioningStateValues returns the possible values for the WorkloadNetworkPublicIPProvisioningState const type.

type WorkloadNetworkPublicIPsList

type WorkloadNetworkPublicIPsList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkPublicIP
}

WorkloadNetworkPublicIPsList - A list of NSX Public IP Blocks

func (WorkloadNetworkPublicIPsList) MarshalJSON

func (w WorkloadNetworkPublicIPsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkPublicIPsList.

func (*WorkloadNetworkPublicIPsList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkPublicIPsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkPublicIPsList.

type WorkloadNetworkSegment

type WorkloadNetworkSegment struct {
	// The properties of a Workload Segment proxy resource.
	Properties *WorkloadNetworkSegmentProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkSegment - NSX Segment

func (WorkloadNetworkSegment) MarshalJSON

func (w WorkloadNetworkSegment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkSegment.

func (*WorkloadNetworkSegment) UnmarshalJSON

func (w *WorkloadNetworkSegment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkSegment.

type WorkloadNetworkSegmentPortVif

type WorkloadNetworkSegmentPortVif struct {
	// Name of port or VIF attached to segment.
	PortName *string
}

WorkloadNetworkSegmentPortVif - Ports and any VIF attached to segment.

func (WorkloadNetworkSegmentPortVif) MarshalJSON added in v1.1.0

func (w WorkloadNetworkSegmentPortVif) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkSegmentPortVif.

func (*WorkloadNetworkSegmentPortVif) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkSegmentPortVif) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkSegmentPortVif.

type WorkloadNetworkSegmentProperties

type WorkloadNetworkSegmentProperties struct {
	// Gateway which to connect segment to.
	ConnectedGateway *string

	// Display name of the segment.
	DisplayName *string

	// NSX revision number.
	Revision *int64

	// Subnet which to connect segment to.
	Subnet *WorkloadNetworkSegmentSubnet

	// READ-ONLY; Port Vif which segment is associated with.
	PortVif []*WorkloadNetworkSegmentPortVif

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkSegmentProvisioningState

	// READ-ONLY; Segment status.
	Status *SegmentStatusEnum
}

WorkloadNetworkSegmentProperties - NSX Segment Properties

func (WorkloadNetworkSegmentProperties) MarshalJSON

func (w WorkloadNetworkSegmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkSegmentProperties.

func (*WorkloadNetworkSegmentProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkSegmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkSegmentProperties.

type WorkloadNetworkSegmentProvisioningState

type WorkloadNetworkSegmentProvisioningState string

WorkloadNetworkSegmentProvisioningState - The provisioning state

const (
	WorkloadNetworkSegmentProvisioningStateBuilding  WorkloadNetworkSegmentProvisioningState = "Building"
	WorkloadNetworkSegmentProvisioningStateCanceled  WorkloadNetworkSegmentProvisioningState = "Canceled"
	WorkloadNetworkSegmentProvisioningStateDeleting  WorkloadNetworkSegmentProvisioningState = "Deleting"
	WorkloadNetworkSegmentProvisioningStateFailed    WorkloadNetworkSegmentProvisioningState = "Failed"
	WorkloadNetworkSegmentProvisioningStateSucceeded WorkloadNetworkSegmentProvisioningState = "Succeeded"
	WorkloadNetworkSegmentProvisioningStateUpdating  WorkloadNetworkSegmentProvisioningState = "Updating"
)

func PossibleWorkloadNetworkSegmentProvisioningStateValues

func PossibleWorkloadNetworkSegmentProvisioningStateValues() []WorkloadNetworkSegmentProvisioningState

PossibleWorkloadNetworkSegmentProvisioningStateValues returns the possible values for the WorkloadNetworkSegmentProvisioningState const type.

type WorkloadNetworkSegmentSubnet

type WorkloadNetworkSegmentSubnet struct {
	// DHCP Range assigned for subnet.
	DhcpRanges []*string

	// Gateway address.
	GatewayAddress *string
}

WorkloadNetworkSegmentSubnet - Subnet configuration for segment

func (WorkloadNetworkSegmentSubnet) MarshalJSON

func (w WorkloadNetworkSegmentSubnet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkSegmentSubnet.

func (*WorkloadNetworkSegmentSubnet) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkSegmentSubnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkSegmentSubnet.

type WorkloadNetworkSegmentsList

type WorkloadNetworkSegmentsList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkSegment
}

WorkloadNetworkSegmentsList - A list of NSX Segments

func (WorkloadNetworkSegmentsList) MarshalJSON

func (w WorkloadNetworkSegmentsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkSegmentsList.

func (*WorkloadNetworkSegmentsList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkSegmentsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkSegmentsList.

type WorkloadNetworkVMGroup

type WorkloadNetworkVMGroup struct {
	// VM Group properties.
	Properties *WorkloadNetworkVMGroupProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkVMGroup - NSX VM Group

func (WorkloadNetworkVMGroup) MarshalJSON

func (w WorkloadNetworkVMGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVMGroup.

func (*WorkloadNetworkVMGroup) UnmarshalJSON

func (w *WorkloadNetworkVMGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVMGroup.

type WorkloadNetworkVMGroupProperties

type WorkloadNetworkVMGroupProperties struct {
	// Display name of the VM group.
	DisplayName *string

	// Virtual machine members of this group.
	Members []*string

	// NSX revision number.
	Revision *int64

	// READ-ONLY; The provisioning state
	ProvisioningState *WorkloadNetworkVMGroupProvisioningState

	// READ-ONLY; VM Group status.
	Status *VMGroupStatusEnum
}

WorkloadNetworkVMGroupProperties - NSX VM Group Properties

func (WorkloadNetworkVMGroupProperties) MarshalJSON

func (w WorkloadNetworkVMGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVMGroupProperties.

func (*WorkloadNetworkVMGroupProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkVMGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVMGroupProperties.

type WorkloadNetworkVMGroupProvisioningState

type WorkloadNetworkVMGroupProvisioningState string

WorkloadNetworkVMGroupProvisioningState - The provisioning state

const (
	WorkloadNetworkVMGroupProvisioningStateBuilding  WorkloadNetworkVMGroupProvisioningState = "Building"
	WorkloadNetworkVMGroupProvisioningStateCanceled  WorkloadNetworkVMGroupProvisioningState = "Canceled"
	WorkloadNetworkVMGroupProvisioningStateDeleting  WorkloadNetworkVMGroupProvisioningState = "Deleting"
	WorkloadNetworkVMGroupProvisioningStateFailed    WorkloadNetworkVMGroupProvisioningState = "Failed"
	WorkloadNetworkVMGroupProvisioningStateSucceeded WorkloadNetworkVMGroupProvisioningState = "Succeeded"
	WorkloadNetworkVMGroupProvisioningStateUpdating  WorkloadNetworkVMGroupProvisioningState = "Updating"
)

func PossibleWorkloadNetworkVMGroupProvisioningStateValues

func PossibleWorkloadNetworkVMGroupProvisioningStateValues() []WorkloadNetworkVMGroupProvisioningState

PossibleWorkloadNetworkVMGroupProvisioningStateValues returns the possible values for the WorkloadNetworkVMGroupProvisioningState const type.

type WorkloadNetworkVMGroupsList

type WorkloadNetworkVMGroupsList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkVMGroup
}

WorkloadNetworkVMGroupsList - A list of NSX VM Groups

func (WorkloadNetworkVMGroupsList) MarshalJSON

func (w WorkloadNetworkVMGroupsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVMGroupsList.

func (*WorkloadNetworkVMGroupsList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkVMGroupsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVMGroupsList.

type WorkloadNetworkVirtualMachine

type WorkloadNetworkVirtualMachine struct {
	// Virtual machine properties.
	Properties *WorkloadNetworkVirtualMachineProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

WorkloadNetworkVirtualMachine - NSX Virtual Machine

func (WorkloadNetworkVirtualMachine) MarshalJSON

func (w WorkloadNetworkVirtualMachine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVirtualMachine.

func (*WorkloadNetworkVirtualMachine) UnmarshalJSON

func (w *WorkloadNetworkVirtualMachine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVirtualMachine.

type WorkloadNetworkVirtualMachineProperties

type WorkloadNetworkVirtualMachineProperties struct {
	// Display name of the VM.
	DisplayName *string

	// READ-ONLY; Virtual machine type.
	VMType *VMTypeEnum
}

WorkloadNetworkVirtualMachineProperties - NSX Virtual Machine Properties

func (WorkloadNetworkVirtualMachineProperties) MarshalJSON added in v1.1.0

func (w WorkloadNetworkVirtualMachineProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVirtualMachineProperties.

func (*WorkloadNetworkVirtualMachineProperties) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkVirtualMachineProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVirtualMachineProperties.

type WorkloadNetworkVirtualMachinesList

type WorkloadNetworkVirtualMachinesList struct {
	// READ-ONLY; URL to get the next page if any
	NextLink *string

	// READ-ONLY; The items on the page
	Value []*WorkloadNetworkVirtualMachine
}

WorkloadNetworkVirtualMachinesList - A list of NSX Virtual Machines

func (WorkloadNetworkVirtualMachinesList) MarshalJSON

func (w WorkloadNetworkVirtualMachinesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkloadNetworkVirtualMachinesList.

func (*WorkloadNetworkVirtualMachinesList) UnmarshalJSON added in v1.1.0

func (w *WorkloadNetworkVirtualMachinesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadNetworkVirtualMachinesList.

type WorkloadNetworksClient

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

WorkloadNetworksClient contains the methods for the WorkloadNetworks group. Don't use this type directly, use NewWorkloadNetworksClient() instead.

func NewWorkloadNetworksClient

func NewWorkloadNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadNetworksClient, error)

NewWorkloadNetworksClient creates a new instance of WorkloadNetworksClient 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 (*WorkloadNetworksClient) BeginCreateDNSService

func (client *WorkloadNetworksClient) BeginCreateDNSService(ctx context.Context, resourceGroupName string, privateCloudName string, dnsServiceID string, workloadNetworkDNSService WorkloadNetworkDNSService, options *WorkloadNetworksClientBeginCreateDNSServiceOptions) (*runtime.Poller[WorkloadNetworksClientCreateDNSServiceResponse], error)

BeginCreateDNSService - Create a DNS service by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsServiceID - NSX DNS Service identifier. Generally the same as the DNS Service's display name
  • workloadNetworkDNSService - NSX DNS Service
  • options - WorkloadNetworksClientBeginCreateDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDNSService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsServices.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDNSService(ctx, "group1", "cloud1", "dnsService1", armavs.WorkloadNetworkDNSService{
		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
			DisplayName:    to.Ptr("dnsService1"),
			DNSServiceIP:   to.Ptr("5.5.5.5"),
			FqdnZones: []*string{
				to.Ptr("fqdnZone1")},
			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
			Revision: to.Ptr[int64](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSService = armavs.WorkloadNetworkDNSService{
	// 	Name: to.Ptr("dnsService1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 	Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 		DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 		DisplayName: to.Ptr("dnsService1"),
	// 		DNSServiceIP: to.Ptr("5.5.5.5"),
	// 		FqdnZones: []*string{
	// 			to.Ptr("fqdnZone1")},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Revision: to.Ptr[int64](1),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginCreateDNSZone

func (client *WorkloadNetworksClient) BeginCreateDNSZone(ctx context.Context, resourceGroupName string, privateCloudName string, dnsZoneID string, workloadNetworkDNSZone WorkloadNetworkDNSZone, options *WorkloadNetworksClientBeginCreateDNSZoneOptions) (*runtime.Poller[WorkloadNetworksClientCreateDNSZoneResponse], error)

BeginCreateDNSZone - Create a DNS zone by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsZoneID - NSX DNS Zone identifier. Generally the same as the DNS Zone's display name
  • workloadNetworkDNSZone - NSX DNS Zone
  • options - WorkloadNetworksClientBeginCreateDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDNSZone method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsZones.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDNSZone(ctx, "group1", "cloud1", "dnsZone1", armavs.WorkloadNetworkDNSZone{
		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
			DisplayName: to.Ptr("dnsZone1"),
			DNSServerIPs: []*string{
				to.Ptr("1.1.1.1")},
			Domain:   []*string{},
			Revision: to.Ptr[int64](1),
			SourceIP: to.Ptr("8.8.8.8"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSZone = armavs.WorkloadNetworkDNSZone{
	// 	Name: to.Ptr("dnsZone1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 	Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 		DisplayName: to.Ptr("dnsZone1"),
	// 		DNSServerIPs: []*string{
	// 			to.Ptr("1.1.1.1")},
	// 			DNSServices: to.Ptr[int64](0),
	// 			Domain: []*string{
	// 			},
	// 			Revision: to.Ptr[int64](1),
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginCreateDhcp

func (client *WorkloadNetworksClient) BeginCreateDhcp(ctx context.Context, resourceGroupName string, privateCloudName string, dhcpID string, workloadNetworkDhcp WorkloadNetworkDhcp, options *WorkloadNetworksClientBeginCreateDhcpOptions) (*runtime.Poller[WorkloadNetworksClientCreateDhcpResponse], error)

BeginCreateDhcp - Create dhcp by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dhcpID - NSX DHCP identifier. Generally the same as the DHCP display name
  • workloadNetworkDhcp - NSX DHCP
  • options - WorkloadNetworksClientBeginCreateDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDhcp method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDhcpConfigurations.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDhcp(ctx, "group1", "cloud1", "dhcp1", armavs.WorkloadNetworkDhcp{
		Properties: &armavs.WorkloadNetworkDhcpServer{
			DhcpType:      to.Ptr(armavs.DhcpTypeEnumSERVER),
			DisplayName:   to.Ptr("dhcpConfigurations1"),
			Revision:      to.Ptr[int64](1),
			LeaseTime:     to.Ptr[int64](86400),
			ServerAddress: to.Ptr("40.1.5.1/24"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDhcp = armavs.WorkloadNetworkDhcp{
	// 	Name: to.Ptr("dhcp1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 	Properties: &armavs.WorkloadNetworkDhcpServer{
	// 		DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 		DisplayName: to.Ptr("dhcpConfigurations1"),
	// 		Revision: to.Ptr[int64](1),
	// 		Segments: []*string{
	// 			to.Ptr("segment1"),
	// 			to.Ptr("segment2")},
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginCreatePortMirroring

func (client *WorkloadNetworksClient) BeginCreatePortMirroring(ctx context.Context, resourceGroupName string, privateCloudName string, portMirroringID string, workloadNetworkPortMirroring WorkloadNetworkPortMirroring, options *WorkloadNetworksClientBeginCreatePortMirroringOptions) (*runtime.Poller[WorkloadNetworksClientCreatePortMirroringResponse], error)

BeginCreatePortMirroring - Create a port mirroring profile by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • portMirroringID - NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name
  • workloadNetworkPortMirroring - NSX port mirroring
  • options - WorkloadNetworksClientBeginCreatePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreatePortMirroring method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreatePortMirroring(ctx, "group1", "cloud1", "portMirroring1", armavs.WorkloadNetworkPortMirroring{
		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
			Destination: to.Ptr("vmGroup2"),
			Direction:   to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
			DisplayName: to.Ptr("portMirroring1"),
			Revision:    to.Ptr[int64](1),
			Source:      to.Ptr("vmGroup1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkPortMirroring = armavs.WorkloadNetworkPortMirroring{
	// 	Name: to.Ptr("portMirroring1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 	Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 		Destination: to.Ptr("vmGroup2"),
	// 		Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 		DisplayName: to.Ptr("portMirroring1"),
	// 		Revision: to.Ptr[int64](1),
	// 		Source: to.Ptr("vmGroup1"),
	// 		Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) BeginCreatePublicIP

func (client *WorkloadNetworksClient) BeginCreatePublicIP(ctx context.Context, resourceGroupName string, privateCloudName string, publicIPID string, workloadNetworkPublicIP WorkloadNetworkPublicIP, options *WorkloadNetworksClientBeginCreatePublicIPOptions) (*runtime.Poller[WorkloadNetworksClientCreatePublicIPResponse], error)

BeginCreatePublicIP - Create a Public IP Block by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • publicIPID - NSX Public IP Block identifier. Generally the same as the Public IP Block's display name
  • workloadNetworkPublicIP - NSX Public IP Block
  • options - WorkloadNetworksClientBeginCreatePublicIPOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreatePublicIP method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePublicIPs.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreatePublicIP(ctx, "group1", "cloud1", "publicIP1", armavs.WorkloadNetworkPublicIP{
		Properties: &armavs.WorkloadNetworkPublicIPProperties{
			DisplayName:       to.Ptr("publicIP1"),
			NumberOfPublicIPs: to.Ptr[int64](32),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkPublicIP = armavs.WorkloadNetworkPublicIP{
	// 	Name: to.Ptr("publicIP1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
	// 	Properties: &armavs.WorkloadNetworkPublicIPProperties{
	// 		DisplayName: to.Ptr("publicIP1"),
	// 		PublicIPBlock: to.Ptr("20.20.40.50/32"),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) BeginCreateSegments

func (client *WorkloadNetworksClient) BeginCreateSegments(ctx context.Context, resourceGroupName string, privateCloudName string, segmentID string, workloadNetworkSegment WorkloadNetworkSegment, options *WorkloadNetworksClientBeginCreateSegmentsOptions) (*runtime.Poller[WorkloadNetworksClientCreateSegmentsResponse], error)

BeginCreateSegments - Create a segment by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • segmentID - NSX Segment identifier. Generally the same as the Segment's display name
  • workloadNetworkSegment - NSX Segment
  • options - WorkloadNetworksClientBeginCreateSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateSegments method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateSegments.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateSegments(ctx, "group1", "cloud1", "segment1", armavs.WorkloadNetworkSegment{
		Properties: &armavs.WorkloadNetworkSegmentProperties{
			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
			DisplayName:      to.Ptr("segment1"),
			Revision:         to.Ptr[int64](1),
			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
				DhcpRanges: []*string{
					to.Ptr("40.20.0.0-40.20.0.1")},
				GatewayAddress: to.Ptr("40.20.20.20/16"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkSegment = armavs.WorkloadNetworkSegment{
	// 	Name: to.Ptr("segment1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 	Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 		ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 		DisplayName: to.Ptr("segment1"),
	// 		PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 		},
	// 		Revision: to.Ptr[int64](1),
	// 		Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 		Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 			DhcpRanges: []*string{
	// 				to.Ptr("40.20.0.0-40.20.0.1")},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginCreateVMGroup

func (client *WorkloadNetworksClient) BeginCreateVMGroup(ctx context.Context, resourceGroupName string, privateCloudName string, vmGroupID string, workloadNetworkVMGroup WorkloadNetworkVMGroup, options *WorkloadNetworksClientBeginCreateVMGroupOptions) (*runtime.Poller[WorkloadNetworksClientCreateVMGroupResponse], error)

BeginCreateVMGroup - Create a vm group by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • vmGroupID - NSX VM Group identifier. Generally the same as the VM Group's display name
  • workloadNetworkVMGroup - NSX VM Group
  • options - WorkloadNetworksClientBeginCreateVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateVMGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateVMGroups.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateVMGroup(ctx, "group1", "cloud1", "vmGroup1", armavs.WorkloadNetworkVMGroup{
		Properties: &armavs.WorkloadNetworkVMGroupProperties{
			DisplayName: to.Ptr("vmGroup1"),
			Members: []*string{
				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
			Revision: to.Ptr[int64](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkVMGroup = armavs.WorkloadNetworkVMGroup{
	// 	Name: to.Ptr("vmGroup1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 	Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 		DisplayName: to.Ptr("vmGroup1"),
	// 		Members: []*string{
	// 			to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
	// 			Revision: to.Ptr[int64](1),
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginDeleteDNSService

func (client *WorkloadNetworksClient) BeginDeleteDNSService(ctx context.Context, resourceGroupName string, dnsServiceID string, privateCloudName string, options *WorkloadNetworksClientBeginDeleteDNSServiceOptions) (*runtime.Poller[WorkloadNetworksClientDeleteDNSServiceResponse], error)

BeginDeleteDNSService - Delete a DNS service by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsServiceID - NSX DNS Service identifier. Generally the same as the DNS Service's display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientBeginDeleteDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDNSService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsServices.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDNSService(ctx, "group1", "dnsService1", "cloud1", 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 (*WorkloadNetworksClient) BeginDeleteDNSZone

func (client *WorkloadNetworksClient) BeginDeleteDNSZone(ctx context.Context, resourceGroupName string, dnsZoneID string, privateCloudName string, options *WorkloadNetworksClientBeginDeleteDNSZoneOptions) (*runtime.Poller[WorkloadNetworksClientDeleteDNSZoneResponse], error)

BeginDeleteDNSZone - Delete a DNS zone by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsZoneID - NSX DNS Zone identifier. Generally the same as the DNS Zone's display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientBeginDeleteDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDNSZone method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsZones.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDNSZone(ctx, "group1", "dnsZone1", "cloud1", 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 (*WorkloadNetworksClient) BeginDeleteDhcp

func (client *WorkloadNetworksClient) BeginDeleteDhcp(ctx context.Context, resourceGroupName string, privateCloudName string, dhcpID string, options *WorkloadNetworksClientBeginDeleteDhcpOptions) (*runtime.Poller[WorkloadNetworksClientDeleteDhcpResponse], error)

BeginDeleteDhcp - Delete dhcp by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dhcpID - NSX DHCP identifier. Generally the same as the DHCP display name
  • options - WorkloadNetworksClientBeginDeleteDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDhcp method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDhcp(ctx, "group1", "cloud1", "dhcp1", 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 (*WorkloadNetworksClient) BeginDeletePortMirroring

func (client *WorkloadNetworksClient) BeginDeletePortMirroring(ctx context.Context, resourceGroupName string, portMirroringID string, privateCloudName string, options *WorkloadNetworksClientBeginDeletePortMirroringOptions) (*runtime.Poller[WorkloadNetworksClientDeletePortMirroringResponse], error)

BeginDeletePortMirroring - Delete a port mirroring profile by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • portMirroringID - NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientBeginDeletePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeletePortMirroring method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeletePortMirroring(ctx, "group1", "portMirroring1", "cloud1", 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 (*WorkloadNetworksClient) BeginDeletePublicIP

func (client *WorkloadNetworksClient) BeginDeletePublicIP(ctx context.Context, resourceGroupName string, publicIPID string, privateCloudName string, options *WorkloadNetworksClientBeginDeletePublicIPOptions) (*runtime.Poller[WorkloadNetworksClientDeletePublicIPResponse], error)

BeginDeletePublicIP - Delete a Public IP Block by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • publicIPID - NSX Public IP Block identifier. Generally the same as the Public IP Block's display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientBeginDeletePublicIPOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeletePublicIP method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePublicIPs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeletePublicIP(ctx, "group1", "publicIP1", "cloud1", 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 (*WorkloadNetworksClient) BeginDeleteSegment

func (client *WorkloadNetworksClient) BeginDeleteSegment(ctx context.Context, resourceGroupName string, privateCloudName string, segmentID string, options *WorkloadNetworksClientBeginDeleteSegmentOptions) (*runtime.Poller[WorkloadNetworksClientDeleteSegmentResponse], error)

BeginDeleteSegment - Delete a segment by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • segmentID - NSX Segment identifier. Generally the same as the Segment's display name
  • options - WorkloadNetworksClientBeginDeleteSegmentOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteSegment method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteSegments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteSegment(ctx, "group1", "cloud1", "segment1", 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 (*WorkloadNetworksClient) BeginDeleteVMGroup

func (client *WorkloadNetworksClient) BeginDeleteVMGroup(ctx context.Context, resourceGroupName string, vmGroupID string, privateCloudName string, options *WorkloadNetworksClientBeginDeleteVMGroupOptions) (*runtime.Poller[WorkloadNetworksClientDeleteVMGroupResponse], error)

BeginDeleteVMGroup - Delete a vm group by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vmGroupID - NSX VM Group identifier. Generally the same as the VM Group's display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientBeginDeleteVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteVMGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteVMGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteVMGroup(ctx, "group1", "vmGroup1", "cloud1", 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 (*WorkloadNetworksClient) BeginUpdateDNSService

func (client *WorkloadNetworksClient) BeginUpdateDNSService(ctx context.Context, resourceGroupName string, privateCloudName string, dnsServiceID string, workloadNetworkDNSService WorkloadNetworkDNSService, options *WorkloadNetworksClientBeginUpdateDNSServiceOptions) (*runtime.Poller[WorkloadNetworksClientUpdateDNSServiceResponse], error)

BeginUpdateDNSService - Create or update a DNS service by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsServiceID - NSX DNS Service identifier. Generally the same as the DNS Service's display name
  • workloadNetworkDNSService - NSX DNS Service
  • options - WorkloadNetworksClientBeginUpdateDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDNSService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsServices.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDNSService(ctx, "group1", "cloud1", "dnsService1", armavs.WorkloadNetworkDNSService{
		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
			DisplayName:    to.Ptr("dnsService1"),
			DNSServiceIP:   to.Ptr("5.5.5.5"),
			FqdnZones: []*string{
				to.Ptr("fqdnZone1")},
			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
			Revision: to.Ptr[int64](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSService = armavs.WorkloadNetworkDNSService{
	// 	Name: to.Ptr("dnsService1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 	Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 		DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 		DisplayName: to.Ptr("dnsService1"),
	// 		DNSServiceIP: to.Ptr("5.5.5.5"),
	// 		FqdnZones: []*string{
	// 			to.Ptr("fqdnZone1")},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Revision: to.Ptr[int64](1),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginUpdateDNSZone

func (client *WorkloadNetworksClient) BeginUpdateDNSZone(ctx context.Context, resourceGroupName string, privateCloudName string, dnsZoneID string, workloadNetworkDNSZone WorkloadNetworkDNSZone, options *WorkloadNetworksClientBeginUpdateDNSZoneOptions) (*runtime.Poller[WorkloadNetworksClientUpdateDNSZoneResponse], error)

BeginUpdateDNSZone - Create or update a DNS zone by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsZoneID - NSX DNS Zone identifier. Generally the same as the DNS Zone's display name
  • workloadNetworkDNSZone - NSX DNS Zone
  • options - WorkloadNetworksClientBeginUpdateDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDNSZone method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsZones.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDNSZone(ctx, "group1", "cloud1", "dnsZone1", armavs.WorkloadNetworkDNSZone{
		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
			DisplayName: to.Ptr("dnsZone1"),
			DNSServerIPs: []*string{
				to.Ptr("1.1.1.1")},
			Domain:   []*string{},
			Revision: to.Ptr[int64](1),
			SourceIP: to.Ptr("8.8.8.8"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSZone = armavs.WorkloadNetworkDNSZone{
	// 	Name: to.Ptr("dnsZone1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 	Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 		DisplayName: to.Ptr("dnsZone1"),
	// 		DNSServerIPs: []*string{
	// 			to.Ptr("1.1.1.1")},
	// 			DNSServices: to.Ptr[int64](0),
	// 			Domain: []*string{
	// 			},
	// 			Revision: to.Ptr[int64](1),
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginUpdateDhcp

func (client *WorkloadNetworksClient) BeginUpdateDhcp(ctx context.Context, resourceGroupName string, privateCloudName string, dhcpID string, workloadNetworkDhcp WorkloadNetworkDhcp, options *WorkloadNetworksClientBeginUpdateDhcpOptions) (*runtime.Poller[WorkloadNetworksClientUpdateDhcpResponse], error)

BeginUpdateDhcp - Create or update dhcp by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dhcpID - NSX DHCP identifier. Generally the same as the DHCP display name
  • workloadNetworkDhcp - NSX DHCP
  • options - WorkloadNetworksClientBeginUpdateDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDhcp method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDhcp(ctx, "group1", "cloud1", "dhcp1", armavs.WorkloadNetworkDhcp{
		Properties: &armavs.WorkloadNetworkDhcpServer{
			DhcpType:      to.Ptr(armavs.DhcpTypeEnumSERVER),
			Revision:      to.Ptr[int64](1),
			LeaseTime:     to.Ptr[int64](86400),
			ServerAddress: to.Ptr("40.1.5.1/24"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDhcp = armavs.WorkloadNetworkDhcp{
	// 	Name: to.Ptr("dhcp1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 	Properties: &armavs.WorkloadNetworkDhcpServer{
	// 		DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 		DisplayName: to.Ptr("dhcpConfigurations1"),
	// 		Revision: to.Ptr[int64](2),
	// 		Segments: []*string{
	// 			to.Ptr("segment1"),
	// 			to.Ptr("segment2")},
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginUpdatePortMirroring

func (client *WorkloadNetworksClient) BeginUpdatePortMirroring(ctx context.Context, resourceGroupName string, privateCloudName string, portMirroringID string, workloadNetworkPortMirroring WorkloadNetworkPortMirroring, options *WorkloadNetworksClientBeginUpdatePortMirroringOptions) (*runtime.Poller[WorkloadNetworksClientUpdatePortMirroringResponse], error)

BeginUpdatePortMirroring - Create or update a port mirroring profile by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • portMirroringID - NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name
  • workloadNetworkPortMirroring - NSX port mirroring
  • options - WorkloadNetworksClientBeginUpdatePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdatePortMirroring method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdatePortMirroring(ctx, "group1", "cloud1", "portMirroring1", armavs.WorkloadNetworkPortMirroring{
		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
			Destination: to.Ptr("vmGroup2"),
			Direction:   to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
			Revision:    to.Ptr[int64](1),
			Source:      to.Ptr("vmGroup1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkPortMirroring = armavs.WorkloadNetworkPortMirroring{
	// 	Name: to.Ptr("portMirroring1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 	Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 		Destination: to.Ptr("vmGroup2"),
	// 		Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 		DisplayName: to.Ptr("portMirroring1"),
	// 		Revision: to.Ptr[int64](2),
	// 		Source: to.Ptr("vmGroup1"),
	// 		Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) BeginUpdateSegments

func (client *WorkloadNetworksClient) BeginUpdateSegments(ctx context.Context, resourceGroupName string, privateCloudName string, segmentID string, workloadNetworkSegment WorkloadNetworkSegment, options *WorkloadNetworksClientBeginUpdateSegmentsOptions) (*runtime.Poller[WorkloadNetworksClientUpdateSegmentsResponse], error)

BeginUpdateSegments - Create or update a segment by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • segmentID - NSX Segment identifier. Generally the same as the Segment's display name
  • workloadNetworkSegment - NSX Segment
  • options - WorkloadNetworksClientBeginUpdateSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateSegments method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateSegments.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateSegments(ctx, "group1", "cloud1", "segment1", armavs.WorkloadNetworkSegment{
		Properties: &armavs.WorkloadNetworkSegmentProperties{
			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
			Revision:         to.Ptr[int64](1),
			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
				DhcpRanges: []*string{
					to.Ptr("40.20.0.0-40.20.0.1")},
				GatewayAddress: to.Ptr("40.20.20.20/16"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkSegment = armavs.WorkloadNetworkSegment{
	// 	Name: to.Ptr("segment1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 	Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 		ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 		DisplayName: to.Ptr("segment1"),
	// 		PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 			{
	// 				PortName: to.Ptr("vm1"),
	// 		}},
	// 		Revision: to.Ptr[int64](2),
	// 		Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 		Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 			DhcpRanges: []*string{
	// 				to.Ptr("40.20.0.0-40.20.0.1")},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) BeginUpdateVMGroup

func (client *WorkloadNetworksClient) BeginUpdateVMGroup(ctx context.Context, resourceGroupName string, privateCloudName string, vmGroupID string, workloadNetworkVMGroup WorkloadNetworkVMGroup, options *WorkloadNetworksClientBeginUpdateVMGroupOptions) (*runtime.Poller[WorkloadNetworksClientUpdateVMGroupResponse], error)

BeginUpdateVMGroup - Create or update a vm group by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • vmGroupID - NSX VM Group identifier. Generally the same as the VM Group's display name
  • workloadNetworkVMGroup - NSX VM Group
  • options - WorkloadNetworksClientBeginUpdateVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateVMGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateVMGroups.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/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateVMGroup(ctx, "group1", "cloud1", "vmGroup1", armavs.WorkloadNetworkVMGroup{
		Properties: &armavs.WorkloadNetworkVMGroupProperties{
			Members: []*string{
				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
			Revision: to.Ptr[int64](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkVMGroup = armavs.WorkloadNetworkVMGroup{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 	Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 		DisplayName: to.Ptr("vmGroup1"),
	// 		Members: []*string{
	// 			to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
	// 			Revision: to.Ptr[int64](2),
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) Get added in v1.1.0

func (client *WorkloadNetworksClient) Get(ctx context.Context, resourceGroupName string, privateCloudName string, workloadNetworkName WorkloadNetworkName, options *WorkloadNetworksClientGetOptions) (WorkloadNetworksClientGetResponse, error)

Get - Get a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • workloadNetworkName - Name for the workload network in the private cloud
  • options - WorkloadNetworksClientGetOptions contains the optional parameters for the WorkloadNetworksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().Get(ctx, "group1", "cloud1", armavs.WorkloadNetworkNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetwork = armavs.WorkloadNetwork{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default"),
	// }
}
Output:

func (*WorkloadNetworksClient) GetDNSService

func (client *WorkloadNetworksClient) GetDNSService(ctx context.Context, resourceGroupName string, privateCloudName string, dnsServiceID string, options *WorkloadNetworksClientGetDNSServiceOptions) (WorkloadNetworksClientGetDNSServiceResponse, error)

GetDNSService - Get a DNS service by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsServiceID - NSX DNS Service identifier. Generally the same as the DNS Service's display name
  • options - WorkloadNetworksClientGetDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.GetDNSService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsServices.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDNSService(ctx, "group1", "cloud1", "dnsService1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSService = armavs.WorkloadNetworkDNSService{
	// 	Name: to.Ptr("portMirroring1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 	Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 		DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 		DisplayName: to.Ptr("dnsService1"),
	// 		DNSServiceIP: to.Ptr("5.5.5.5"),
	// 		FqdnZones: []*string{
	// 			to.Ptr("fqdnZone1")},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Revision: to.Ptr[int64](1),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) GetDNSZone

func (client *WorkloadNetworksClient) GetDNSZone(ctx context.Context, resourceGroupName string, privateCloudName string, dnsZoneID string, options *WorkloadNetworksClientGetDNSZoneOptions) (WorkloadNetworksClientGetDNSZoneResponse, error)

GetDNSZone - Get a DNS zone by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • dnsZoneID - NSX DNS Zone identifier. Generally the same as the DNS Zone's display name
  • options - WorkloadNetworksClientGetDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.GetDNSZone method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsZones.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDNSZone(ctx, "group1", "cloud1", "dnsZone1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDNSZone = armavs.WorkloadNetworkDNSZone{
	// 	Name: to.Ptr("portMirroring1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 	Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 		DisplayName: to.Ptr("dnsZone1"),
	// 		DNSServerIPs: []*string{
	// 			to.Ptr("1.1.1.1")},
	// 			DNSServices: to.Ptr[int64](0),
	// 			Domain: []*string{
	// 			},
	// 			Revision: to.Ptr[int64](1),
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) GetDhcp

func (client *WorkloadNetworksClient) GetDhcp(ctx context.Context, resourceGroupName string, dhcpID string, privateCloudName string, options *WorkloadNetworksClientGetDhcpOptions) (WorkloadNetworksClientGetDhcpResponse, error)

GetDhcp - Get dhcp by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dhcpID - NSX DHCP identifier. Generally the same as the DHCP display name
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientGetDhcpOptions contains the optional parameters for the WorkloadNetworksClient.GetDhcp method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDhcpConfigurations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDhcp(ctx, "group1", "dhcp1", "cloud1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkDhcp = armavs.WorkloadNetworkDhcp{
	// 	Name: to.Ptr("dhcp1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 	Properties: &armavs.WorkloadNetworkDhcpServer{
	// 		DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 		DisplayName: to.Ptr("dhcpConfigurations1"),
	// 		Revision: to.Ptr[int64](1),
	// 		Segments: []*string{
	// 			to.Ptr("segment1"),
	// 			to.Ptr("segment2")},
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) GetGateway

func (client *WorkloadNetworksClient) GetGateway(ctx context.Context, resourceGroupName string, privateCloudName string, gatewayID string, options *WorkloadNetworksClientGetGatewayOptions) (WorkloadNetworksClientGetGatewayResponse, error)

GetGateway - Get a gateway by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • gatewayID - NSX Gateway identifier. Generally the same as the Gateway's display name
  • options - WorkloadNetworksClientGetGatewayOptions contains the optional parameters for the WorkloadNetworksClient.GetGateway method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetGateway(ctx, "group1", "cloud1", "gateway1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkGateway = armavs.WorkloadNetworkGateway{
	// 	Name: to.Ptr("gateway1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/gateways"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1"),
	// 	Properties: &armavs.WorkloadNetworkGatewayProperties{
	// 		Path: to.Ptr("/infra/tier-1s/gateway1"),
	// 		DisplayName: to.Ptr("gateway1"),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) GetPortMirroring

func (client *WorkloadNetworksClient) GetPortMirroring(ctx context.Context, resourceGroupName string, privateCloudName string, portMirroringID string, options *WorkloadNetworksClientGetPortMirroringOptions) (WorkloadNetworksClientGetPortMirroringResponse, error)

GetPortMirroring - Get a port mirroring profile by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • portMirroringID - NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name
  • options - WorkloadNetworksClientGetPortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.GetPortMirroring method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetPortMirroring(ctx, "group1", "cloud1", "portMirroring1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkPortMirroring = armavs.WorkloadNetworkPortMirroring{
	// 	Name: to.Ptr("portMirroring1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 	Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 		Destination: to.Ptr("vmGroup2"),
	// 		Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 		DisplayName: to.Ptr("portMirroring1"),
	// 		Revision: to.Ptr[int64](1),
	// 		Source: to.Ptr("vmGroup1"),
	// 		Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) GetPublicIP

func (client *WorkloadNetworksClient) GetPublicIP(ctx context.Context, resourceGroupName string, privateCloudName string, publicIPID string, options *WorkloadNetworksClientGetPublicIPOptions) (WorkloadNetworksClientGetPublicIPResponse, error)

GetPublicIP - Get a Public IP Block by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • publicIPID - NSX Public IP Block identifier. Generally the same as the Public IP Block's display name
  • options - WorkloadNetworksClientGetPublicIPOptions contains the optional parameters for the WorkloadNetworksClient.GetPublicIP method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPublicIPs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetPublicIP(ctx, "group1", "cloud1", "publicIP1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkPublicIP = armavs.WorkloadNetworkPublicIP{
	// 	Name: to.Ptr("publicIP1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
	// 	Properties: &armavs.WorkloadNetworkPublicIPProperties{
	// 		DisplayName: to.Ptr("publicIP1"),
	// 		PublicIPBlock: to.Ptr("20.20.40.50/32"),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) GetSegment

func (client *WorkloadNetworksClient) GetSegment(ctx context.Context, resourceGroupName string, privateCloudName string, segmentID string, options *WorkloadNetworksClientGetSegmentOptions) (WorkloadNetworksClientGetSegmentResponse, error)

GetSegment - Get a segment by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • segmentID - NSX Segment identifier. Generally the same as the Segment's display name
  • options - WorkloadNetworksClientGetSegmentOptions contains the optional parameters for the WorkloadNetworksClient.GetSegment method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetSegments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetSegment(ctx, "group1", "cloud1", "segment1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkSegment = armavs.WorkloadNetworkSegment{
	// 	Name: to.Ptr("segment1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 	Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 		ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 		DisplayName: to.Ptr("segment1"),
	// 		PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 			{
	// 				PortName: to.Ptr("vm1"),
	// 		}},
	// 		Revision: to.Ptr[int64](1),
	// 		Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 		Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 			DhcpRanges: []*string{
	// 				to.Ptr("40.20.0.0-40.20.0.1")},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) GetVMGroup

func (client *WorkloadNetworksClient) GetVMGroup(ctx context.Context, resourceGroupName string, privateCloudName string, vmGroupID string, options *WorkloadNetworksClientGetVMGroupOptions) (WorkloadNetworksClientGetVMGroupResponse, error)

GetVMGroup - Get a vm group by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • vmGroupID - NSX VM Group identifier. Generally the same as the VM Group's display name
  • options - WorkloadNetworksClientGetVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.GetVMGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVMGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetVMGroup(ctx, "group1", "cloud1", "vmGroup1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkVMGroup = armavs.WorkloadNetworkVMGroup{
	// 	Name: to.Ptr("cloud1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 	Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 		DisplayName: to.Ptr("vmGroup1"),
	// 		Members: []*string{
	// 			to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
	// 			Revision: to.Ptr[int64](1),
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 		},
	// 	}
}
Output:

func (*WorkloadNetworksClient) GetVirtualMachine

func (client *WorkloadNetworksClient) GetVirtualMachine(ctx context.Context, resourceGroupName string, privateCloudName string, virtualMachineID string, options *WorkloadNetworksClientGetVirtualMachineOptions) (WorkloadNetworksClientGetVirtualMachineResponse, error)

GetVirtualMachine - Get a virtual machine by id in a private cloud workload network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • virtualMachineID - Virtual Machine identifier
  • options - WorkloadNetworksClientGetVirtualMachineOptions contains the optional parameters for the WorkloadNetworksClient.GetVirtualMachine method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVirtualMachine.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetVirtualMachine(ctx, "group1", "cloud1", "vm1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.WorkloadNetworkVirtualMachine = armavs.WorkloadNetworkVirtualMachine{
	// 	Name: to.Ptr("vm1"),
	// 	Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1"),
	// 	Properties: &armavs.WorkloadNetworkVirtualMachineProperties{
	// 		DisplayName: to.Ptr("vm1"),
	// 		VMType: to.Ptr(armavs.VMTypeEnumREGULAR),
	// 	},
	// }
}
Output:

func (*WorkloadNetworksClient) NewListDNSServicesPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListDNSServicesPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListDNSServicesOptions) *runtime.Pager[WorkloadNetworksClientListDNSServicesResponse]

NewListDNSServicesPager - List of DNS services in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListDNSServicesOptions contains the optional parameters for the WorkloadNetworksClient.NewListDNSServicesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsServices.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDNSServicesPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkDNSServicesList = armavs.WorkloadNetworkDNSServicesList{
		// 	Value: []*armavs.WorkloadNetworkDNSService{
		// 		{
		// 			Name: to.Ptr("portMirroring1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
		// 			Properties: &armavs.WorkloadNetworkDNSServiceProperties{
		// 				DefaultDNSZone: to.Ptr("defaultDnsZone1"),
		// 				DisplayName: to.Ptr("dnsService1"),
		// 				DNSServiceIP: to.Ptr("5.5.5.5"),
		// 				FqdnZones: []*string{
		// 					to.Ptr("fqdnZone1")},
		// 					LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
		// 					Revision: to.Ptr[int64](1),
		// 					Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WorkloadNetworksClient) NewListDNSZonesPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListDNSZonesPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListDNSZonesOptions) *runtime.Pager[WorkloadNetworksClientListDNSZonesResponse]

NewListDNSZonesPager - List of DNS zones in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListDNSZonesOptions contains the optional parameters for the WorkloadNetworksClient.NewListDNSZonesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsZones.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDNSZonesPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkDNSZonesList = armavs.WorkloadNetworkDNSZonesList{
		// 	Value: []*armavs.WorkloadNetworkDNSZone{
		// 		{
		// 			Name: to.Ptr("portMirroring1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
		// 			Properties: &armavs.WorkloadNetworkDNSZoneProperties{
		// 				DisplayName: to.Ptr("dnsZone1"),
		// 				DNSServerIPs: []*string{
		// 					to.Ptr("1.1.1.1")},
		// 					DNSServices: to.Ptr[int64](0),
		// 					Domain: []*string{
		// 					},
		// 					Revision: to.Ptr[int64](1),
		// 					SourceIP: to.Ptr("8.8.8.8"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WorkloadNetworksClient) NewListDhcpPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListDhcpPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListDhcpOptions) *runtime.Pager[WorkloadNetworksClientListDhcpResponse]

NewListDhcpPager - List dhcp in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListDhcpOptions contains the optional parameters for the WorkloadNetworksClient.NewListDhcpPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDhcpConfigurations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDhcpPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkDhcpList = armavs.WorkloadNetworkDhcpList{
		// 	Value: []*armavs.WorkloadNetworkDhcp{
		// 		{
		// 			Name: to.Ptr("dhcp1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
		// 			Properties: &armavs.WorkloadNetworkDhcpServer{
		// 				DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
		// 				DisplayName: to.Ptr("dhcpConfigurations1"),
		// 				Revision: to.Ptr[int64](1),
		// 				Segments: []*string{
		// 					to.Ptr("segment1"),
		// 					to.Ptr("segment2")},
		// 					LeaseTime: to.Ptr[int64](86400),
		// 					ServerAddress: to.Ptr("40.1.5.1/24"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WorkloadNetworksClient) NewListGatewaysPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListGatewaysPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListGatewaysOptions) *runtime.Pager[WorkloadNetworksClientListGatewaysResponse]

NewListGatewaysPager - List of gateways in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListGatewaysOptions contains the optional parameters for the WorkloadNetworksClient.NewListGatewaysPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListGateways.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListGatewaysPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkGatewayList = armavs.WorkloadNetworkGatewayList{
		// 	Value: []*armavs.WorkloadNetworkGateway{
		// 		{
		// 			Name: to.Ptr("gateway1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1"),
		// 			Properties: &armavs.WorkloadNetworkGatewayProperties{
		// 				Path: to.Ptr("/infra/tier-1s/gateway1"),
		// 				DisplayName: to.Ptr("gateway1"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*WorkloadNetworksClient) NewListPager added in v1.1.0

func (client *WorkloadNetworksClient) NewListPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListOptions) *runtime.Pager[WorkloadNetworksClientListResponse]

NewListPager - List of workload networks in a private cloud.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListOptions contains the optional parameters for the WorkloadNetworksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkList = armavs.WorkloadNetworkList{
		// 	Value: []*armavs.WorkloadNetwork{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default"),
		// 	}},
		// }
	}
}
Output:

func (*WorkloadNetworksClient) NewListPortMirroringPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListPortMirroringPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListPortMirroringOptions) *runtime.Pager[WorkloadNetworksClientListPortMirroringResponse]

NewListPortMirroringPager - List of port mirroring profiles in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListPortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.NewListPortMirroringPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPortMirroringPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkPortMirroringList = armavs.WorkloadNetworkPortMirroringList{
		// 	Value: []*armavs.WorkloadNetworkPortMirroring{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
		// 			Properties: &armavs.WorkloadNetworkPortMirroringProperties{
		// 				Destination: to.Ptr("vmGroup2"),
		// 				Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
		// 				DisplayName: to.Ptr("portMirroring1"),
		// 				Revision: to.Ptr[int64](1),
		// 				Source: to.Ptr("vmGroup1"),
		// 				Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*WorkloadNetworksClient) NewListPublicIPsPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListPublicIPsPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListPublicIPsOptions) *runtime.Pager[WorkloadNetworksClientListPublicIPsResponse]

NewListPublicIPsPager - List of Public IP Blocks in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListPublicIPsOptions contains the optional parameters for the WorkloadNetworksClient.NewListPublicIPsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPublicIPs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPublicIPsPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkPublicIPsList = armavs.WorkloadNetworkPublicIPsList{
		// 	Value: []*armavs.WorkloadNetworkPublicIP{
		// 		{
		// 			Name: to.Ptr("publicIP1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
		// 			Properties: &armavs.WorkloadNetworkPublicIPProperties{
		// 				DisplayName: to.Ptr("publicIP1"),
		// 				PublicIPBlock: to.Ptr("20.20.40.50/32"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*WorkloadNetworksClient) NewListSegmentsPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListSegmentsPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListSegmentsOptions) *runtime.Pager[WorkloadNetworksClientListSegmentsResponse]

NewListSegmentsPager - List of segments in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.NewListSegmentsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListSegments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListSegmentsPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkSegmentsList = armavs.WorkloadNetworkSegmentsList{
		// 	Value: []*armavs.WorkloadNetworkSegment{
		// 		{
		// 			Name: to.Ptr("segment1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
		// 			Properties: &armavs.WorkloadNetworkSegmentProperties{
		// 				ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
		// 				DisplayName: to.Ptr("segment1"),
		// 				PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
		// 					{
		// 						PortName: to.Ptr("vm1"),
		// 				}},
		// 				Revision: to.Ptr[int64](1),
		// 				Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
		// 				Subnet: &armavs.WorkloadNetworkSegmentSubnet{
		// 					DhcpRanges: []*string{
		// 						to.Ptr("40.20.0.0-40.20.0.1")},
		// 						GatewayAddress: to.Ptr("40.20.20.20/16"),
		// 					},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WorkloadNetworksClient) NewListVMGroupsPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListVMGroupsPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListVMGroupsOptions) *runtime.Pager[WorkloadNetworksClientListVMGroupsResponse]

NewListVMGroupsPager - List of vm groups in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListVMGroupsOptions contains the optional parameters for the WorkloadNetworksClient.NewListVMGroupsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVMGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListVMGroupsPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkVMGroupsList = armavs.WorkloadNetworkVMGroupsList{
		// 	Value: []*armavs.WorkloadNetworkVMGroup{
		// 		{
		// 			Name: to.Ptr("cloud1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
		// 			Properties: &armavs.WorkloadNetworkVMGroupProperties{
		// 				DisplayName: to.Ptr("vmGroup1"),
		// 				Members: []*string{
		// 					to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50")},
		// 					Revision: to.Ptr[int64](1),
		// 					Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*WorkloadNetworksClient) NewListVirtualMachinesPager added in v0.4.0

func (client *WorkloadNetworksClient) NewListVirtualMachinesPager(resourceGroupName string, privateCloudName string, options *WorkloadNetworksClientListVirtualMachinesOptions) *runtime.Pager[WorkloadNetworksClientListVirtualMachinesResponse]

NewListVirtualMachinesPager - List of virtual machines in a private cloud workload network.

Generated from API version 2023-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • privateCloudName - Name of the private cloud
  • options - WorkloadNetworksClientListVirtualMachinesOptions contains the optional parameters for the WorkloadNetworksClient.NewListVirtualMachinesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a5e7ff51c8af3781e7f6dd3b82a3fc922e2f6f93/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVirtualMachines.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListVirtualMachinesPager("group1", "cloud1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkloadNetworkVirtualMachinesList = armavs.WorkloadNetworkVirtualMachinesList{
		// 	Value: []*armavs.WorkloadNetworkVirtualMachine{
		// 		{
		// 			Name: to.Ptr("vm1"),
		// 			Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1"),
		// 			Properties: &armavs.WorkloadNetworkVirtualMachineProperties{
		// 				DisplayName: to.Ptr("vm1"),
		// 				VMType: to.Ptr(armavs.VMTypeEnumREGULAR),
		// 			},
		// 	}},
		// }
	}
}
Output:

type WorkloadNetworksClientBeginCreateDNSServiceOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreateDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDNSService method.

type WorkloadNetworksClientBeginCreateDNSZoneOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreateDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDNSZone method.

type WorkloadNetworksClientBeginCreateDhcpOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreateDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateDhcp method.

type WorkloadNetworksClientBeginCreatePortMirroringOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreatePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreatePortMirroring method.

type WorkloadNetworksClientBeginCreatePublicIPOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreatePublicIPOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreatePublicIP method.

type WorkloadNetworksClientBeginCreateSegmentsOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreateSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateSegments method.

type WorkloadNetworksClientBeginCreateVMGroupOptions added in v0.2.0

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

WorkloadNetworksClientBeginCreateVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginCreateVMGroup method.

type WorkloadNetworksClientBeginDeleteDNSServiceOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeleteDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDNSService method.

type WorkloadNetworksClientBeginDeleteDNSZoneOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeleteDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDNSZone method.

type WorkloadNetworksClientBeginDeleteDhcpOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeleteDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteDhcp method.

type WorkloadNetworksClientBeginDeletePortMirroringOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeletePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeletePortMirroring method.

type WorkloadNetworksClientBeginDeletePublicIPOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeletePublicIPOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeletePublicIP method.

type WorkloadNetworksClientBeginDeleteSegmentOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeleteSegmentOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteSegment method.

type WorkloadNetworksClientBeginDeleteVMGroupOptions added in v0.2.0

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

WorkloadNetworksClientBeginDeleteVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginDeleteVMGroup method.

type WorkloadNetworksClientBeginUpdateDNSServiceOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdateDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDNSService method.

type WorkloadNetworksClientBeginUpdateDNSZoneOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdateDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDNSZone method.

type WorkloadNetworksClientBeginUpdateDhcpOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdateDhcpOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateDhcp method.

type WorkloadNetworksClientBeginUpdatePortMirroringOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdatePortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdatePortMirroring method.

type WorkloadNetworksClientBeginUpdateSegmentsOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdateSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateSegments method.

type WorkloadNetworksClientBeginUpdateVMGroupOptions added in v0.2.0

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

WorkloadNetworksClientBeginUpdateVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.BeginUpdateVMGroup method.

type WorkloadNetworksClientCreateDNSServiceResponse added in v0.2.0

type WorkloadNetworksClientCreateDNSServiceResponse struct {
	// NSX DNS Service
	WorkloadNetworkDNSService
}

WorkloadNetworksClientCreateDNSServiceResponse contains the response from method WorkloadNetworksClient.BeginCreateDNSService.

type WorkloadNetworksClientCreateDNSZoneResponse added in v0.2.0

type WorkloadNetworksClientCreateDNSZoneResponse struct {
	// NSX DNS Zone
	WorkloadNetworkDNSZone
}

WorkloadNetworksClientCreateDNSZoneResponse contains the response from method WorkloadNetworksClient.BeginCreateDNSZone.

type WorkloadNetworksClientCreateDhcpResponse added in v0.2.0

type WorkloadNetworksClientCreateDhcpResponse struct {
	// NSX DHCP
	WorkloadNetworkDhcp
}

WorkloadNetworksClientCreateDhcpResponse contains the response from method WorkloadNetworksClient.BeginCreateDhcp.

type WorkloadNetworksClientCreatePortMirroringResponse added in v0.2.0

type WorkloadNetworksClientCreatePortMirroringResponse struct {
	// NSX Port Mirroring
	WorkloadNetworkPortMirroring
}

WorkloadNetworksClientCreatePortMirroringResponse contains the response from method WorkloadNetworksClient.BeginCreatePortMirroring.

type WorkloadNetworksClientCreatePublicIPResponse added in v0.2.0

type WorkloadNetworksClientCreatePublicIPResponse struct {
	// NSX Public IP Block
	WorkloadNetworkPublicIP
}

WorkloadNetworksClientCreatePublicIPResponse contains the response from method WorkloadNetworksClient.BeginCreatePublicIP.

type WorkloadNetworksClientCreateSegmentsResponse added in v0.2.0

type WorkloadNetworksClientCreateSegmentsResponse struct {
	// NSX Segment
	WorkloadNetworkSegment
}

WorkloadNetworksClientCreateSegmentsResponse contains the response from method WorkloadNetworksClient.BeginCreateSegments.

type WorkloadNetworksClientCreateVMGroupResponse added in v0.2.0

type WorkloadNetworksClientCreateVMGroupResponse struct {
	// NSX VM Group
	WorkloadNetworkVMGroup
}

WorkloadNetworksClientCreateVMGroupResponse contains the response from method WorkloadNetworksClient.BeginCreateVMGroup.

type WorkloadNetworksClientDeleteDNSServiceResponse added in v0.2.0

type WorkloadNetworksClientDeleteDNSServiceResponse struct {
}

WorkloadNetworksClientDeleteDNSServiceResponse contains the response from method WorkloadNetworksClient.BeginDeleteDNSService.

type WorkloadNetworksClientDeleteDNSZoneResponse added in v0.2.0

type WorkloadNetworksClientDeleteDNSZoneResponse struct {
}

WorkloadNetworksClientDeleteDNSZoneResponse contains the response from method WorkloadNetworksClient.BeginDeleteDNSZone.

type WorkloadNetworksClientDeleteDhcpResponse added in v0.2.0

type WorkloadNetworksClientDeleteDhcpResponse struct {
}

WorkloadNetworksClientDeleteDhcpResponse contains the response from method WorkloadNetworksClient.BeginDeleteDhcp.

type WorkloadNetworksClientDeletePortMirroringResponse added in v0.2.0

type WorkloadNetworksClientDeletePortMirroringResponse struct {
}

WorkloadNetworksClientDeletePortMirroringResponse contains the response from method WorkloadNetworksClient.BeginDeletePortMirroring.

type WorkloadNetworksClientDeletePublicIPResponse added in v0.2.0

type WorkloadNetworksClientDeletePublicIPResponse struct {
}

WorkloadNetworksClientDeletePublicIPResponse contains the response from method WorkloadNetworksClient.BeginDeletePublicIP.

type WorkloadNetworksClientDeleteSegmentResponse added in v0.2.0

type WorkloadNetworksClientDeleteSegmentResponse struct {
}

WorkloadNetworksClientDeleteSegmentResponse contains the response from method WorkloadNetworksClient.BeginDeleteSegment.

type WorkloadNetworksClientDeleteVMGroupResponse added in v0.2.0

type WorkloadNetworksClientDeleteVMGroupResponse struct {
}

WorkloadNetworksClientDeleteVMGroupResponse contains the response from method WorkloadNetworksClient.BeginDeleteVMGroup.

type WorkloadNetworksClientGetDNSServiceOptions added in v0.2.0

type WorkloadNetworksClientGetDNSServiceOptions struct {
}

WorkloadNetworksClientGetDNSServiceOptions contains the optional parameters for the WorkloadNetworksClient.GetDNSService method.

type WorkloadNetworksClientGetDNSServiceResponse added in v0.2.0

type WorkloadNetworksClientGetDNSServiceResponse struct {
	// NSX DNS Service
	WorkloadNetworkDNSService
}

WorkloadNetworksClientGetDNSServiceResponse contains the response from method WorkloadNetworksClient.GetDNSService.

type WorkloadNetworksClientGetDNSZoneOptions added in v0.2.0

type WorkloadNetworksClientGetDNSZoneOptions struct {
}

WorkloadNetworksClientGetDNSZoneOptions contains the optional parameters for the WorkloadNetworksClient.GetDNSZone method.

type WorkloadNetworksClientGetDNSZoneResponse added in v0.2.0

type WorkloadNetworksClientGetDNSZoneResponse struct {
	// NSX DNS Zone
	WorkloadNetworkDNSZone
}

WorkloadNetworksClientGetDNSZoneResponse contains the response from method WorkloadNetworksClient.GetDNSZone.

type WorkloadNetworksClientGetDhcpOptions added in v0.2.0

type WorkloadNetworksClientGetDhcpOptions struct {
}

WorkloadNetworksClientGetDhcpOptions contains the optional parameters for the WorkloadNetworksClient.GetDhcp method.

type WorkloadNetworksClientGetDhcpResponse added in v0.2.0

type WorkloadNetworksClientGetDhcpResponse struct {
	// NSX DHCP
	WorkloadNetworkDhcp
}

WorkloadNetworksClientGetDhcpResponse contains the response from method WorkloadNetworksClient.GetDhcp.

type WorkloadNetworksClientGetGatewayOptions added in v0.2.0

type WorkloadNetworksClientGetGatewayOptions struct {
}

WorkloadNetworksClientGetGatewayOptions contains the optional parameters for the WorkloadNetworksClient.GetGateway method.

type WorkloadNetworksClientGetGatewayResponse added in v0.2.0

type WorkloadNetworksClientGetGatewayResponse struct {
	// NSX Gateway.
	WorkloadNetworkGateway
}

WorkloadNetworksClientGetGatewayResponse contains the response from method WorkloadNetworksClient.GetGateway.

type WorkloadNetworksClientGetOptions added in v1.1.0

type WorkloadNetworksClientGetOptions struct {
}

WorkloadNetworksClientGetOptions contains the optional parameters for the WorkloadNetworksClient.Get method.

type WorkloadNetworksClientGetPortMirroringOptions added in v0.2.0

type WorkloadNetworksClientGetPortMirroringOptions struct {
}

WorkloadNetworksClientGetPortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.GetPortMirroring method.

type WorkloadNetworksClientGetPortMirroringResponse added in v0.2.0

type WorkloadNetworksClientGetPortMirroringResponse struct {
	// NSX Port Mirroring
	WorkloadNetworkPortMirroring
}

WorkloadNetworksClientGetPortMirroringResponse contains the response from method WorkloadNetworksClient.GetPortMirroring.

type WorkloadNetworksClientGetPublicIPOptions added in v0.2.0

type WorkloadNetworksClientGetPublicIPOptions struct {
}

WorkloadNetworksClientGetPublicIPOptions contains the optional parameters for the WorkloadNetworksClient.GetPublicIP method.

type WorkloadNetworksClientGetPublicIPResponse added in v0.2.0

type WorkloadNetworksClientGetPublicIPResponse struct {
	// NSX Public IP Block
	WorkloadNetworkPublicIP
}

WorkloadNetworksClientGetPublicIPResponse contains the response from method WorkloadNetworksClient.GetPublicIP.

type WorkloadNetworksClientGetResponse added in v1.1.0

type WorkloadNetworksClientGetResponse struct {
	// Workload Network
	WorkloadNetwork
}

WorkloadNetworksClientGetResponse contains the response from method WorkloadNetworksClient.Get.

type WorkloadNetworksClientGetSegmentOptions added in v0.2.0

type WorkloadNetworksClientGetSegmentOptions struct {
}

WorkloadNetworksClientGetSegmentOptions contains the optional parameters for the WorkloadNetworksClient.GetSegment method.

type WorkloadNetworksClientGetSegmentResponse added in v0.2.0

type WorkloadNetworksClientGetSegmentResponse struct {
	// NSX Segment
	WorkloadNetworkSegment
}

WorkloadNetworksClientGetSegmentResponse contains the response from method WorkloadNetworksClient.GetSegment.

type WorkloadNetworksClientGetVMGroupOptions added in v0.2.0

type WorkloadNetworksClientGetVMGroupOptions struct {
}

WorkloadNetworksClientGetVMGroupOptions contains the optional parameters for the WorkloadNetworksClient.GetVMGroup method.

type WorkloadNetworksClientGetVMGroupResponse added in v0.2.0

type WorkloadNetworksClientGetVMGroupResponse struct {
	// NSX VM Group
	WorkloadNetworkVMGroup
}

WorkloadNetworksClientGetVMGroupResponse contains the response from method WorkloadNetworksClient.GetVMGroup.

type WorkloadNetworksClientGetVirtualMachineOptions added in v0.2.0

type WorkloadNetworksClientGetVirtualMachineOptions struct {
}

WorkloadNetworksClientGetVirtualMachineOptions contains the optional parameters for the WorkloadNetworksClient.GetVirtualMachine method.

type WorkloadNetworksClientGetVirtualMachineResponse added in v0.2.0

type WorkloadNetworksClientGetVirtualMachineResponse struct {
	// NSX Virtual Machine
	WorkloadNetworkVirtualMachine
}

WorkloadNetworksClientGetVirtualMachineResponse contains the response from method WorkloadNetworksClient.GetVirtualMachine.

type WorkloadNetworksClientListDNSServicesOptions added in v0.2.0

type WorkloadNetworksClientListDNSServicesOptions struct {
}

WorkloadNetworksClientListDNSServicesOptions contains the optional parameters for the WorkloadNetworksClient.NewListDNSServicesPager method.

type WorkloadNetworksClientListDNSServicesResponse added in v0.2.0

type WorkloadNetworksClientListDNSServicesResponse struct {
	// A list of NSX DNS Services
	WorkloadNetworkDNSServicesList
}

WorkloadNetworksClientListDNSServicesResponse contains the response from method WorkloadNetworksClient.NewListDNSServicesPager.

type WorkloadNetworksClientListDNSZonesOptions added in v0.2.0

type WorkloadNetworksClientListDNSZonesOptions struct {
}

WorkloadNetworksClientListDNSZonesOptions contains the optional parameters for the WorkloadNetworksClient.NewListDNSZonesPager method.

type WorkloadNetworksClientListDNSZonesResponse added in v0.2.0

type WorkloadNetworksClientListDNSZonesResponse struct {
	// A list of NSX DNS Zones
	WorkloadNetworkDNSZonesList
}

WorkloadNetworksClientListDNSZonesResponse contains the response from method WorkloadNetworksClient.NewListDNSZonesPager.

type WorkloadNetworksClientListDhcpOptions added in v0.2.0

type WorkloadNetworksClientListDhcpOptions struct {
}

WorkloadNetworksClientListDhcpOptions contains the optional parameters for the WorkloadNetworksClient.NewListDhcpPager method.

type WorkloadNetworksClientListDhcpResponse added in v0.2.0

type WorkloadNetworksClientListDhcpResponse struct {
	// A list of NSX dhcp entities
	WorkloadNetworkDhcpList
}

WorkloadNetworksClientListDhcpResponse contains the response from method WorkloadNetworksClient.NewListDhcpPager.

type WorkloadNetworksClientListGatewaysOptions added in v0.2.0

type WorkloadNetworksClientListGatewaysOptions struct {
}

WorkloadNetworksClientListGatewaysOptions contains the optional parameters for the WorkloadNetworksClient.NewListGatewaysPager method.

type WorkloadNetworksClientListGatewaysResponse added in v0.2.0

type WorkloadNetworksClientListGatewaysResponse struct {
	// A list of NSX Gateways
	WorkloadNetworkGatewayList
}

WorkloadNetworksClientListGatewaysResponse contains the response from method WorkloadNetworksClient.NewListGatewaysPager.

type WorkloadNetworksClientListOptions added in v1.1.0

type WorkloadNetworksClientListOptions struct {
}

WorkloadNetworksClientListOptions contains the optional parameters for the WorkloadNetworksClient.NewListPager method.

type WorkloadNetworksClientListPortMirroringOptions added in v0.2.0

type WorkloadNetworksClientListPortMirroringOptions struct {
}

WorkloadNetworksClientListPortMirroringOptions contains the optional parameters for the WorkloadNetworksClient.NewListPortMirroringPager method.

type WorkloadNetworksClientListPortMirroringResponse added in v0.2.0

type WorkloadNetworksClientListPortMirroringResponse struct {
	// A list of NSX Port Mirroring
	WorkloadNetworkPortMirroringList
}

WorkloadNetworksClientListPortMirroringResponse contains the response from method WorkloadNetworksClient.NewListPortMirroringPager.

type WorkloadNetworksClientListPublicIPsOptions added in v0.2.0

type WorkloadNetworksClientListPublicIPsOptions struct {
}

WorkloadNetworksClientListPublicIPsOptions contains the optional parameters for the WorkloadNetworksClient.NewListPublicIPsPager method.

type WorkloadNetworksClientListPublicIPsResponse added in v0.2.0

type WorkloadNetworksClientListPublicIPsResponse struct {
	// A list of NSX Public IP Blocks
	WorkloadNetworkPublicIPsList
}

WorkloadNetworksClientListPublicIPsResponse contains the response from method WorkloadNetworksClient.NewListPublicIPsPager.

type WorkloadNetworksClientListResponse added in v1.1.0

type WorkloadNetworksClientListResponse struct {
	// A list of workload networks
	WorkloadNetworkList
}

WorkloadNetworksClientListResponse contains the response from method WorkloadNetworksClient.NewListPager.

type WorkloadNetworksClientListSegmentsOptions added in v0.2.0

type WorkloadNetworksClientListSegmentsOptions struct {
}

WorkloadNetworksClientListSegmentsOptions contains the optional parameters for the WorkloadNetworksClient.NewListSegmentsPager method.

type WorkloadNetworksClientListSegmentsResponse added in v0.2.0

type WorkloadNetworksClientListSegmentsResponse struct {
	// A list of NSX Segments
	WorkloadNetworkSegmentsList
}

WorkloadNetworksClientListSegmentsResponse contains the response from method WorkloadNetworksClient.NewListSegmentsPager.

type WorkloadNetworksClientListVMGroupsOptions added in v0.2.0

type WorkloadNetworksClientListVMGroupsOptions struct {
}

WorkloadNetworksClientListVMGroupsOptions contains the optional parameters for the WorkloadNetworksClient.NewListVMGroupsPager method.

type WorkloadNetworksClientListVMGroupsResponse added in v0.2.0

type WorkloadNetworksClientListVMGroupsResponse struct {
	// A list of NSX VM Groups
	WorkloadNetworkVMGroupsList
}

WorkloadNetworksClientListVMGroupsResponse contains the response from method WorkloadNetworksClient.NewListVMGroupsPager.

type WorkloadNetworksClientListVirtualMachinesOptions added in v0.2.0

type WorkloadNetworksClientListVirtualMachinesOptions struct {
}

WorkloadNetworksClientListVirtualMachinesOptions contains the optional parameters for the WorkloadNetworksClient.NewListVirtualMachinesPager method.

type WorkloadNetworksClientListVirtualMachinesResponse added in v0.2.0

type WorkloadNetworksClientListVirtualMachinesResponse struct {
	// A list of NSX Virtual Machines
	WorkloadNetworkVirtualMachinesList
}

WorkloadNetworksClientListVirtualMachinesResponse contains the response from method WorkloadNetworksClient.NewListVirtualMachinesPager.

type WorkloadNetworksClientUpdateDNSServiceResponse added in v0.2.0

type WorkloadNetworksClientUpdateDNSServiceResponse struct {
	// NSX DNS Service
	WorkloadNetworkDNSService
}

WorkloadNetworksClientUpdateDNSServiceResponse contains the response from method WorkloadNetworksClient.BeginUpdateDNSService.

type WorkloadNetworksClientUpdateDNSZoneResponse added in v0.2.0

type WorkloadNetworksClientUpdateDNSZoneResponse struct {
	// NSX DNS Zone
	WorkloadNetworkDNSZone
}

WorkloadNetworksClientUpdateDNSZoneResponse contains the response from method WorkloadNetworksClient.BeginUpdateDNSZone.

type WorkloadNetworksClientUpdateDhcpResponse added in v0.2.0

type WorkloadNetworksClientUpdateDhcpResponse struct {
	// NSX DHCP
	WorkloadNetworkDhcp
}

WorkloadNetworksClientUpdateDhcpResponse contains the response from method WorkloadNetworksClient.BeginUpdateDhcp.

type WorkloadNetworksClientUpdatePortMirroringResponse added in v0.2.0

type WorkloadNetworksClientUpdatePortMirroringResponse struct {
	// NSX Port Mirroring
	WorkloadNetworkPortMirroring
}

WorkloadNetworksClientUpdatePortMirroringResponse contains the response from method WorkloadNetworksClient.BeginUpdatePortMirroring.

type WorkloadNetworksClientUpdateSegmentsResponse added in v0.2.0

type WorkloadNetworksClientUpdateSegmentsResponse struct {
	// NSX Segment
	WorkloadNetworkSegment
}

WorkloadNetworksClientUpdateSegmentsResponse contains the response from method WorkloadNetworksClient.BeginUpdateSegments.

type WorkloadNetworksClientUpdateVMGroupResponse added in v0.2.0

type WorkloadNetworksClientUpdateVMGroupResponse struct {
	// NSX VM Group
	WorkloadNetworkVMGroup
}

WorkloadNetworksClientUpdateVMGroupResponse contains the response from method WorkloadNetworksClient.BeginUpdateVMGroup.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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