armconnectedvmware

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 15 Imported by: 2

README

Azure Arc VMware Management Module for Go

PkgGoDev

The armconnectedvmware module provides operations for working with Azure Arc VMware Management.

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 Arc VMware Management module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Arc VMware Management. 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 Arc VMware Management 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 := armconnectedvmware.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 := armconnectedvmware.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.NewVCentersClient()

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 Arc VMware Management 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 ClientFactory added in v0.2.0

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

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

func NewClientFactory added in v0.2.0

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

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

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

func (*ClientFactory) NewClustersClient added in v0.2.0

func (c *ClientFactory) NewClustersClient() *ClustersClient

NewClustersClient creates a new instance of ClustersClient.

func (*ClientFactory) NewDatastoresClient added in v0.2.0

func (c *ClientFactory) NewDatastoresClient() *DatastoresClient

NewDatastoresClient creates a new instance of DatastoresClient.

func (*ClientFactory) NewHostsClient added in v0.2.0

func (c *ClientFactory) NewHostsClient() *HostsClient

NewHostsClient creates a new instance of HostsClient.

func (*ClientFactory) NewInventoryItemsClient added in v0.2.0

func (c *ClientFactory) NewInventoryItemsClient() *InventoryItemsClient

NewInventoryItemsClient creates a new instance of InventoryItemsClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewResourcePoolsClient added in v0.2.0

func (c *ClientFactory) NewResourcePoolsClient() *ResourcePoolsClient

NewResourcePoolsClient creates a new instance of ResourcePoolsClient.

func (*ClientFactory) NewVCentersClient added in v0.2.0

func (c *ClientFactory) NewVCentersClient() *VCentersClient

NewVCentersClient creates a new instance of VCentersClient.

func (*ClientFactory) NewVMInstanceGuestAgentsClient added in v1.0.0

func (c *ClientFactory) NewVMInstanceGuestAgentsClient() *VMInstanceGuestAgentsClient

NewVMInstanceGuestAgentsClient creates a new instance of VMInstanceGuestAgentsClient.

func (*ClientFactory) NewVMInstanceHybridIdentityMetadataClient added in v1.0.0

func (c *ClientFactory) NewVMInstanceHybridIdentityMetadataClient() *VMInstanceHybridIdentityMetadataClient

NewVMInstanceHybridIdentityMetadataClient creates a new instance of VMInstanceHybridIdentityMetadataClient.

func (*ClientFactory) NewVirtualMachineInstancesClient added in v1.0.0

func (c *ClientFactory) NewVirtualMachineInstancesClient() *VirtualMachineInstancesClient

NewVirtualMachineInstancesClient creates a new instance of VirtualMachineInstancesClient.

func (*ClientFactory) NewVirtualMachineTemplatesClient added in v0.2.0

func (c *ClientFactory) NewVirtualMachineTemplatesClient() *VirtualMachineTemplatesClient

NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient.

func (*ClientFactory) NewVirtualNetworksClient added in v0.2.0

func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient

NewVirtualNetworksClient creates a new instance of VirtualNetworksClient.

type Cluster

type Cluster struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *ClusterProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

Cluster - Define the cluster.

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 ClusterInventoryItem

type ClusterInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

ClusterInventoryItem - The cluster inventory item.

func (*ClusterInventoryItem) GetInventoryItemProperties

func (c *ClusterInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type ClusterInventoryItem.

func (ClusterInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClusterInventoryItem.

func (*ClusterInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterInventoryItem.

type ClusterProperties

type ClusterProperties struct {
	// Gets or sets the inventory Item ID for the cluster.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the cluster.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this cluster resides.
	VCenterID *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets the datastore ARM ids.
	DatastoreIDs []*string

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the cluster.
	MoName *string

	// READ-ONLY; Gets the network ARM ids.
	NetworkIDs []*string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets the max CPU usage across all cores on the cluster in MHz.
	TotalCPUMHz *int64

	// READ-ONLY; Gets the total amount of physical memory on the cluster in GB.
	TotalMemoryGB *int64

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string

	// READ-ONLY; Gets the used CPU usage across all cores on the cluster in MHz.
	UsedCPUMHz *int64

	// READ-ONLY; Gets the used physical memory on the cluster in GB.
	UsedMemoryGB *int64
}

ClusterProperties - Describes the properties of a Cluster.

func (ClusterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClusterProperties.

func (*ClusterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.

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 Subscription ID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClustersClient) BeginCreate

func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, body Cluster, options *ClustersClientBeginCreateOptions) (*runtime.Poller[ClustersClientCreateResponse], error)

BeginCreate - Create Or Update cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • clusterName - Name of the cluster.
  • body - Request payload.
  • options - ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateCluster.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "testrg", "HRCluster", armconnectedvmware.Cluster{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.ClusterProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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 = armconnectedvmware.Cluster{
	// 	Name: to.Ptr("HRCluster"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Clusters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/HRCluster"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ClusterProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*ClustersClient) BeginDelete

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

BeginDelete - Implements cluster DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • clusterName - Name of the cluster.
  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "testrg", "HRCluster", &armconnectedvmware.ClustersClientBeginDeleteOptions{Force: 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) Get

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

Get - Implements cluster GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • clusterName - Name of the cluster.
  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "testrg", "HRCluster", 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 = armconnectedvmware.Cluster{
	// 	Name: to.Ptr("HRCluster"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Clusters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/HRCluster"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ClusterProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*ClustersClient) NewListByResourceGroupPager

func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]

NewListByResourceGroupPager - List of clusters in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClustersByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("testrg", 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.ClustersList = armconnectedvmware.ClustersList{
		// 	Value: []*armconnectedvmware.Cluster{
		// 		{
		// 			Name: to.Ptr("HRCluster"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Clusters"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/HRCluster"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.ClusterProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ClustersClient) NewListPager

NewListPager - List of clusters in a subscription.

Generated from API version 2023-10-01

  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListClusters.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().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.ClustersList = armconnectedvmware.ClustersList{
		// 	Value: []*armconnectedvmware.Cluster{
		// 		{
		// 			Name: to.Ptr("HRCluster"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Clusters"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/HRCluster"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.ClusterProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ClustersClient) Update

func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, body ResourcePatch, options *ClustersClientUpdateOptions) (ClustersClientUpdateResponse, error)

Update - API to update certain properties of the cluster resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • clusterName - Name of the cluster.
  • body - Resource properties to update.
  • options - ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateCluster.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Update(ctx, "testrg", "HRCluster", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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 = armconnectedvmware.Cluster{
	// 	Name: to.Ptr("HRCluster"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Clusters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/HRCluster"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ClusterProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type ClustersClientBeginCreateOptions

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

ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.

type ClustersClientBeginDeleteOptions

type ClustersClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

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

type ClustersClientCreateResponse

type ClustersClientCreateResponse struct {
	// Define the cluster.
	Cluster
}

ClustersClientCreateResponse contains the response from method ClustersClient.BeginCreate.

type ClustersClientDeleteResponse

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.

type ClustersClientGetOptions

type ClustersClientGetOptions struct {
}

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

type ClustersClientGetResponse

type ClustersClientGetResponse struct {
	// Define the cluster.
	Cluster
}

ClustersClientGetResponse contains the response from method ClustersClient.Get.

type ClustersClientListByResourceGroupOptions

type ClustersClientListByResourceGroupOptions struct {
}

ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.

type ClustersClientListByResourceGroupResponse

type ClustersClientListByResourceGroupResponse struct {
	// List of Clusters.
	ClustersList
}

ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.

type ClustersClientListOptions

type ClustersClientListOptions struct {
}

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

type ClustersClientListResponse

type ClustersClientListResponse struct {
	// List of Clusters.
	ClustersList
}

ClustersClientListResponse contains the response from method ClustersClient.NewListPager.

type ClustersClientUpdateOptions

type ClustersClientUpdateOptions struct {
}

ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.

type ClustersClientUpdateResponse

type ClustersClientUpdateResponse struct {
	// Define the cluster.
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.Update.

type ClustersList

type ClustersList struct {
	// REQUIRED; Array of Clusters
	Value []*Cluster

	// Url to follow for getting next page of Clusters.
	NextLink *string
}

ClustersList - List of Clusters.

func (ClustersList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClustersList.

func (*ClustersList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClustersList.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Datastore

type Datastore struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *DatastoreProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

Datastore - Define the datastore.

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 DatastoreInventoryItem

type DatastoreInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets Maximum capacity of this datastore, in GBs.
	CapacityGB *int64

	// Gets or sets Available space of this datastore, in GBs.
	FreeSpaceGB *int64

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

DatastoreInventoryItem - The datastore inventory item.

func (*DatastoreInventoryItem) GetInventoryItemProperties

func (d *DatastoreInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type DatastoreInventoryItem.

func (DatastoreInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatastoreInventoryItem.

func (*DatastoreInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreInventoryItem.

type DatastoreProperties

type DatastoreProperties struct {
	// Gets or sets the inventory Item ID for the datastore.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the datastore.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this datastore resides.
	VCenterID *string

	// READ-ONLY; Gets or sets Maximum capacity of this datastore in GBs.
	CapacityGB *int64

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets or sets Available space of this datastore in GBs.
	FreeSpaceGB *int64

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the datastore.
	MoName *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

DatastoreProperties - Describes the properties of a Datastore.

func (DatastoreProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatastoreProperties.

func (*DatastoreProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreProperties.

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 Subscription ID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DatastoresClient) BeginCreate

func (client *DatastoresClient) BeginCreate(ctx context.Context, resourceGroupName string, datastoreName string, body Datastore, options *DatastoresClientBeginCreateOptions) (*runtime.Poller[DatastoresClientCreateResponse], error)

BeginCreate - Create Or Update datastore. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • datastoreName - Name of the datastore.
  • body - Request payload.
  • options - DatastoresClientBeginCreateOptions contains the optional parameters for the DatastoresClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateDatastore.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatastoresClient().BeginCreate(ctx, "testrg", "HRDatastore", armconnectedvmware.Datastore{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.DatastoreProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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 = armconnectedvmware.Datastore{
	// 	Name: to.Ptr("HRDatastore"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Datastores"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.DatastoreProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*DatastoresClient) BeginDelete

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

BeginDelete - Implements datastore DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • datastoreName - Name of the datastore.
  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteDatastore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatastoresClient().BeginDelete(ctx, "testrg", "HRDatastore", &armconnectedvmware.DatastoresClientBeginDeleteOptions{Force: 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, datastoreName string, options *DatastoresClientGetOptions) (DatastoresClientGetResponse, error)

Get - Implements datastore GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • datastoreName - Name of the datastore.
  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetDatastore.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatastoresClient().Get(ctx, "testrg", "HRDatastore", 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 = armconnectedvmware.Datastore{
	// 	Name: to.Ptr("HRDatastore"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Datastores"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.DatastoreProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*DatastoresClient) NewListByResourceGroupPager

func (client *DatastoresClient) NewListByResourceGroupPager(resourceGroupName string, options *DatastoresClientListByResourceGroupOptions) *runtime.Pager[DatastoresClientListByResourceGroupResponse]

NewListByResourceGroupPager - List of datastores in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - DatastoresClientListByResourceGroupOptions contains the optional parameters for the DatastoresClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastoresByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatastoresClient().NewListByResourceGroupPager("testrg", 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.DatastoresList = armconnectedvmware.DatastoresList{
		// 	Value: []*armconnectedvmware.Datastore{
		// 		{
		// 			Name: to.Ptr("HRDatastore"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Datastores"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.DatastoreProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*DatastoresClient) NewListPager

NewListPager - List of datastores in a subscription.

Generated from API version 2023-10-01

  • 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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListDatastores.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatastoresClient().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.DatastoresList = armconnectedvmware.DatastoresList{
		// 	Value: []*armconnectedvmware.Datastore{
		// 		{
		// 			Name: to.Ptr("HRDatastore"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Datastores"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.DatastoreProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*DatastoresClient) Update

func (client *DatastoresClient) Update(ctx context.Context, resourceGroupName string, datastoreName string, body ResourcePatch, options *DatastoresClientUpdateOptions) (DatastoresClientUpdateResponse, error)

Update - API to update certain properties of the datastore resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • datastoreName - Name of the datastore.
  • body - Resource properties to update.
  • options - DatastoresClientUpdateOptions contains the optional parameters for the DatastoresClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateDatastore.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatastoresClient().Update(ctx, "testrg", "HRDatastore", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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 = armconnectedvmware.Datastore{
	// 	Name: to.Ptr("HRDatastore"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Datastores"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/HRDatastore"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.DatastoreProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type DatastoresClientBeginCreateOptions

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

DatastoresClientBeginCreateOptions contains the optional parameters for the DatastoresClient.BeginCreate method.

type DatastoresClientBeginDeleteOptions

type DatastoresClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

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

type DatastoresClientCreateResponse

type DatastoresClientCreateResponse struct {
	// Define the datastore.
	Datastore
}

DatastoresClientCreateResponse contains the response from method DatastoresClient.BeginCreate.

type DatastoresClientDeleteResponse

type DatastoresClientDeleteResponse struct {
}

DatastoresClientDeleteResponse contains the response from method DatastoresClient.BeginDelete.

type DatastoresClientGetOptions

type DatastoresClientGetOptions struct {
}

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

type DatastoresClientGetResponse

type DatastoresClientGetResponse struct {
	// Define the datastore.
	Datastore
}

DatastoresClientGetResponse contains the response from method DatastoresClient.Get.

type DatastoresClientListByResourceGroupOptions

type DatastoresClientListByResourceGroupOptions struct {
}

DatastoresClientListByResourceGroupOptions contains the optional parameters for the DatastoresClient.NewListByResourceGroupPager method.

type DatastoresClientListByResourceGroupResponse

type DatastoresClientListByResourceGroupResponse struct {
	// List of Datastores.
	DatastoresList
}

DatastoresClientListByResourceGroupResponse contains the response from method DatastoresClient.NewListByResourceGroupPager.

type DatastoresClientListOptions

type DatastoresClientListOptions struct {
}

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

type DatastoresClientListResponse

type DatastoresClientListResponse struct {
	// List of Datastores.
	DatastoresList
}

DatastoresClientListResponse contains the response from method DatastoresClient.NewListPager.

type DatastoresClientUpdateOptions

type DatastoresClientUpdateOptions struct {
}

DatastoresClientUpdateOptions contains the optional parameters for the DatastoresClient.Update method.

type DatastoresClientUpdateResponse

type DatastoresClientUpdateResponse struct {
	// Define the datastore.
	Datastore
}

DatastoresClientUpdateResponse contains the response from method DatastoresClient.Update.

type DatastoresList

type DatastoresList struct {
	// REQUIRED; Array of Datastores
	Value []*Datastore

	// Url to follow for getting next page of Datastores.
	NextLink *string
}

DatastoresList - List of Datastores.

func (DatastoresList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatastoresList.

func (*DatastoresList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatastoresList.

type DiskMode

type DiskMode string

DiskMode - Defines the different types of disk modes.

const (
	DiskModeIndependentNonpersistent DiskMode = "independent_nonpersistent"
	DiskModeIndependentPersistent    DiskMode = "independent_persistent"
	DiskModePersistent               DiskMode = "persistent"
)

func PossibleDiskModeValues

func PossibleDiskModeValues() []DiskMode

PossibleDiskModeValues returns the possible values for the DiskMode const type.

type DiskType

type DiskType string

DiskType - Defines the different types of disks.

const (
	DiskTypeFlat        DiskType = "flat"
	DiskTypePmem        DiskType = "pmem"
	DiskTypeRawphysical DiskType = "rawphysical"
	DiskTypeRawvirtual  DiskType = "rawvirtual"
	DiskTypeSesparse    DiskType = "sesparse"
	DiskTypeSparse      DiskType = "sparse"
	DiskTypeUnknown     DiskType = "unknown"
)

func PossibleDiskTypeValues

func PossibleDiskTypeValues() []DiskType

PossibleDiskTypeValues returns the possible values for the DiskType const type.

type ExtendedLocation

type ExtendedLocation struct {
	// The extended location name.
	Name *string

	// The extended location type.
	Type *string
}

ExtendedLocation - The extended location.

func (ExtendedLocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.

func (*ExtendedLocation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.

type FirmwareType

type FirmwareType string

FirmwareType - Firmware type

const (
	FirmwareTypeBios FirmwareType = "bios"
	FirmwareTypeEfi  FirmwareType = "efi"
)

func PossibleFirmwareTypeValues

func PossibleFirmwareTypeValues() []FirmwareType

PossibleFirmwareTypeValues returns the possible values for the FirmwareType const type.

type GuestAgent

type GuestAgent struct {
	// REQUIRED; Resource properties.
	Properties *GuestAgentProperties

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

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

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

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

GuestAgent - Defines the GuestAgent.

func (GuestAgent) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GuestAgent.

func (*GuestAgent) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgent.

type GuestAgentList

type GuestAgentList struct {
	// REQUIRED; Array of GuestAgent
	Value []*GuestAgent

	// Url to follow for getting next page of GuestAgent.
	NextLink *string
}

GuestAgentList - List of GuestAgent.

func (GuestAgentList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GuestAgentList.

func (*GuestAgentList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentList.

type GuestAgentProperties

type GuestAgentProperties struct {
	// Username / Password Credentials to provision guest agent.
	Credentials *GuestCredential

	// HTTP Proxy configuration for the VM.
	HTTPProxyConfig *HTTPProxyConfiguration

	// The resource id of the private link scope this machine is assigned to, if any.
	PrivateLinkScopeResourceID *string

	// Gets or sets the guest agent provisioning action.
	ProvisioningAction *ProvisioningAction

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Gets or sets the guest agent status.
	Status *string

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

GuestAgentProperties - Describes the properties of a Virtual Machine Guest Agent.

func (GuestAgentProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GuestAgentProperties.

func (*GuestAgentProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GuestAgentProperties.

type GuestCredential

type GuestCredential struct {
	// Gets or sets the password to connect with the guest.
	Password *string

	// Gets or sets username to connect with the guest.
	Username *string
}

GuestCredential - Username / Password Credentials to connect to guest.

func (GuestCredential) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GuestCredential.

func (*GuestCredential) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GuestCredential.

type HTTPProxyConfiguration

type HTTPProxyConfiguration struct {
	// Gets or sets httpsProxy url.
	HTTPSProxy *string
}

HTTPProxyConfiguration - HTTP Proxy configuration for the VM.

func (HTTPProxyConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HTTPProxyConfiguration.

func (*HTTPProxyConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPProxyConfiguration.

type HardwareProfile

type HardwareProfile struct {
	// Gets or sets memory size in MBs for the vm.
	MemorySizeMB *int32

	// Gets or sets the number of vCPUs for the vm.
	NumCPUs *int32

	// Gets or sets the number of cores per socket for the vm. Defaults to 1 if unspecified.
	NumCoresPerSocket *int32

	// READ-ONLY; Gets or sets a value indicating whether virtual processors can be added while this virtual machine is running.
	CPUHotAddEnabled *bool

	// READ-ONLY; Gets or sets a value indicating whether virtual processors can be removed while this virtual machine is running.
	CPUHotRemoveEnabled *bool

	// READ-ONLY; Gets or sets a value indicating whether memory can be added while this virtual machine is running.
	MemoryHotAddEnabled *bool
}

HardwareProfile - Specifies the hardware settings for the virtual machine.

func (HardwareProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HardwareProfile.

func (*HardwareProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.

type Host

type Host struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *HostProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

Host - Define the host.

func (Host) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Host.

func (*Host) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Host.

type HostInventoryItem

type HostInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// Parent host inventory resource details.
	Parent *InventoryItemDetails

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

HostInventoryItem - The host inventory item.

func (*HostInventoryItem) GetInventoryItemProperties

func (h *HostInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type HostInventoryItem.

func (HostInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HostInventoryItem.

func (*HostInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostInventoryItem.

type HostProperties

type HostProperties struct {
	// Gets or sets the inventory Item ID for the host.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the host.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this host resides.
	VCenterID *string

	// READ-ONLY; Gets the max CPU usage across all cores in MHz.
	CPUMhz *int64

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets the datastore ARM ids.
	DatastoreIDs []*string

	// READ-ONLY; Gets the total amount of physical memory on the host in GB.
	MemorySizeGB *int64

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the host.
	MoName *string

	// READ-ONLY; Gets the network ARM ids.
	NetworkIDs []*string

	// READ-ONLY; Gets the used CPU usage across all cores in MHz.
	OverallCPUUsageMHz *int64

	// READ-ONLY; Gets the used physical memory on the host in GB.
	OverallMemoryUsageGB *int64

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

HostProperties - Describes the properties of a Host.

func (HostProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HostProperties.

func (*HostProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostProperties.

type HostsClient

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

HostsClient contains the methods for the Hosts group. Don't use this type directly, use NewHostsClient() instead.

func NewHostsClient

func NewHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostsClient, error)

NewHostsClient creates a new instance of HostsClient with the specified values.

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

func (*HostsClient) BeginCreate

func (client *HostsClient) BeginCreate(ctx context.Context, resourceGroupName string, hostName string, body Host, options *HostsClientBeginCreateOptions) (*runtime.Poller[HostsClientCreateResponse], error)

BeginCreate - Create Or Update host. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • hostName - Name of the host.
  • body - Request payload.
  • options - HostsClientBeginCreateOptions contains the optional parameters for the HostsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateHost.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHostsClient().BeginCreate(ctx, "testrg", "HRHost", armconnectedvmware.Host{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.HostProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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.Host = armconnectedvmware.Host{
	// 	Name: to.Ptr("HRHost"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Hosts"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/HRHost"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.HostProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*HostsClient) BeginDelete

func (client *HostsClient) BeginDelete(ctx context.Context, resourceGroupName string, hostName string, options *HostsClientBeginDeleteOptions) (*runtime.Poller[HostsClientDeleteResponse], error)

BeginDelete - Implements host DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • hostName - Name of the host.
  • options - HostsClientBeginDeleteOptions contains the optional parameters for the HostsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteHost.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHostsClient().BeginDelete(ctx, "testrg", "HRHost", &armconnectedvmware.HostsClientBeginDeleteOptions{Force: 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 (*HostsClient) Get

func (client *HostsClient) Get(ctx context.Context, resourceGroupName string, hostName string, options *HostsClientGetOptions) (HostsClientGetResponse, error)

Get - Implements host GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • hostName - Name of the host.
  • options - HostsClientGetOptions contains the optional parameters for the HostsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetHost.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHostsClient().Get(ctx, "testrg", "HRHost", 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.Host = armconnectedvmware.Host{
	// 	Name: to.Ptr("HRHost"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Hosts"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/HRHost"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.HostProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*HostsClient) NewListByResourceGroupPager

func (client *HostsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostsClientListByResourceGroupOptions) *runtime.Pager[HostsClientListByResourceGroupResponse]

NewListByResourceGroupPager - List of hosts in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - HostsClientListByResourceGroupOptions contains the optional parameters for the HostsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHostsByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHostsClient().NewListByResourceGroupPager("testrg", 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.HostsList = armconnectedvmware.HostsList{
		// 	Value: []*armconnectedvmware.Host{
		// 		{
		// 			Name: to.Ptr("HRHost"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Hosts"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/HRHost"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.HostProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*HostsClient) NewListPager

func (client *HostsClient) NewListPager(options *HostsClientListOptions) *runtime.Pager[HostsClientListResponse]

NewListPager - List of hosts in a subscription.

Generated from API version 2023-10-01

  • options - HostsClientListOptions contains the optional parameters for the HostsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListHosts.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHostsClient().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.HostsList = armconnectedvmware.HostsList{
		// 	Value: []*armconnectedvmware.Host{
		// 		{
		// 			Name: to.Ptr("HRHost"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Hosts"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/HRHost"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.HostProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*HostsClient) Update

func (client *HostsClient) Update(ctx context.Context, resourceGroupName string, hostName string, body ResourcePatch, options *HostsClientUpdateOptions) (HostsClientUpdateResponse, error)

Update - API to update certain properties of the host resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • hostName - Name of the host.
  • body - Resource properties to update.
  • options - HostsClientUpdateOptions contains the optional parameters for the HostsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateHost.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHostsClient().Update(ctx, "testrg", "HRHost", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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.Host = armconnectedvmware.Host{
	// 	Name: to.Ptr("HRHost"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/Hosts"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/HRHost"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.HostProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type HostsClientBeginCreateOptions

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

HostsClientBeginCreateOptions contains the optional parameters for the HostsClient.BeginCreate method.

type HostsClientBeginDeleteOptions

type HostsClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

HostsClientBeginDeleteOptions contains the optional parameters for the HostsClient.BeginDelete method.

type HostsClientCreateResponse

type HostsClientCreateResponse struct {
	// Define the host.
	Host
}

HostsClientCreateResponse contains the response from method HostsClient.BeginCreate.

type HostsClientDeleteResponse

type HostsClientDeleteResponse struct {
}

HostsClientDeleteResponse contains the response from method HostsClient.BeginDelete.

type HostsClientGetOptions

type HostsClientGetOptions struct {
}

HostsClientGetOptions contains the optional parameters for the HostsClient.Get method.

type HostsClientGetResponse

type HostsClientGetResponse struct {
	// Define the host.
	Host
}

HostsClientGetResponse contains the response from method HostsClient.Get.

type HostsClientListByResourceGroupOptions

type HostsClientListByResourceGroupOptions struct {
}

HostsClientListByResourceGroupOptions contains the optional parameters for the HostsClient.NewListByResourceGroupPager method.

type HostsClientListByResourceGroupResponse

type HostsClientListByResourceGroupResponse struct {
	// List of Hosts.
	HostsList
}

HostsClientListByResourceGroupResponse contains the response from method HostsClient.NewListByResourceGroupPager.

type HostsClientListOptions

type HostsClientListOptions struct {
}

HostsClientListOptions contains the optional parameters for the HostsClient.NewListPager method.

type HostsClientListResponse

type HostsClientListResponse struct {
	// List of Hosts.
	HostsList
}

HostsClientListResponse contains the response from method HostsClient.NewListPager.

type HostsClientUpdateOptions

type HostsClientUpdateOptions struct {
}

HostsClientUpdateOptions contains the optional parameters for the HostsClient.Update method.

type HostsClientUpdateResponse

type HostsClientUpdateResponse struct {
	// Define the host.
	Host
}

HostsClientUpdateResponse contains the response from method HostsClient.Update.

type HostsList

type HostsList struct {
	// REQUIRED; Array of Hosts
	Value []*Host

	// Url to follow for getting next page of Hosts.
	NextLink *string
}

HostsList - List of Hosts.

func (HostsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HostsList.

func (*HostsList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostsList.

type IPAddressAllocationMethod

type IPAddressAllocationMethod string

IPAddressAllocationMethod - IP address allocation method.

const (
	IPAddressAllocationMethodDynamic   IPAddressAllocationMethod = "dynamic"
	IPAddressAllocationMethodLinklayer IPAddressAllocationMethod = "linklayer"
	IPAddressAllocationMethodOther     IPAddressAllocationMethod = "other"
	IPAddressAllocationMethodRandom    IPAddressAllocationMethod = "random"
	IPAddressAllocationMethodStatic    IPAddressAllocationMethod = "static"
	IPAddressAllocationMethodUnset     IPAddressAllocationMethod = "unset"
)

func PossibleIPAddressAllocationMethodValues

func PossibleIPAddressAllocationMethodValues() []IPAddressAllocationMethod

PossibleIPAddressAllocationMethodValues returns the possible values for the IPAddressAllocationMethod const type.

type InfrastructureProfile added in v1.0.0

type InfrastructureProfile struct {
	// Firmware type
	FirmwareType *FirmwareType

	// Gets or sets the inventory Item ID for the virtual machine.
	InventoryItemID *string

	// Gets or sets the SMBIOS UUID of the vm.
	SmbiosUUID *string

	// Gets or sets the ARM Id of the template resource to deploy the virtual machine.
	TemplateID *string

	// Gets or sets the ARM Id of the vCenter resource in which this resource pool resides.
	VCenterID *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets or sets the folder path of the vm.
	FolderPath *string

	// READ-ONLY; Gets or sets the instance uuid of the vm.
	InstanceUUID *string

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual machine.
	MoName *string

	// READ-ONLY; Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine.
	MoRefID *string
}

InfrastructureProfile - Specifies the vCenter infrastructure specific settings for the virtual machine.

func (InfrastructureProfile) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type InfrastructureProfile.

func (*InfrastructureProfile) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type InfrastructureProfile.

type InventoryItem

type InventoryItem struct {
	// REQUIRED; Resource properties.
	Properties InventoryItemPropertiesClassification

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

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

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

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

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

InventoryItem - Defines the inventory item.

func (InventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InventoryItem.

func (*InventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItem.

type InventoryItemDetails

type InventoryItemDetails struct {
	// Gets or sets the inventory Item ID for the resource.
	InventoryItemID *string

	// The inventory type.
	InventoryType *InventoryType

	// Gets or sets the vCenter Managed Object name for the resource.
	MoName *string
}

InventoryItemDetails - Describes the properties of an Inventory Item reference.

func (InventoryItemDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InventoryItemDetails.

func (*InventoryItemDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemDetails.

type InventoryItemProperties

type InventoryItemProperties struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

InventoryItemProperties - Describes the properties of an Inventory Item.

func (*InventoryItemProperties) GetInventoryItemProperties

func (i *InventoryItemProperties) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type InventoryItemProperties.

func (InventoryItemProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InventoryItemProperties.

func (*InventoryItemProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemProperties.

type InventoryItemPropertiesClassification

type InventoryItemPropertiesClassification interface {
	// GetInventoryItemProperties returns the InventoryItemProperties content of the underlying type.
	GetInventoryItemProperties() *InventoryItemProperties
}

InventoryItemPropertiesClassification provides polymorphic access to related types. Call the interface's GetInventoryItemProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ClusterInventoryItem, *DatastoreInventoryItem, *HostInventoryItem, *InventoryItemProperties, *ResourcePoolInventoryItem, - *VirtualMachineInventoryItem, *VirtualMachineTemplateInventoryItem, *VirtualNetworkInventoryItem

type InventoryItemsClient

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

InventoryItemsClient contains the methods for the InventoryItems group. Don't use this type directly, use NewInventoryItemsClient() instead.

func NewInventoryItemsClient

func NewInventoryItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InventoryItemsClient, error)

NewInventoryItemsClient creates a new instance of InventoryItemsClient with the specified values.

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

func (*InventoryItemsClient) Create

func (client *InventoryItemsClient) Create(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, body InventoryItem, options *InventoryItemsClientCreateOptions) (InventoryItemsClientCreateResponse, error)

Create - Create Or Update InventoryItem. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • inventoryItemName - Name of the inventoryItem.
  • body - Request payload.
  • options - InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateInventoryItem.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInventoryItemsClient().Create(ctx, "testrg", "ContosoVCenter", "testItem", armconnectedvmware.InventoryItem{
		Properties: &armconnectedvmware.ResourcePoolInventoryItem{
			InventoryType: to.Ptr(armconnectedvmware.InventoryTypeResourcePool),
		},
	}, 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.InventoryItem = armconnectedvmware.InventoryItem{
	// 	Name: to.Ptr("testItem"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters/InventoryItems"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter/InventoryItems/testItem"),
	// 	Properties: &armconnectedvmware.ResourcePoolInventoryItem{
	// 		InventoryType: to.Ptr(armconnectedvmware.InventoryTypeResourcePool),
	// 	},
	// }
}
Output:

func (*InventoryItemsClient) Delete

func (client *InventoryItemsClient) Delete(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, options *InventoryItemsClientDeleteOptions) (InventoryItemsClientDeleteResponse, error)

Delete - Implements inventoryItem DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • inventoryItemName - Name of the inventoryItem.
  • options - InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteInventoryItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

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

func (*InventoryItemsClient) Get

func (client *InventoryItemsClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, inventoryItemName string, options *InventoryItemsClientGetOptions) (InventoryItemsClientGetResponse, error)

Get - Implements InventoryItem GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • inventoryItemName - Name of the inventoryItem.
  • options - InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetInventoryItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInventoryItemsClient().Get(ctx, "testrg", "ContosoVCenter", "testItem", 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.InventoryItem = armconnectedvmware.InventoryItem{
	// 	Name: to.Ptr("testItem"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters/InventoryItems"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter/InventoryItems/testItem"),
	// 	Properties: &armconnectedvmware.ResourcePoolInventoryItem{
	// 		InventoryType: to.Ptr(armconnectedvmware.InventoryTypeResourcePool),
	// 	},
	// }
}
Output:

func (*InventoryItemsClient) NewListByVCenterPager

func (client *InventoryItemsClient) NewListByVCenterPager(resourceGroupName string, vcenterName string, options *InventoryItemsClientListByVCenterOptions) *runtime.Pager[InventoryItemsClientListByVCenterResponse]

NewListByVCenterPager - Returns the list of inventoryItems of the given vCenter.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • options - InventoryItemsClientListByVCenterOptions contains the optional parameters for the InventoryItemsClient.NewListByVCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/InventoryItems_ListByVCenter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInventoryItemsClient().NewListByVCenterPager("testrg", "ContosoVCenter", 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.InventoryItemsList = armconnectedvmware.InventoryItemsList{
		// 	Value: []*armconnectedvmware.InventoryItem{
		// 		{
		// 			Name: to.Ptr("testItem"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters/InventoryItems"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter/InventoryItems/testItem"),
		// 			Properties: &armconnectedvmware.ResourcePoolInventoryItem{
		// 				InventoryType: to.Ptr(armconnectedvmware.InventoryTypeResourcePool),
		// 			},
		// 	}},
		// }
	}
}
Output:

type InventoryItemsClientCreateOptions

type InventoryItemsClientCreateOptions struct {
}

InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.

type InventoryItemsClientCreateResponse

type InventoryItemsClientCreateResponse struct {
	// Defines the inventory item.
	InventoryItem
}

InventoryItemsClientCreateResponse contains the response from method InventoryItemsClient.Create.

type InventoryItemsClientDeleteOptions

type InventoryItemsClientDeleteOptions struct {
}

InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.

type InventoryItemsClientDeleteResponse

type InventoryItemsClientDeleteResponse struct {
}

InventoryItemsClientDeleteResponse contains the response from method InventoryItemsClient.Delete.

type InventoryItemsClientGetOptions

type InventoryItemsClientGetOptions struct {
}

InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.

type InventoryItemsClientGetResponse

type InventoryItemsClientGetResponse struct {
	// Defines the inventory item.
	InventoryItem
}

InventoryItemsClientGetResponse contains the response from method InventoryItemsClient.Get.

type InventoryItemsClientListByVCenterOptions

type InventoryItemsClientListByVCenterOptions struct {
}

InventoryItemsClientListByVCenterOptions contains the optional parameters for the InventoryItemsClient.NewListByVCenterPager method.

type InventoryItemsClientListByVCenterResponse

type InventoryItemsClientListByVCenterResponse struct {
	// List of InventoryItems.
	InventoryItemsList
}

InventoryItemsClientListByVCenterResponse contains the response from method InventoryItemsClient.NewListByVCenterPager.

type InventoryItemsList

type InventoryItemsList struct {
	// REQUIRED; Array of InventoryItems
	Value []*InventoryItem

	// Url to follow for getting next page of InventoryItems.
	NextLink *string
}

InventoryItemsList - List of InventoryItems.

func (InventoryItemsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InventoryItemsList.

func (*InventoryItemsList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItemsList.

type InventoryType

type InventoryType string

InventoryType - The inventory type.

const (
	InventoryTypeCluster                InventoryType = "Cluster"
	InventoryTypeDatastore              InventoryType = "Datastore"
	InventoryTypeHost                   InventoryType = "Host"
	InventoryTypeResourcePool           InventoryType = "ResourcePool"
	InventoryTypeVirtualMachine         InventoryType = "VirtualMachine"
	InventoryTypeVirtualMachineTemplate InventoryType = "VirtualMachineTemplate"
	InventoryTypeVirtualNetwork         InventoryType = "VirtualNetwork"
)

func PossibleInventoryTypeValues

func PossibleInventoryTypeValues() []InventoryType

PossibleInventoryTypeValues returns the possible values for the InventoryType const type.

type NICType

type NICType string

NICType - NIC type

const (
	NICTypeE1000   NICType = "e1000"
	NICTypeE1000E  NICType = "e1000e"
	NICTypePcnet32 NICType = "pcnet32"
	NICTypeVmxnet  NICType = "vmxnet"
	NICTypeVmxnet2 NICType = "vmxnet2"
	NICTypeVmxnet3 NICType = "vmxnet3"
)

func PossibleNICTypeValues

func PossibleNICTypeValues() []NICType

PossibleNICTypeValues returns the possible values for the NICType const type.

type NetworkInterface

type NetworkInterface struct {
	// Gets or sets the device key value.
	DeviceKey *int32

	// Gets or sets the ipsettings.
	IPSettings *NicIPSettings

	// Gets or sets the name of the network interface.
	Name *string

	// Gets or sets the ARM Id of the network resource to connect the virtual machine.
	NetworkID *string

	// NIC type
	NicType *NICType

	// Gets or sets the power on boot.
	PowerOnBoot *PowerOnBootOption

	// READ-ONLY; Gets or sets the nic ip addresses.
	IPAddresses []*string

	// READ-ONLY; Gets or sets the label of the virtual network in vCenter that the nic is connected to.
	Label *string

	// READ-ONLY; Gets or sets the NIC MAC address.
	MacAddress *string

	// READ-ONLY; Gets or sets the name of the virtual network in vCenter that the nic is connected to.
	NetworkMoName *string

	// READ-ONLY; Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network that the nic is connected
	// to.
	NetworkMoRefID *string
}

NetworkInterface - Network Interface model

func (NetworkInterface) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkInterface.

func (*NetworkInterface) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterface.

type NetworkInterfaceUpdate

type NetworkInterfaceUpdate struct {
	// Gets or sets the device key value.
	DeviceKey *int32

	// Gets or sets the name of the network interface.
	Name *string

	// Gets or sets the ARM Id of the network resource to connect the virtual machine.
	NetworkID *string

	// NIC type
	NicType *NICType

	// Gets or sets the power on boot.
	PowerOnBoot *PowerOnBootOption
}

NetworkInterfaceUpdate - Defines the network interface update.

func (NetworkInterfaceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceUpdate.

func (*NetworkInterfaceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceUpdate.

type NetworkProfile

type NetworkProfile struct {
	// Gets or sets the list of network interfaces associated with the virtual machine.
	NetworkInterfaces []*NetworkInterface
}

NetworkProfile - Specifies the network interfaces of the virtual machine.

func (NetworkProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.

type NetworkProfileUpdate

type NetworkProfileUpdate struct {
	// Gets or sets the list of network interfaces associated with the virtual machine.
	NetworkInterfaces []*NetworkInterfaceUpdate
}

NetworkProfileUpdate - Specifies the network interfaces of the virtual machine.

func (NetworkProfileUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkProfileUpdate.

func (*NetworkProfileUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileUpdate.

type NicIPAddressSettings

type NicIPAddressSettings struct {
	// READ-ONLY; Gets the ip address allocation method.
	AllocationMethod *string

	// READ-ONLY; Gets the ip address for the nic.
	IPAddress *string

	// READ-ONLY; Gets the mask.
	SubnetMask *string
}

NicIPAddressSettings - IP address information for a virtual network adapter reported by the fabric.

func (NicIPAddressSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NicIPAddressSettings.

func (*NicIPAddressSettings) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NicIPAddressSettings.

type NicIPSettings

type NicIPSettings struct {
	// Gets or sets the nic allocation method.
	AllocationMethod *IPAddressAllocationMethod

	// Gets or sets the dns servers.
	DNSServers []*string

	// Gets or sets the gateway.
	Gateway []*string

	// Gets or sets the ip address for the nic.
	IPAddress *string

	// Gets or sets the mask.
	SubnetMask *string

	// READ-ONLY; Gets or sets the IP address information being reported for this NIC. This contains the same IPv4 information
	// above plus IPV6 information.
	IPAddressInfo []*NicIPAddressSettings

	// READ-ONLY; Gets or sets the primary server.
	PrimaryWinsServer *string

	// READ-ONLY; Gets or sets the secondary server.
	SecondaryWinsServer *string
}

NicIPSettings - Defines the network interface ip settings.

func (NicIPSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NicIPSettings.

func (*NicIPSettings) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NicIPSettings.

type Operation

type Operation struct {
	// Properties of the operation
	Display *OperationDisplay

	// Indicates whether the operation is data action or not.
	IsDataAction *bool

	// Name of the operation
	Name *string
}

Operation provided by provider

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// Description of the operation
	Description *string

	// Operation name
	Operation *string

	// Provider name
	Provider *string

	// Resource name
	Resource *string
}

OperationDisplay - Properties of the operation

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - Returns list of all operations.

Generated from API version 2023-10-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/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.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.OperationsList = armconnectedvmware.OperationsList{
		// 	Value: []*armconnectedvmware.Operation{
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/vcenters/Read"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Read vcenters"),
		// 				Operation: to.Ptr("Gets/List vcenters resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("vcenters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/vcenters/Write"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Writes vcenters"),
		// 				Operation: to.Ptr("Create/update vcenters resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("vcenters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/vcenters/Delete"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deletes vcenters"),
		// 				Operation: to.Ptr("Deletes vcenters resource"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("vcenters"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/resourcepools/Read"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Read resourcepools"),
		// 				Operation: to.Ptr("Gets/List resourcepools resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("resourcepools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/resourcepools/Write"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Writes resourcepools"),
		// 				Operation: to.Ptr("Create/update resourcepools resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("resourcepools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/resourcepools/Delete"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deletes resourcepools"),
		// 				Operation: to.Ptr("Deletes resourcepools resource"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("resourcepools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachines/Read"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Read virtualmachines"),
		// 				Operation: to.Ptr("Gets/List virtualmachines resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachines"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachines/Write"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Writes virtualmachines"),
		// 				Operation: to.Ptr("Create/update virtualmachines resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachines"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachines/Delete"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deletes virtualmachines"),
		// 				Operation: to.Ptr("Deletes virtualmachines resource"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachines"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachinetemplates/Read"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Read virtualmachinetemplates"),
		// 				Operation: to.Ptr("Gets/List virtualmachinetemplates resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachinetemplates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachinetemplates/Write"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Writes virtualmachinetemplates"),
		// 				Operation: to.Ptr("Create/update virtualmachinetemplates resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachinetemplates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachinetemplates/Delete"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deletes virtualmachinetemplates"),
		// 				Operation: to.Ptr("Deletes virtualmachinetemplates resource"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachinetemplates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualnetworks/Read"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Read virtualnetworks"),
		// 				Operation: to.Ptr("Gets/List virtualnetworks resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualnetworks"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualnetworks/Write"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Writes virtualnetworks"),
		// 				Operation: to.Ptr("Create/update virtualnetworks resources"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualnetworks"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualnetworks/Delete"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deletes virtualnetworks"),
		// 				Operation: to.Ptr("Deletes virtualnetworks resource"),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualnetworks"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/arczones/deploy/action"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deploy on arczone."),
		// 				Operation: to.Ptr("Deploy on arczone."),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("arczones"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualmachinetemplates/clone/action"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Clone on virtual machine templates."),
		// 				Operation: to.Ptr("Clone on virtual machine templates."),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualmachinetemplates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/resourcepools/deploy/action"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Deploy on resource pool."),
		// 				Operation: to.Ptr("Deploy on resource pool."),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("resourcepools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.vmware/virtualnetworks/join/action"),
		// 			Display: &armconnectedvmware.OperationDisplay{
		// 				Description: to.Ptr("Join virtual network."),
		// 				Operation: to.Ptr("Join virtual network."),
		// 				Provider: to.Ptr("microsoft.vmware"),
		// 				Resource: to.Ptr("virtualnetworks"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// Lists the operations available.
	OperationsList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OperationsList

type OperationsList struct {
	// REQUIRED; Array of operations
	Value []*Operation

	// Url to follow for getting next page of operations.
	NextLink *string
}

OperationsList - Lists the operations available.

func (OperationsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationsList.

func (*OperationsList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationsList.

type OsProfileForVMInstance added in v1.0.0

type OsProfileForVMInstance struct {
	// Sets administrator password.
	AdminPassword *string

	// Gets or sets administrator username.
	AdminUsername *string

	// Gets or sets computer name.
	ComputerName *string

	// Gets or sets the guestId.
	GuestID *string

	// Gets or sets the type of the os.
	OSType *OsType

	// READ-ONLY; Gets or sets os sku.
	OSSKU *string

	// READ-ONLY; Gets or sets the current running status of VMware Tools running in the guest operating system.
	ToolsRunningStatus *string

	// READ-ONLY; Gets or sets the current version of VMware Tools.
	ToolsVersion *string

	// READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system.
	ToolsVersionStatus *string
}

OsProfileForVMInstance - Specifies the operating system settings for the virtual machine.

func (OsProfileForVMInstance) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type OsProfileForVMInstance.

func (*OsProfileForVMInstance) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OsProfileForVMInstance.

type OsType

type OsType string

OsType - Defines the different types of VM guest operating systems.

const (
	OsTypeLinux   OsType = "Linux"
	OsTypeOther   OsType = "Other"
	OsTypeWindows OsType = "Windows"
)

func PossibleOsTypeValues

func PossibleOsTypeValues() []OsType

PossibleOsTypeValues returns the possible values for the OsType const type.

type PlacementProfile

type PlacementProfile struct {
	// Gets or sets the ARM Id of the cluster resource on which this virtual machine will deploy.
	ClusterID *string

	// Gets or sets the ARM Id of the datastore resource on which the data for the virtual machine will be kept.
	DatastoreID *string

	// Gets or sets the ARM Id of the host resource on which this virtual machine will deploy.
	HostID *string

	// Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy.
	ResourcePoolID *string
}

PlacementProfile - Specifies the compute and storage placement settings for the virtual machine.

func (PlacementProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PlacementProfile.

func (*PlacementProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PlacementProfile.

type PowerOnBootOption

type PowerOnBootOption string

PowerOnBootOption - Defines the options for power on boot.

const (
	PowerOnBootOptionDisabled PowerOnBootOption = "disabled"
	PowerOnBootOptionEnabled  PowerOnBootOption = "enabled"
)

func PossiblePowerOnBootOptionValues

func PossiblePowerOnBootOptionValues() []PowerOnBootOption

PossiblePowerOnBootOptionValues returns the possible values for the PowerOnBootOption const type.

type ProvisioningAction

type ProvisioningAction string

ProvisioningAction - Defines the different types of operations for guest agent.

const (
	ProvisioningActionInstall   ProvisioningAction = "install"
	ProvisioningActionRepair    ProvisioningAction = "repair"
	ProvisioningActionUninstall ProvisioningAction = "uninstall"
)

func PossibleProvisioningActionValues

func PossibleProvisioningActionValues() []ProvisioningAction

PossibleProvisioningActionValues returns the possible values for the ProvisioningAction const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The current deployment state of resource.

const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourcePatch

type ResourcePatch struct {
	// Resource tags.
	Tags map[string]*string
}

ResourcePatch - Object containing updates for patch operations.

func (ResourcePatch) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourcePatch.

func (*ResourcePatch) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePatch.

type ResourcePool

type ResourcePool struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *ResourcePoolProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

ResourcePool - Define the resourcePool.

func (ResourcePool) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourcePool.

func (*ResourcePool) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePool.

type ResourcePoolInventoryItem

type ResourcePoolInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// Parent resourcePool inventory resource details.
	Parent *InventoryItemDetails

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

ResourcePoolInventoryItem - The resource pool inventory item.

func (*ResourcePoolInventoryItem) GetInventoryItemProperties

func (r *ResourcePoolInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type ResourcePoolInventoryItem.

func (ResourcePoolInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourcePoolInventoryItem.

func (*ResourcePoolInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolInventoryItem.

type ResourcePoolProperties

type ResourcePoolProperties struct {
	// Gets or sets the inventory Item ID for the resource pool.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the resource pool.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this resource pool resides.
	VCenterID *string

	// READ-ONLY; Gets the max CPU usage across all cores on the pool in MHz.
	CPUCapacityMHz *int64

	// READ-ONLY; Gets or sets CPULimitMHz which specifies a CPU usage limit in MHz. Utilization will not exceed this limit even
	// if there are available resources.
	CPULimitMHz *int64

	// READ-ONLY; Gets the used CPU usage across all cores on the pool in MHz.
	CPUOverallUsageMHz *int64

	// READ-ONLY; Gets or sets CPUReservationMHz which specifies the CPU size in MHz that is guaranteed to be available.
	CPUReservationMHz *int64

	// READ-ONLY; Gets or sets CPUSharesLevel which specifies the CPU allocation level for this pool. This property is used in
	// relative allocation between resource consumers.
	CPUSharesLevel *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets the datastore ARM ids.
	DatastoreIDs []*string

	// READ-ONLY; Gets the total amount of physical memory on the pool in GB.
	MemCapacityGB *int64

	// READ-ONLY; Gets or sets MemLimitMB specifies a memory usage limit in megabytes. Utilization will not exceed the specified
	// limit even if there are available resources.
	MemLimitMB *int64

	// READ-ONLY; Gets the used physical memory on the pool in GB.
	MemOverallUsageGB *int64

	// READ-ONLY; Gets or sets MemReservationMB which specifies the guaranteed available memory in megabytes.
	MemReservationMB *int64

	// READ-ONLY; Gets or sets CPUSharesLevel which specifies the memory allocation level for this pool. This property is used
	// in relative allocation between resource consumers.
	MemSharesLevel *string

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the resource pool.
	MoName *string

	// READ-ONLY; Gets the network ARM ids.
	NetworkIDs []*string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

ResourcePoolProperties - Describes the properties of a Resource Pool.

func (ResourcePoolProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourcePoolProperties.

func (*ResourcePoolProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolProperties.

type ResourcePoolsClient

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

ResourcePoolsClient contains the methods for the ResourcePools group. Don't use this type directly, use NewResourcePoolsClient() instead.

func NewResourcePoolsClient

func NewResourcePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourcePoolsClient, error)

NewResourcePoolsClient creates a new instance of ResourcePoolsClient with the specified values.

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

func (*ResourcePoolsClient) BeginCreate

func (client *ResourcePoolsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourcePoolName string, body ResourcePool, options *ResourcePoolsClientBeginCreateOptions) (*runtime.Poller[ResourcePoolsClientCreateResponse], error)

BeginCreate - Create Or Update resourcePool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • resourcePoolName - Name of the resourcePool.
  • body - Request payload.
  • options - ResourcePoolsClientBeginCreateOptions contains the optional parameters for the ResourcePoolsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateResourcePool.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewResourcePoolsClient().BeginCreate(ctx, "testrg", "HRPool", armconnectedvmware.ResourcePool{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.ResourcePoolProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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.ResourcePool = armconnectedvmware.ResourcePool{
	// 	Name: to.Ptr("HRPool"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/ResourcePools"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ResourcePoolProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*ResourcePoolsClient) BeginDelete

func (client *ResourcePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourcePoolName string, options *ResourcePoolsClientBeginDeleteOptions) (*runtime.Poller[ResourcePoolsClientDeleteResponse], error)

BeginDelete - Implements resourcePool DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • resourcePoolName - Name of the resourcePool.
  • options - ResourcePoolsClientBeginDeleteOptions contains the optional parameters for the ResourcePoolsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteResourcePool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewResourcePoolsClient().BeginDelete(ctx, "testrg", "HRPool", &armconnectedvmware.ResourcePoolsClientBeginDeleteOptions{Force: 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 (*ResourcePoolsClient) Get

func (client *ResourcePoolsClient) Get(ctx context.Context, resourceGroupName string, resourcePoolName string, options *ResourcePoolsClientGetOptions) (ResourcePoolsClientGetResponse, error)

Get - Implements resourcePool GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • resourcePoolName - Name of the resourcePool.
  • options - ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetResourcePool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewResourcePoolsClient().Get(ctx, "testrg", "HRPool", 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.ResourcePool = armconnectedvmware.ResourcePool{
	// 	Name: to.Ptr("HRPool"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/ResourcePools"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ResourcePoolProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*ResourcePoolsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List of resourcePools in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - ResourcePoolsClientListByResourceGroupOptions contains the optional parameters for the ResourcePoolsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePoolsByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewResourcePoolsClient().NewListByResourceGroupPager("testrg", 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.ResourcePoolsList = armconnectedvmware.ResourcePoolsList{
		// 	Value: []*armconnectedvmware.ResourcePool{
		// 		{
		// 			Name: to.Ptr("HRPool"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/ResourcePools"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.ResourcePoolProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ResourcePoolsClient) NewListPager

NewListPager - List of resourcePools in a subscription.

Generated from API version 2023-10-01

  • options - ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListResourcePools.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewResourcePoolsClient().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.ResourcePoolsList = armconnectedvmware.ResourcePoolsList{
		// 	Value: []*armconnectedvmware.ResourcePool{
		// 		{
		// 			Name: to.Ptr("HRPool"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/ResourcePools"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.ResourcePoolProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ResourcePoolsClient) Update

func (client *ResourcePoolsClient) Update(ctx context.Context, resourceGroupName string, resourcePoolName string, body ResourcePatch, options *ResourcePoolsClientUpdateOptions) (ResourcePoolsClientUpdateResponse, error)

Update - API to update certain properties of the resourcePool resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • resourcePoolName - Name of the resourcePool.
  • body - Resource properties to update.
  • options - ResourcePoolsClientUpdateOptions contains the optional parameters for the ResourcePoolsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateResourcePool.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewResourcePoolsClient().Update(ctx, "testrg", "HRPool", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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.ResourcePool = armconnectedvmware.ResourcePool{
	// 	Name: to.Ptr("HRPool"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/ResourcePools"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.ResourcePoolProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type ResourcePoolsClientBeginCreateOptions

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

ResourcePoolsClientBeginCreateOptions contains the optional parameters for the ResourcePoolsClient.BeginCreate method.

type ResourcePoolsClientBeginDeleteOptions

type ResourcePoolsClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

ResourcePoolsClientBeginDeleteOptions contains the optional parameters for the ResourcePoolsClient.BeginDelete method.

type ResourcePoolsClientCreateResponse

type ResourcePoolsClientCreateResponse struct {
	// Define the resourcePool.
	ResourcePool
}

ResourcePoolsClientCreateResponse contains the response from method ResourcePoolsClient.BeginCreate.

type ResourcePoolsClientDeleteResponse

type ResourcePoolsClientDeleteResponse struct {
}

ResourcePoolsClientDeleteResponse contains the response from method ResourcePoolsClient.BeginDelete.

type ResourcePoolsClientGetOptions

type ResourcePoolsClientGetOptions struct {
}

ResourcePoolsClientGetOptions contains the optional parameters for the ResourcePoolsClient.Get method.

type ResourcePoolsClientGetResponse

type ResourcePoolsClientGetResponse struct {
	// Define the resourcePool.
	ResourcePool
}

ResourcePoolsClientGetResponse contains the response from method ResourcePoolsClient.Get.

type ResourcePoolsClientListByResourceGroupOptions

type ResourcePoolsClientListByResourceGroupOptions struct {
}

ResourcePoolsClientListByResourceGroupOptions contains the optional parameters for the ResourcePoolsClient.NewListByResourceGroupPager method.

type ResourcePoolsClientListByResourceGroupResponse

type ResourcePoolsClientListByResourceGroupResponse struct {
	// List of ResourcePools.
	ResourcePoolsList
}

ResourcePoolsClientListByResourceGroupResponse contains the response from method ResourcePoolsClient.NewListByResourceGroupPager.

type ResourcePoolsClientListOptions

type ResourcePoolsClientListOptions struct {
}

ResourcePoolsClientListOptions contains the optional parameters for the ResourcePoolsClient.NewListPager method.

type ResourcePoolsClientListResponse

type ResourcePoolsClientListResponse struct {
	// List of ResourcePools.
	ResourcePoolsList
}

ResourcePoolsClientListResponse contains the response from method ResourcePoolsClient.NewListPager.

type ResourcePoolsClientUpdateOptions

type ResourcePoolsClientUpdateOptions struct {
}

ResourcePoolsClientUpdateOptions contains the optional parameters for the ResourcePoolsClient.Update method.

type ResourcePoolsClientUpdateResponse

type ResourcePoolsClientUpdateResponse struct {
	// Define the resourcePool.
	ResourcePool
}

ResourcePoolsClientUpdateResponse contains the response from method ResourcePoolsClient.Update.

type ResourcePoolsList

type ResourcePoolsList struct {
	// REQUIRED; Array of ResourcePools
	Value []*ResourcePool

	// Url to follow for getting next page of ResourcePools.
	NextLink *string
}

ResourcePoolsList - List of ResourcePools.

func (ResourcePoolsList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourcePoolsList.

func (*ResourcePoolsList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePoolsList.

type ResourceStatus

type ResourceStatus struct {
	// READ-ONLY; The last update time for this condition.
	LastUpdatedAt *time.Time

	// READ-ONLY; A human readable message indicating details about the status.
	Message *string

	// READ-ONLY; The reason for the condition's status.
	Reason *string

	// READ-ONLY; Severity with which to treat failures of this type of condition.
	Severity *string

	// READ-ONLY; Status of the condition.
	Status *string

	// READ-ONLY; The type of the condition.
	Type *string
}

ResourceStatus - The resource status information.

func (ResourceStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceStatus.

func (*ResourceStatus) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceStatus.

type SCSIControllerType

type SCSIControllerType string

SCSIControllerType - Defines the different types of SCSI controllers.

const (
	SCSIControllerTypeBuslogic    SCSIControllerType = "buslogic"
	SCSIControllerTypeLsilogic    SCSIControllerType = "lsilogic"
	SCSIControllerTypeLsilogicsas SCSIControllerType = "lsilogicsas"
	SCSIControllerTypePvscsi      SCSIControllerType = "pvscsi"
)

func PossibleSCSIControllerTypeValues

func PossibleSCSIControllerTypeValues() []SCSIControllerType

PossibleSCSIControllerTypeValues returns the possible values for the SCSIControllerType const type.

type SecurityProfile

type SecurityProfile struct {
	// Specifies the security settings like secure boot used while creating the virtual machine.
	UefiSettings *UefiSettings
}

SecurityProfile - Specifies the Security profile settings for the virtual machine.

func (SecurityProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SecurityProfile.

func (*SecurityProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.

type StopVirtualMachineOptions

type StopVirtualMachineOptions struct {
	// Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful
	// shutdown whereas false indicates otherwise. Defaults to false.
	SkipShutdown *bool
}

StopVirtualMachineOptions - Defines the stop action properties.

func (StopVirtualMachineOptions) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StopVirtualMachineOptions.

func (*StopVirtualMachineOptions) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StopVirtualMachineOptions.

type StorageProfile

type StorageProfile struct {
	// Gets or sets the list of virtual disks associated with the virtual machine.
	Disks []*VirtualDisk

	// READ-ONLY; Gets or sets the list of virtual SCSI controllers associated with the virtual machine.
	ScsiControllers []*VirtualSCSIController
}

StorageProfile - Specifies the storage settings for the virtual machine disks.

func (StorageProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageProfile.

func (*StorageProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.

type StorageProfileUpdate

type StorageProfileUpdate struct {
	// Gets or sets the list of virtual disks associated with the virtual machine.
	Disks []*VirtualDiskUpdate
}

StorageProfileUpdate - Specifies the storage settings for the virtual machine disks.

func (StorageProfileUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageProfileUpdate.

func (*StorageProfileUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileUpdate.

type SystemData

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

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

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

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

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

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

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

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UefiSettings

type UefiSettings struct {
	// Specifies whether secure boot should be enabled on the virtual machine.
	SecureBootEnabled *bool
}

UefiSettings - Specifies the security settings like secure boot used while creating the virtual machine.

func (UefiSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UefiSettings.

func (*UefiSettings) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UefiSettings.

type VCenter

type VCenter struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *VCenterProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

VCenter - Defines the vCenter.

func (VCenter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VCenter.

func (*VCenter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VCenter.

type VCenterProperties

type VCenterProperties struct {
	// REQUIRED; Gets or sets the FQDN/IPAddress of the vCenter.
	Fqdn *string

	// Username / Password Credentials to connect to vcenter.
	Credentials *VICredential

	// Gets or sets the port of the vCenter.
	Port *int32

	// READ-ONLY; Gets or sets the connection status to the vCenter.
	ConnectionStatus *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets or sets the instance UUID of the vCenter.
	InstanceUUID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string

	// READ-ONLY; Gets or sets the version of the vCenter.
	Version *string
}

VCenterProperties - Describes the properties of a VCenter.

func (VCenterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VCenterProperties.

func (*VCenterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VCenterProperties.

type VCentersClient

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

VCentersClient contains the methods for the VCenters group. Don't use this type directly, use NewVCentersClient() instead.

func NewVCentersClient

func NewVCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VCentersClient, error)

NewVCentersClient creates a new instance of VCentersClient with the specified values.

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

func (*VCentersClient) BeginCreate

func (client *VCentersClient) BeginCreate(ctx context.Context, resourceGroupName string, vcenterName string, body VCenter, options *VCentersClientBeginCreateOptions) (*runtime.Poller[VCentersClientCreateResponse], error)

BeginCreate - Create Or Update vCenter. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • body - Request payload.
  • options - VCentersClientBeginCreateOptions contains the optional parameters for the VCentersClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVCenter.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVCentersClient().BeginCreate(ctx, "testrg", "ContosoVCenter", armconnectedvmware.VCenter{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.VCenterProperties{
			Credentials: &armconnectedvmware.VICredential{
				Password: to.Ptr("<password>"),
				Username: to.Ptr("tempuser"),
			},
			Fqdn: to.Ptr("ContosoVMware.contoso.com"),
			Port: to.Ptr[int32](1234),
		},
	}, 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.VCenter = armconnectedvmware.VCenter{
	// 	Name: to.Ptr("ContosoVCenter"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VCenterProperties{
	// 		Credentials: &armconnectedvmware.VICredential{
	// 			Username: to.Ptr("tempuser"),
	// 		},
	// 		Fqdn: to.Ptr("ContosoVMware.contoso.com"),
	// 		InstanceUUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		Port: to.Ptr[int32](1234),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		Version: to.Ptr("1.0"),
	// 	},
	// }
}
Output:

func (*VCentersClient) BeginDelete

func (client *VCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, vcenterName string, options *VCentersClientBeginDeleteOptions) (*runtime.Poller[VCentersClientDeleteResponse], error)

BeginDelete - Implements vCenter DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • options - VCentersClientBeginDeleteOptions contains the optional parameters for the VCentersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVCenter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVCentersClient().BeginDelete(ctx, "testrg", "ContosoVCenter", &armconnectedvmware.VCentersClientBeginDeleteOptions{Force: 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 (*VCentersClient) Get

func (client *VCentersClient) Get(ctx context.Context, resourceGroupName string, vcenterName string, options *VCentersClientGetOptions) (VCentersClientGetResponse, error)

Get - Implements vCenter GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • options - VCentersClientGetOptions contains the optional parameters for the VCentersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVCenter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVCentersClient().Get(ctx, "testrg", "ContosoVCenter", 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.VCenter = armconnectedvmware.VCenter{
	// 	Name: to.Ptr("ContosoVCenter"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VCenterProperties{
	// 		Credentials: &armconnectedvmware.VICredential{
	// 			Username: to.Ptr("tempuser"),
	// 		},
	// 		Fqdn: to.Ptr("ContosoVMware.contoso.com"),
	// 		InstanceUUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		Port: to.Ptr[int32](1234),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		Version: to.Ptr("1.0"),
	// 	},
	// }
}
Output:

func (*VCentersClient) NewListByResourceGroupPager

func (client *VCentersClient) NewListByResourceGroupPager(resourceGroupName string, options *VCentersClientListByResourceGroupOptions) *runtime.Pager[VCentersClientListByResourceGroupResponse]

NewListByResourceGroupPager - List of vCenters in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - VCentersClientListByResourceGroupOptions contains the optional parameters for the VCentersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCentersByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVCentersClient().NewListByResourceGroupPager("testrg", 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.VCentersList = armconnectedvmware.VCentersList{
		// 	Value: []*armconnectedvmware.VCenter{
		// 		{
		// 			Name: to.Ptr("ContosoVCenter"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VCenterProperties{
		// 				Credentials: &armconnectedvmware.VICredential{
		// 					Username: to.Ptr("tempuser"),
		// 				},
		// 				Fqdn: to.Ptr("ContosoVMware.contoso.com"),
		// 				InstanceUUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				Port: to.Ptr[int32](1234),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				Version: to.Ptr("1.0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VCentersClient) NewListPager

NewListPager - List of vCenters in a subscription.

Generated from API version 2023-10-01

  • options - VCentersClientListOptions contains the optional parameters for the VCentersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVCenters.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVCentersClient().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.VCentersList = armconnectedvmware.VCentersList{
		// 	Value: []*armconnectedvmware.VCenter{
		// 		{
		// 			Name: to.Ptr("ContosoVCenter"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VCenterProperties{
		// 				Credentials: &armconnectedvmware.VICredential{
		// 					Username: to.Ptr("tempuser"),
		// 				},
		// 				Fqdn: to.Ptr("ContosoVMware.contoso.com"),
		// 				InstanceUUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				Port: to.Ptr[int32](1234),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				Version: to.Ptr("1.0"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VCentersClient) Update

func (client *VCentersClient) Update(ctx context.Context, resourceGroupName string, vcenterName string, body ResourcePatch, options *VCentersClientUpdateOptions) (VCentersClientUpdateResponse, error)

Update - API to update certain properties of the vCenter resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • vcenterName - Name of the vCenter.
  • body - Resource properties to update.
  • options - VCentersClientUpdateOptions contains the optional parameters for the VCentersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVCenter.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVCentersClient().Update(ctx, "testrg", "ContosoVCenter", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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.VCenter = armconnectedvmware.VCenter{
	// 	Name: to.Ptr("ContosoVCenter"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VCenters"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VCenterProperties{
	// 		Credentials: &armconnectedvmware.VICredential{
	// 			Username: to.Ptr("tempuser"),
	// 		},
	// 		Fqdn: to.Ptr("ContosoVMware.contoso.com"),
	// 		InstanceUUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		Port: to.Ptr[int32](1234),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		Version: to.Ptr("1.0"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type VCentersClientBeginCreateOptions

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

VCentersClientBeginCreateOptions contains the optional parameters for the VCentersClient.BeginCreate method.

type VCentersClientBeginDeleteOptions

type VCentersClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VCentersClientBeginDeleteOptions contains the optional parameters for the VCentersClient.BeginDelete method.

type VCentersClientCreateResponse

type VCentersClientCreateResponse struct {
	// Defines the vCenter.
	VCenter
}

VCentersClientCreateResponse contains the response from method VCentersClient.BeginCreate.

type VCentersClientDeleteResponse

type VCentersClientDeleteResponse struct {
}

VCentersClientDeleteResponse contains the response from method VCentersClient.BeginDelete.

type VCentersClientGetOptions

type VCentersClientGetOptions struct {
}

VCentersClientGetOptions contains the optional parameters for the VCentersClient.Get method.

type VCentersClientGetResponse

type VCentersClientGetResponse struct {
	// Defines the vCenter.
	VCenter
}

VCentersClientGetResponse contains the response from method VCentersClient.Get.

type VCentersClientListByResourceGroupOptions

type VCentersClientListByResourceGroupOptions struct {
}

VCentersClientListByResourceGroupOptions contains the optional parameters for the VCentersClient.NewListByResourceGroupPager method.

type VCentersClientListByResourceGroupResponse

type VCentersClientListByResourceGroupResponse struct {
	// List of VCenters.
	VCentersList
}

VCentersClientListByResourceGroupResponse contains the response from method VCentersClient.NewListByResourceGroupPager.

type VCentersClientListOptions

type VCentersClientListOptions struct {
}

VCentersClientListOptions contains the optional parameters for the VCentersClient.NewListPager method.

type VCentersClientListResponse

type VCentersClientListResponse struct {
	// List of VCenters.
	VCentersList
}

VCentersClientListResponse contains the response from method VCentersClient.NewListPager.

type VCentersClientUpdateOptions

type VCentersClientUpdateOptions struct {
}

VCentersClientUpdateOptions contains the optional parameters for the VCentersClient.Update method.

type VCentersClientUpdateResponse

type VCentersClientUpdateResponse struct {
	// Defines the vCenter.
	VCenter
}

VCentersClientUpdateResponse contains the response from method VCentersClient.Update.

type VCentersList

type VCentersList struct {
	// REQUIRED; Array of VCenters
	Value []*VCenter

	// Url to follow for getting next page of VCenters.
	NextLink *string
}

VCentersList - List of VCenters.

func (VCentersList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VCentersList.

func (*VCentersList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VCentersList.

type VICredential

type VICredential struct {
	// Gets or sets the password to connect with the vCenter.
	Password *string

	// Gets or sets username to connect with the vCenter.
	Username *string
}

VICredential - Username / Password Credentials to connect to vcenter.

func (VICredential) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VICredential.

func (*VICredential) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VICredential.

type VMInstanceGuestAgentsClient added in v1.0.0

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

VMInstanceGuestAgentsClient contains the methods for the VMInstanceGuestAgents group. Don't use this type directly, use NewVMInstanceGuestAgentsClient() instead.

func NewVMInstanceGuestAgentsClient added in v1.0.0

func NewVMInstanceGuestAgentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VMInstanceGuestAgentsClient, error)

NewVMInstanceGuestAgentsClient creates a new instance of VMInstanceGuestAgentsClient with the specified values.

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

func (*VMInstanceGuestAgentsClient) BeginCreate added in v1.0.0

BeginCreate - Create Or Update GuestAgent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • body - Request payload.
  • options - VMInstanceGuestAgentsClientBeginCreateOptions contains the optional parameters for the VMInstanceGuestAgentsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVMInstanceGuestAgent.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVMInstanceGuestAgentsClient().BeginCreate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armconnectedvmware.GuestAgent{
		Properties: &armconnectedvmware.GuestAgentProperties{
			Credentials: &armconnectedvmware.GuestCredential{
				Password: to.Ptr("<password>"),
				Username: to.Ptr("tempuser"),
			},
			HTTPProxyConfig: &armconnectedvmware.HTTPProxyConfiguration{
				HTTPSProxy: to.Ptr("http://192.1.2.3:8080"),
			},
			PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
			ProvisioningAction:         to.Ptr(armconnectedvmware.ProvisioningActionInstall),
		},
	}, 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.GuestAgent = armconnectedvmware.GuestAgent{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances/guestAgents"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"),
	// 	Properties: &armconnectedvmware.GuestAgentProperties{
	// 		ProvisioningAction: to.Ptr(armconnectedvmware.ProvisioningActionInstall),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		Status: to.Ptr("connected"),
	// 	},
	// }
}
Output:

func (*VMInstanceGuestAgentsClient) BeginDelete added in v1.0.0

BeginDelete - Implements GuestAgent DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VMInstanceGuestAgentsClientBeginDeleteOptions contains the optional parameters for the VMInstanceGuestAgentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVMInstanceGuestAgent.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVMInstanceGuestAgentsClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 (*VMInstanceGuestAgentsClient) Get added in v1.0.0

Get - Implements GuestAgent GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VMInstanceGuestAgentsClientGetOptions contains the optional parameters for the VMInstanceGuestAgentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVMInstanceGuestAgent.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVMInstanceGuestAgentsClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.GuestAgent = armconnectedvmware.GuestAgent{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VitualMachineInstances/guestAgents"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"),
	// 	Properties: &armconnectedvmware.GuestAgentProperties{
	// 		ProvisioningAction: to.Ptr(armconnectedvmware.ProvisioningActionInstall),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		Status: to.Ptr("connected"),
	// 	},
	// }
}
Output:

func (*VMInstanceGuestAgentsClient) NewListPager added in v1.0.0

NewListPager - Returns the list of GuestAgent of the given vm.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VMInstanceGuestAgentsClientListOptions contains the optional parameters for the VMInstanceGuestAgentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/VMInstanceGuestAgent_ListByVm.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVMInstanceGuestAgentsClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.GuestAgentList = armconnectedvmware.GuestAgentList{
		// 	Value: []*armconnectedvmware.GuestAgent{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VitualMachineInstances/guestAgents"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"),
		// 			Properties: &armconnectedvmware.GuestAgentProperties{
		// 				ProvisioningAction: to.Ptr(armconnectedvmware.ProvisioningActionInstall),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				Status: to.Ptr("connected"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VMInstanceGuestAgentsClientBeginCreateOptions added in v1.0.0

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

VMInstanceGuestAgentsClientBeginCreateOptions contains the optional parameters for the VMInstanceGuestAgentsClient.BeginCreate method.

type VMInstanceGuestAgentsClientBeginDeleteOptions added in v1.0.0

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

VMInstanceGuestAgentsClientBeginDeleteOptions contains the optional parameters for the VMInstanceGuestAgentsClient.BeginDelete method.

type VMInstanceGuestAgentsClientCreateResponse added in v1.0.0

type VMInstanceGuestAgentsClientCreateResponse struct {
	// Defines the GuestAgent.
	GuestAgent
}

VMInstanceGuestAgentsClientCreateResponse contains the response from method VMInstanceGuestAgentsClient.BeginCreate.

type VMInstanceGuestAgentsClientDeleteResponse added in v1.0.0

type VMInstanceGuestAgentsClientDeleteResponse struct {
}

VMInstanceGuestAgentsClientDeleteResponse contains the response from method VMInstanceGuestAgentsClient.BeginDelete.

type VMInstanceGuestAgentsClientGetOptions added in v1.0.0

type VMInstanceGuestAgentsClientGetOptions struct {
}

VMInstanceGuestAgentsClientGetOptions contains the optional parameters for the VMInstanceGuestAgentsClient.Get method.

type VMInstanceGuestAgentsClientGetResponse added in v1.0.0

type VMInstanceGuestAgentsClientGetResponse struct {
	// Defines the GuestAgent.
	GuestAgent
}

VMInstanceGuestAgentsClientGetResponse contains the response from method VMInstanceGuestAgentsClient.Get.

type VMInstanceGuestAgentsClientListOptions added in v1.0.0

type VMInstanceGuestAgentsClientListOptions struct {
}

VMInstanceGuestAgentsClientListOptions contains the optional parameters for the VMInstanceGuestAgentsClient.NewListPager method.

type VMInstanceGuestAgentsClientListResponse added in v1.0.0

type VMInstanceGuestAgentsClientListResponse struct {
	// List of GuestAgent.
	GuestAgentList
}

VMInstanceGuestAgentsClientListResponse contains the response from method VMInstanceGuestAgentsClient.NewListPager.

type VMInstanceHybridIdentityMetadata added in v1.0.0

type VMInstanceHybridIdentityMetadata struct {
	// REQUIRED; Resource properties.
	Properties *VMInstanceHybridIdentityMetadataProperties

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

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

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

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

VMInstanceHybridIdentityMetadata - Defines the HybridIdentityMetadata.

func (VMInstanceHybridIdentityMetadata) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VMInstanceHybridIdentityMetadata.

func (*VMInstanceHybridIdentityMetadata) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMInstanceHybridIdentityMetadata.

type VMInstanceHybridIdentityMetadataClient added in v1.0.0

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

VMInstanceHybridIdentityMetadataClient contains the methods for the VMInstanceHybridIdentityMetadata group. Don't use this type directly, use NewVMInstanceHybridIdentityMetadataClient() instead.

func NewVMInstanceHybridIdentityMetadataClient added in v1.0.0

func NewVMInstanceHybridIdentityMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VMInstanceHybridIdentityMetadataClient, error)

NewVMInstanceHybridIdentityMetadataClient creates a new instance of VMInstanceHybridIdentityMetadataClient with the specified values.

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

func (*VMInstanceHybridIdentityMetadataClient) Get added in v1.0.0

Get - Implements HybridIdentityMetadata GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VMInstanceHybridIdentityMetadataClientGetOptions contains the optional parameters for the VMInstanceHybridIdentityMetadataClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVmInstanceHybridIdentityMetadata.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVMInstanceHybridIdentityMetadataClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.VMInstanceHybridIdentityMetadata = armconnectedvmware.VMInstanceHybridIdentityMetadata{
	// 	Name: to.Ptr("testItem"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VitualMachineInstances/hybridIdentityMetadata"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/VitualMachineInstances/default/hybridIdentityMetadata/default"),
	// 	Properties: &armconnectedvmware.VMInstanceHybridIdentityMetadataProperties{
	// 		PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"),
	// 		ResourceUID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"),
	// 	},
	// }
}
Output:

func (*VMInstanceHybridIdentityMetadataClient) NewListPager added in v1.0.0

NewListPager - Returns the list of HybridIdentityMetadata of the given vm.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VMInstanceHybridIdentityMetadataClientListOptions contains the optional parameters for the VMInstanceHybridIdentityMetadataClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/HybridIdentityMetadata_ListByVmInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVMInstanceHybridIdentityMetadataClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.VMInstanceHybridIdentityMetadataList = armconnectedvmware.VMInstanceHybridIdentityMetadataList{
		// 	Value: []*armconnectedvmware.VMInstanceHybridIdentityMetadata{
		// 		{
		// 			Name: to.Ptr("testItem"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances/hybridIdentityMetadata"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances/default/hybridIdentityMetadata/default"),
		// 			Properties: &armconnectedvmware.VMInstanceHybridIdentityMetadataProperties{
		// 				PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"),
		// 				ResourceUID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VMInstanceHybridIdentityMetadataClientGetOptions added in v1.0.0

type VMInstanceHybridIdentityMetadataClientGetOptions struct {
}

VMInstanceHybridIdentityMetadataClientGetOptions contains the optional parameters for the VMInstanceHybridIdentityMetadataClient.Get method.

type VMInstanceHybridIdentityMetadataClientGetResponse added in v1.0.0

type VMInstanceHybridIdentityMetadataClientGetResponse struct {
	// Defines the HybridIdentityMetadata.
	VMInstanceHybridIdentityMetadata
}

VMInstanceHybridIdentityMetadataClientGetResponse contains the response from method VMInstanceHybridIdentityMetadataClient.Get.

type VMInstanceHybridIdentityMetadataClientListOptions added in v1.0.0

type VMInstanceHybridIdentityMetadataClientListOptions struct {
}

VMInstanceHybridIdentityMetadataClientListOptions contains the optional parameters for the VMInstanceHybridIdentityMetadataClient.NewListPager method.

type VMInstanceHybridIdentityMetadataClientListResponse added in v1.0.0

type VMInstanceHybridIdentityMetadataClientListResponse struct {
	// List of HybridIdentityMetadata.
	VMInstanceHybridIdentityMetadataList
}

VMInstanceHybridIdentityMetadataClientListResponse contains the response from method VMInstanceHybridIdentityMetadataClient.NewListPager.

type VMInstanceHybridIdentityMetadataList added in v1.0.0

type VMInstanceHybridIdentityMetadataList struct {
	// REQUIRED; Array of HybridIdentityMetadata
	Value []*VMInstanceHybridIdentityMetadata

	// Url to follow for getting next page of HybridIdentityMetadata.
	NextLink *string
}

VMInstanceHybridIdentityMetadataList - List of HybridIdentityMetadata.

func (VMInstanceHybridIdentityMetadataList) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VMInstanceHybridIdentityMetadataList.

func (*VMInstanceHybridIdentityMetadataList) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMInstanceHybridIdentityMetadataList.

type VMInstanceHybridIdentityMetadataProperties added in v1.0.0

type VMInstanceHybridIdentityMetadataProperties struct {
	// Gets or sets the Public Key.
	PublicKey *string

	// The unique identifier for the resource.
	ResourceUID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

VMInstanceHybridIdentityMetadataProperties - Describes the properties of Hybrid Identity Metadata for a Virtual Machine.

func (VMInstanceHybridIdentityMetadataProperties) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type VMInstanceHybridIdentityMetadataProperties.

func (*VMInstanceHybridIdentityMetadataProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMInstanceHybridIdentityMetadataProperties.

type VirtualDisk

type VirtualDisk struct {
	// Gets or sets the controller id.
	ControllerKey *int32

	// Gets or sets the device key value.
	DeviceKey *int32

	// Gets or sets the device name.
	DeviceName *string

	// Gets or sets the disk mode.
	DiskMode *DiskMode

	// Gets or sets the disk total size.
	DiskSizeGB *int32

	// Gets or sets the disk backing type.
	DiskType *DiskType

	// Gets or sets the name of the virtual disk.
	Name *string

	// Gets or sets the unit number of the disk on the controller.
	UnitNumber *int32

	// READ-ONLY; Gets or sets the disk object id.
	DiskObjectID *string

	// READ-ONLY; Gets or sets the label of the virtual disk in vCenter.
	Label *string
}

VirtualDisk - Virtual disk model

func (VirtualDisk) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualDisk.

func (*VirtualDisk) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDisk.

type VirtualDiskUpdate

type VirtualDiskUpdate struct {
	// Gets or sets the controller id.
	ControllerKey *int32

	// Gets or sets the device key value.
	DeviceKey *int32

	// Gets or sets the device name.
	DeviceName *string

	// Gets or sets the disk mode.
	DiskMode *DiskMode

	// Gets or sets the disk total size.
	DiskSizeGB *int32

	// Gets or sets the disk backing type.
	DiskType *DiskType

	// Gets or sets the name of the virtual disk.
	Name *string

	// Gets or sets the unit number of the disk on the controller.
	UnitNumber *int32
}

VirtualDiskUpdate - Defines the virtual disk update.

func (VirtualDiskUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualDiskUpdate.

func (*VirtualDiskUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDiskUpdate.

type VirtualMachineInstance added in v1.0.0

type VirtualMachineInstance struct {
	// REQUIRED; Resource properties.
	Properties *VirtualMachineInstanceProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

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

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

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

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

VirtualMachineInstance - Define the virtualMachineInstance.

func (VirtualMachineInstance) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstance.

func (*VirtualMachineInstance) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstance.

type VirtualMachineInstanceProperties added in v1.0.0

type VirtualMachineInstanceProperties struct {
	// Hardware properties.
	HardwareProfile *HardwareProfile

	// Gets the infrastructure profile.
	InfrastructureProfile *InfrastructureProfile

	// Network properties.
	NetworkProfile *NetworkProfile

	// OS properties.
	OSProfile *OsProfileForVMInstance

	// Placement properties.
	PlacementProfile *PlacementProfile

	// Gets the security profile.
	SecurityProfile *SecurityProfile

	// Storage properties.
	StorageProfile *StorageProfile

	// READ-ONLY; Gets the power state of the virtual machine.
	PowerState *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Gets or sets a unique identifier for the vm resource.
	ResourceUID *string

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus
}

VirtualMachineInstanceProperties - Describes the properties of a Virtual Machine Instance.

func (VirtualMachineInstanceProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceProperties.

func (*VirtualMachineInstanceProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceProperties.

type VirtualMachineInstanceUpdate added in v1.0.0

type VirtualMachineInstanceUpdate struct {
	// Resource properties.
	Properties *VirtualMachineInstanceUpdateProperties
}

VirtualMachineInstanceUpdate - Defines the virtualMachineInstanceUpdate.

func (VirtualMachineInstanceUpdate) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceUpdate.

func (*VirtualMachineInstanceUpdate) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceUpdate.

type VirtualMachineInstanceUpdateProperties added in v1.0.0

type VirtualMachineInstanceUpdateProperties struct {
	// Specifies the hardware settings for the virtual machine.
	HardwareProfile *HardwareProfile

	// Specifies the network interfaces of the virtual machine.
	NetworkProfile *NetworkProfileUpdate

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *StorageProfileUpdate
}

VirtualMachineInstanceUpdateProperties - Describes the properties of a Virtual Machine.

func (VirtualMachineInstanceUpdateProperties) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceUpdateProperties.

func (*VirtualMachineInstanceUpdateProperties) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceUpdateProperties.

type VirtualMachineInstancesClient added in v1.0.0

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

VirtualMachineInstancesClient contains the methods for the VirtualMachineInstances group. Don't use this type directly, use NewVirtualMachineInstancesClient() instead.

func NewVirtualMachineInstancesClient added in v1.0.0

func NewVirtualMachineInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineInstancesClient, error)

NewVirtualMachineInstancesClient creates a new instance of VirtualMachineInstancesClient with the specified values.

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

func (*VirtualMachineInstancesClient) BeginCreateOrUpdate added in v1.0.0

BeginCreateOrUpdate - The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • body - Request payload.
  • options - VirtualMachineInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineInstance.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armconnectedvmware.VirtualMachineInstance{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Properties: &armconnectedvmware.VirtualMachineInstanceProperties{
			HardwareProfile: &armconnectedvmware.HardwareProfile{
				MemorySizeMB: to.Ptr[int32](4196),
				NumCPUs:      to.Ptr[int32](4),
			},
			InfrastructureProfile: &armconnectedvmware.InfrastructureProfile{
				TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
				VCenterID:  to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
			},
			PlacementProfile: &armconnectedvmware.PlacementProfile{
				ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
			},
		},
	}, 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.VirtualMachineInstance = armconnectedvmware.VirtualMachineInstance{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachines"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	Properties: &armconnectedvmware.VirtualMachineInstanceProperties{
	// 		HardwareProfile: &armconnectedvmware.HardwareProfile{
	// 			MemorySizeMB: to.Ptr[int32](4196),
	// 			NumCPUs: to.Ptr[int32](4),
	// 		},
	// 		InfrastructureProfile: &armconnectedvmware.InfrastructureProfile{
	// 			MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 			TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 		},
	// 		OSProfile: &armconnectedvmware.OsProfileForVMInstance{
	// 			ComputerName: to.Ptr("DemoVM"),
	// 			OSType: to.Ptr(armconnectedvmware.OsTypeWindows),
	// 		},
	// 		PlacementProfile: &armconnectedvmware.PlacementProfile{
	// 			ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 		},
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VirtualMachineInstancesClient) BeginDelete added in v1.0.0

BeginDelete - The operation to delete a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", &armconnectedvmware.VirtualMachineInstancesClientBeginDeleteOptions{DeleteFromHost: nil,
		Force: 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 (*VirtualMachineInstancesClient) BeginRestart added in v1.0.0

BeginRestart - The operation to restart a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientBeginRestartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/RestartVirtualMachineInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginRestart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 (*VirtualMachineInstancesClient) BeginStart added in v1.0.0

BeginStart - The operation to start a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientBeginStartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StartVirtualMachineInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 (*VirtualMachineInstancesClient) BeginStop added in v1.0.0

BeginStop - The operation to power off (stop) a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientBeginStopOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/StopVirtualMachineInstance.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStop(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", &armconnectedvmware.VirtualMachineInstancesClientBeginStopOptions{Body: &armconnectedvmware.StopVirtualMachineOptions{
		SkipShutdown: to.Ptr(true),
	},
	})
	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 (*VirtualMachineInstancesClient) BeginUpdate added in v1.0.0

BeginUpdate - The operation to update a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • body - Resource properties to update.
  • options - VirtualMachineInstancesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineInstance.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armconnectedvmware.VirtualMachineInstanceUpdate{
		Properties: &armconnectedvmware.VirtualMachineInstanceUpdateProperties{
			HardwareProfile: &armconnectedvmware.HardwareProfile{
				MemorySizeMB: to.Ptr[int32](4196),
				NumCPUs:      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.VirtualMachineInstance = armconnectedvmware.VirtualMachineInstance{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachines"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	Properties: &armconnectedvmware.VirtualMachineInstanceProperties{
	// 		HardwareProfile: &armconnectedvmware.HardwareProfile{
	// 			MemorySizeMB: to.Ptr[int32](4196),
	// 			NumCPUs: to.Ptr[int32](4),
	// 		},
	// 		InfrastructureProfile: &armconnectedvmware.InfrastructureProfile{
	// 			MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 			TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 		},
	// 		OSProfile: &armconnectedvmware.OsProfileForVMInstance{
	// 			ComputerName: to.Ptr("DemoVM"),
	// 			OSType: to.Ptr(armconnectedvmware.OsTypeWindows),
	// 		},
	// 		PlacementProfile: &armconnectedvmware.PlacementProfile{
	// 			ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 		},
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VirtualMachineInstancesClient) Get added in v1.0.0

Get - Retrieves information about a virtual machine instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientGetOptions contains the optional parameters for the VirtualMachineInstancesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualMachineInstancesClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.VirtualMachineInstance = armconnectedvmware.VirtualMachineInstance{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachines"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	Properties: &armconnectedvmware.VirtualMachineInstanceProperties{
	// 		HardwareProfile: &armconnectedvmware.HardwareProfile{
	// 			MemorySizeMB: to.Ptr[int32](4196),
	// 			NumCPUs: to.Ptr[int32](4),
	// 		},
	// 		InfrastructureProfile: &armconnectedvmware.InfrastructureProfile{
	// 			MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 			TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 		},
	// 		OSProfile: &armconnectedvmware.OsProfileForVMInstance{
	// 			ComputerName: to.Ptr("DemoVM"),
	// 			OSType: to.Ptr(armconnectedvmware.OsTypeWindows),
	// 		},
	// 		PlacementProfile: &armconnectedvmware.PlacementProfile{
	// 			ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
	// 		},
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VirtualMachineInstancesClient) NewListPager added in v1.0.0

NewListPager - Lists all of the virtual machine instances within the specified parent resource.

Generated from API version 2023-10-01

  • resourceURI - The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
  • options - VirtualMachineInstancesClientListOptions contains the optional parameters for the VirtualMachineInstancesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualMachineInstancesClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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.VirtualMachineInstancesList = armconnectedvmware.VirtualMachineInstancesList{
		// 	Value: []*armconnectedvmware.VirtualMachineInstance{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachines"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			Properties: &armconnectedvmware.VirtualMachineInstanceProperties{
		// 				HardwareProfile: &armconnectedvmware.HardwareProfile{
		// 					MemorySizeMB: to.Ptr[int32](4196),
		// 					NumCPUs: to.Ptr[int32](4),
		// 				},
		// 				InfrastructureProfile: &armconnectedvmware.InfrastructureProfile{
		// 					MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 					TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
		// 					VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 				},
		// 				OSProfile: &armconnectedvmware.OsProfileForVMInstance{
		// 					ComputerName: to.Ptr("DemoVM"),
		// 					OSType: to.Ptr(armconnectedvmware.OsTypeWindows),
		// 				},
		// 				PlacementProfile: &armconnectedvmware.PlacementProfile{
		// 					ResourcePoolID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
		// 				},
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VirtualMachineInstancesClientBeginCreateOrUpdateOptions added in v1.0.0

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

VirtualMachineInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginCreateOrUpdate method.

type VirtualMachineInstancesClientBeginDeleteOptions added in v1.0.0

type VirtualMachineInstancesClientBeginDeleteOptions struct {
	// Whether to delete the VM from the vCenter.
	DeleteFromHost *bool

	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineInstancesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginDelete method.

type VirtualMachineInstancesClientBeginRestartOptions added in v1.0.0

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

VirtualMachineInstancesClientBeginRestartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginRestart method.

type VirtualMachineInstancesClientBeginStartOptions added in v1.0.0

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

VirtualMachineInstancesClientBeginStartOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStart method.

type VirtualMachineInstancesClientBeginStopOptions added in v1.0.0

type VirtualMachineInstancesClientBeginStopOptions struct {
	// Virtualmachine stop action payload.
	Body *StopVirtualMachineOptions

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineInstancesClientBeginStopOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginStop method.

type VirtualMachineInstancesClientBeginUpdateOptions added in v1.0.0

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

VirtualMachineInstancesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineInstancesClient.BeginUpdate method.

type VirtualMachineInstancesClientCreateOrUpdateResponse added in v1.0.0

type VirtualMachineInstancesClientCreateOrUpdateResponse struct {
	// Define the virtualMachineInstance.
	VirtualMachineInstance
}

VirtualMachineInstancesClientCreateOrUpdateResponse contains the response from method VirtualMachineInstancesClient.BeginCreateOrUpdate.

type VirtualMachineInstancesClientDeleteResponse added in v1.0.0

type VirtualMachineInstancesClientDeleteResponse struct {
}

VirtualMachineInstancesClientDeleteResponse contains the response from method VirtualMachineInstancesClient.BeginDelete.

type VirtualMachineInstancesClientGetOptions added in v1.0.0

type VirtualMachineInstancesClientGetOptions struct {
}

VirtualMachineInstancesClientGetOptions contains the optional parameters for the VirtualMachineInstancesClient.Get method.

type VirtualMachineInstancesClientGetResponse added in v1.0.0

type VirtualMachineInstancesClientGetResponse struct {
	// Define the virtualMachineInstance.
	VirtualMachineInstance
}

VirtualMachineInstancesClientGetResponse contains the response from method VirtualMachineInstancesClient.Get.

type VirtualMachineInstancesClientListOptions added in v1.0.0

type VirtualMachineInstancesClientListOptions struct {
}

VirtualMachineInstancesClientListOptions contains the optional parameters for the VirtualMachineInstancesClient.NewListPager method.

type VirtualMachineInstancesClientListResponse added in v1.0.0

type VirtualMachineInstancesClientListResponse struct {
	// List of VirtualMachineInstances.
	VirtualMachineInstancesList
}

VirtualMachineInstancesClientListResponse contains the response from method VirtualMachineInstancesClient.NewListPager.

type VirtualMachineInstancesClientRestartResponse added in v1.0.0

type VirtualMachineInstancesClientRestartResponse struct {
}

VirtualMachineInstancesClientRestartResponse contains the response from method VirtualMachineInstancesClient.BeginRestart.

type VirtualMachineInstancesClientStartResponse added in v1.0.0

type VirtualMachineInstancesClientStartResponse struct {
}

VirtualMachineInstancesClientStartResponse contains the response from method VirtualMachineInstancesClient.BeginStart.

type VirtualMachineInstancesClientStopResponse added in v1.0.0

type VirtualMachineInstancesClientStopResponse struct {
}

VirtualMachineInstancesClientStopResponse contains the response from method VirtualMachineInstancesClient.BeginStop.

type VirtualMachineInstancesClientUpdateResponse added in v1.0.0

type VirtualMachineInstancesClientUpdateResponse struct {
	// Define the virtualMachineInstance.
	VirtualMachineInstance
}

VirtualMachineInstancesClientUpdateResponse contains the response from method VirtualMachineInstancesClient.BeginUpdate.

type VirtualMachineInstancesList added in v1.0.0

type VirtualMachineInstancesList struct {
	// REQUIRED; Array of VirtualMachines
	Value []*VirtualMachineInstance

	// Url to follow for getting next page of VirtualMachines.
	NextLink *string
}

VirtualMachineInstancesList - List of VirtualMachineInstances.

func (VirtualMachineInstancesList) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstancesList.

func (*VirtualMachineInstancesList) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstancesList.

type VirtualMachineInventoryItem

type VirtualMachineInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Cluster inventory resource details.
	Cluster *InventoryItemDetails

	// Gets or sets the folder path of the vm.
	FolderPath *string

	// Host inventory resource details.
	Host *InventoryItemDetails

	// Gets or sets the nic ip addresses.
	IPAddresses []*string

	// Gets or sets the instance uuid of the vm.
	InstanceUUID *string

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// Gets or sets os name.
	OSName *string

	// Gets or sets the type of the os.
	OSType *OsType

	// ResourcePool inventory resource details.
	ResourcePool *InventoryItemDetails

	// Gets or sets the SMBIOS UUID of the vm.
	SmbiosUUID *string

	// READ-ONLY; Gets the power state of the virtual machine.
	PowerState *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Gets or sets the current running status of VMware Tools running in the guest operating system.
	ToolsRunningStatus *string

	// READ-ONLY; Gets or sets the current version of VMware Tools.
	ToolsVersion *string

	// READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system.
	ToolsVersionStatus *string
}

VirtualMachineInventoryItem - The VM inventory item.

func (*VirtualMachineInventoryItem) GetInventoryItemProperties

func (v *VirtualMachineInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineInventoryItem.

func (VirtualMachineInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInventoryItem.

func (*VirtualMachineInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInventoryItem.

type VirtualMachineTemplate

type VirtualMachineTemplate struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *VirtualMachineTemplateProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

VirtualMachineTemplate - Define the virtualMachineTemplate.

func (VirtualMachineTemplate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplate.

func (*VirtualMachineTemplate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplate.

type VirtualMachineTemplateInventoryItem

type VirtualMachineTemplateInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the folder path of the template.
	FolderPath *string

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets memory size in MBs for the template.
	MemorySizeMB *int32

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// Gets or sets the number of vCPUs for the template.
	NumCPUs *int32

	// Gets or sets the number of cores per socket for the template. Defaults to 1 if unspecified.
	NumCoresPerSocket *int32

	// Gets or sets os name.
	OSName *string

	// Gets or sets the type of the os.
	OSType *OsType

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Gets or sets the current version of VMware Tools.
	ToolsVersion *string

	// READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system.
	ToolsVersionStatus *string
}

VirtualMachineTemplateInventoryItem - The VM Template inventory item.

func (*VirtualMachineTemplateInventoryItem) GetInventoryItemProperties

func (v *VirtualMachineTemplateInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineTemplateInventoryItem.

func (VirtualMachineTemplateInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateInventoryItem.

func (*VirtualMachineTemplateInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateInventoryItem.

type VirtualMachineTemplateProperties

type VirtualMachineTemplateProperties struct {
	// Gets or sets the inventory Item ID for the virtual machine template.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine template.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this template resides.
	VCenterID *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets or sets the disks the template.
	Disks []*VirtualDisk

	// READ-ONLY; Firmware type
	FirmwareType *FirmwareType

	// READ-ONLY; Gets or sets the folder path of the template.
	FolderPath *string

	// READ-ONLY; Gets or sets memory size in MBs for the template.
	MemorySizeMB *int32

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual machine template.
	MoName *string

	// READ-ONLY; Gets or sets the network interfaces of the template.
	NetworkInterfaces []*NetworkInterface

	// READ-ONLY; Gets or sets the number of vCPUs for the template.
	NumCPUs *int32

	// READ-ONLY; Gets or sets the number of cores per socket for the template. Defaults to 1 if unspecified.
	NumCoresPerSocket *int32

	// READ-ONLY; Gets or sets os name.
	OSName *string

	// READ-ONLY; Gets or sets the type of the os.
	OSType *OsType

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets the current version of VMware Tools.
	ToolsVersion *string

	// READ-ONLY; Gets or sets the current version status of VMware Tools installed in the guest operating system.
	ToolsVersionStatus *string

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

VirtualMachineTemplateProperties - Describes the properties of a Virtual Machine Template.

func (VirtualMachineTemplateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateProperties.

func (*VirtualMachineTemplateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateProperties.

type VirtualMachineTemplatesClient

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

VirtualMachineTemplatesClient contains the methods for the VirtualMachineTemplates group. Don't use this type directly, use NewVirtualMachineTemplatesClient() instead.

func NewVirtualMachineTemplatesClient

func NewVirtualMachineTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineTemplatesClient, error)

NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient with the specified values.

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

func (*VirtualMachineTemplatesClient) BeginCreate

BeginCreate - Create Or Update virtual machine template. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualMachineTemplateName - Name of the virtual machine template resource.
  • body - Request payload.
  • options - VirtualMachineTemplatesClientBeginCreateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualMachineTemplate.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineTemplatesClient().BeginCreate(ctx, "testrg", "WebFrontEndTemplate", armconnectedvmware.VirtualMachineTemplate{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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.VirtualMachineTemplate = armconnectedvmware.VirtualMachineTemplate{
	// 	Name: to.Ptr("WebFrontEndTemplate"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*VirtualMachineTemplatesClient) BeginDelete

BeginDelete - Implements virtual machine template DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualMachineTemplateName - Name of the virtual machine template resource.
  • options - VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualMachineTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineTemplatesClient().BeginDelete(ctx, "testrg", "WebFrontEndTemplate", &armconnectedvmware.VirtualMachineTemplatesClientBeginDeleteOptions{Force: 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 (*VirtualMachineTemplatesClient) Get

func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientGetOptions) (VirtualMachineTemplatesClientGetResponse, error)

Get - Implements virtual machine template GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualMachineTemplateName - Name of the virtual machine template resource.
  • options - VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualMachineTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualMachineTemplatesClient().Get(ctx, "testrg", "WebFrontEndTemplate", 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.VirtualMachineTemplate = armconnectedvmware.VirtualMachineTemplate{
	// 	Name: to.Ptr("WebFrontEndTemplate"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*VirtualMachineTemplatesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List of virtualMachineTemplates in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplatesByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualMachineTemplatesClient().NewListByResourceGroupPager("testrg", 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.VirtualMachineTemplatesList = armconnectedvmware.VirtualMachineTemplatesList{
		// 	Value: []*armconnectedvmware.VirtualMachineTemplate{
		// 		{
		// 			Name: to.Ptr("WebFrontEndTemplate"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VirtualMachineTemplatesClient) NewListPager

NewListPager - List of virtualMachineTemplates in a subscription.

Generated from API version 2023-10-01

  • options - VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualMachineTemplates.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualMachineTemplatesClient().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.VirtualMachineTemplatesList = armconnectedvmware.VirtualMachineTemplatesList{
		// 	Value: []*armconnectedvmware.VirtualMachineTemplate{
		// 		{
		// 			Name: to.Ptr("WebFrontEndTemplate"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VirtualMachineTemplatesClient) Update

Update - API to update certain properties of the virtual machine template resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualMachineTemplateName - Name of the virtual machine template resource.
  • body - Resource properties to update.
  • options - VirtualMachineTemplatesClientUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualMachineTemplate.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualMachineTemplatesClient().Update(ctx, "testrg", "WebFrontEndTemplate", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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.VirtualMachineTemplate = armconnectedvmware.VirtualMachineTemplate{
	// 	Name: to.Ptr("WebFrontEndTemplate"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualMachineTemplateProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type VirtualMachineTemplatesClientBeginCreateOptions

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

VirtualMachineTemplatesClientBeginCreateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreate method.

type VirtualMachineTemplatesClientBeginDeleteOptions

type VirtualMachineTemplatesClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.

type VirtualMachineTemplatesClientCreateResponse

type VirtualMachineTemplatesClientCreateResponse struct {
	// Define the virtualMachineTemplate.
	VirtualMachineTemplate
}

VirtualMachineTemplatesClientCreateResponse contains the response from method VirtualMachineTemplatesClient.BeginCreate.

type VirtualMachineTemplatesClientDeleteResponse

type VirtualMachineTemplatesClientDeleteResponse struct {
}

VirtualMachineTemplatesClientDeleteResponse contains the response from method VirtualMachineTemplatesClient.BeginDelete.

type VirtualMachineTemplatesClientGetOptions

type VirtualMachineTemplatesClientGetOptions struct {
}

VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.

type VirtualMachineTemplatesClientGetResponse

type VirtualMachineTemplatesClientGetResponse struct {
	// Define the virtualMachineTemplate.
	VirtualMachineTemplate
}

VirtualMachineTemplatesClientGetResponse contains the response from method VirtualMachineTemplatesClient.Get.

type VirtualMachineTemplatesClientListByResourceGroupOptions

type VirtualMachineTemplatesClientListByResourceGroupOptions struct {
}

VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListByResourceGroupPager method.

type VirtualMachineTemplatesClientListByResourceGroupResponse

type VirtualMachineTemplatesClientListByResourceGroupResponse struct {
	// List of VirtualMachineTemplates.
	VirtualMachineTemplatesList
}

VirtualMachineTemplatesClientListByResourceGroupResponse contains the response from method VirtualMachineTemplatesClient.NewListByResourceGroupPager.

type VirtualMachineTemplatesClientListOptions

type VirtualMachineTemplatesClientListOptions struct {
}

VirtualMachineTemplatesClientListOptions contains the optional parameters for the VirtualMachineTemplatesClient.NewListPager method.

type VirtualMachineTemplatesClientListResponse

type VirtualMachineTemplatesClientListResponse struct {
	// List of VirtualMachineTemplates.
	VirtualMachineTemplatesList
}

VirtualMachineTemplatesClientListResponse contains the response from method VirtualMachineTemplatesClient.NewListPager.

type VirtualMachineTemplatesClientUpdateOptions

type VirtualMachineTemplatesClientUpdateOptions struct {
}

VirtualMachineTemplatesClientUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.Update method.

type VirtualMachineTemplatesClientUpdateResponse

type VirtualMachineTemplatesClientUpdateResponse struct {
	// Define the virtualMachineTemplate.
	VirtualMachineTemplate
}

VirtualMachineTemplatesClientUpdateResponse contains the response from method VirtualMachineTemplatesClient.Update.

type VirtualMachineTemplatesList

type VirtualMachineTemplatesList struct {
	// REQUIRED; Array of VirtualMachineTemplates
	Value []*VirtualMachineTemplate

	// Url to follow for getting next page of VirtualMachineTemplates.
	NextLink *string
}

VirtualMachineTemplatesList - List of VirtualMachineTemplates.

func (VirtualMachineTemplatesList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplatesList.

func (*VirtualMachineTemplatesList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplatesList.

type VirtualNetwork

type VirtualNetwork struct {
	// REQUIRED; Gets or sets the location.
	Location *string

	// REQUIRED; Resource properties.
	Properties *VirtualNetworkProperties

	// Gets or sets the extended location.
	ExtendedLocation *ExtendedLocation

	// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are
	// a kind of Microsoft.Web/sites type. If supported, the resource provider must
	// validate and persist this value.
	Kind *string

	// Gets or sets the Resource tags.
	Tags map[string]*string

	// READ-ONLY; Gets or sets the Id.
	ID *string

	// READ-ONLY; Gets or sets the name.
	Name *string

	// READ-ONLY; The system data.
	SystemData *SystemData

	// READ-ONLY; Gets or sets the type of the resource.
	Type *string
}

VirtualNetwork - Define the virtualNetwork.

func (VirtualNetwork) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetwork.

func (*VirtualNetwork) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork.

type VirtualNetworkInventoryItem

type VirtualNetworkInventoryItem struct {
	// REQUIRED; They inventory type.
	InventoryType *InventoryType

	// Gets or sets the tracked resource id corresponding to the inventory resource.
	ManagedResourceID *string

	// Gets or sets the vCenter Managed Object name for the inventory item.
	MoName *string

	// Gets or sets the MoRef (Managed Object Reference) ID for the inventory item.
	MoRefID *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState
}

VirtualNetworkInventoryItem - The Virtual network inventory item.

func (*VirtualNetworkInventoryItem) GetInventoryItemProperties

func (v *VirtualNetworkInventoryItem) GetInventoryItemProperties() *InventoryItemProperties

GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualNetworkInventoryItem.

func (VirtualNetworkInventoryItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkInventoryItem.

func (*VirtualNetworkInventoryItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkInventoryItem.

type VirtualNetworkProperties

type VirtualNetworkProperties struct {
	// Gets or sets the inventory Item ID for the virtual network.
	InventoryItemID *string

	// Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual network.
	MoRefID *string

	// Gets or sets the ARM Id of the vCenter resource in which this template resides.
	VCenterID *string

	// READ-ONLY; Gets the name of the corresponding resource in Kubernetes.
	CustomResourceName *string

	// READ-ONLY; Gets or sets the vCenter Managed Object name for the virtual network.
	MoName *string

	// READ-ONLY; Gets the provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource status information.
	Statuses []*ResourceStatus

	// READ-ONLY; Gets or sets a unique identifier for this resource.
	UUID *string
}

VirtualNetworkProperties - Describes the properties of a Virtual Network.

func (VirtualNetworkProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProperties.

func (*VirtualNetworkProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProperties.

type VirtualNetworksClient

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

VirtualNetworksClient contains the methods for the VirtualNetworks group. Don't use this type directly, use NewVirtualNetworksClient() instead.

func NewVirtualNetworksClient

func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error)

NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values.

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

func (*VirtualNetworksClient) BeginCreate

func (client *VirtualNetworksClient) BeginCreate(ctx context.Context, resourceGroupName string, virtualNetworkName string, body VirtualNetwork, options *VirtualNetworksClientBeginCreateOptions) (*runtime.Poller[VirtualNetworksClientCreateResponse], error)

BeginCreate - Create Or Update virtual network. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualNetworkName - Name of the virtual network resource.
  • body - Request payload.
  • options - VirtualNetworksClientBeginCreateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/CreateVirtualNetwork.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworksClient().BeginCreate(ctx, "testrg", "ProdNetwork", armconnectedvmware.VirtualNetwork{
		ExtendedLocation: &armconnectedvmware.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
			Type: to.Ptr("customLocation"),
		},
		Location: to.Ptr("East US"),
		Properties: &armconnectedvmware.VirtualNetworkProperties{
			MoRefID:   to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
			VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		},
	}, 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.VirtualNetwork = armconnectedvmware.VirtualNetwork{
	// 	Name: to.Ptr("ProdNetwork"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualNetworks"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/ProdNetwork"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualNetworkProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*VirtualNetworksClient) BeginDelete

func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)

BeginDelete - Implements virtual network DELETE method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualNetworkName - Name of the virtual network resource.
  • options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/DeleteVirtualNetwork.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworksClient().BeginDelete(ctx, "testrg", "ProdNetwork", &armconnectedvmware.VirtualNetworksClientBeginDeleteOptions{Force: 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 (*VirtualNetworksClient) Get

func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error)

Get - Implements virtual network GET method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualNetworkName - Name of the virtual network resource.
  • options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/GetVirtualNetwork.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualNetworksClient().Get(ctx, "testrg", "ProdNetwork", 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.VirtualNetwork = armconnectedvmware.VirtualNetwork{
	// 	Name: to.Ptr("ProdNetwork"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualNetworks"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/ProdNetwork"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualNetworkProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// }
}
Output:

func (*VirtualNetworksClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List of virtualNetworks in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • options - VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworksByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualNetworksClient().NewListByResourceGroupPager("testrg", 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.VirtualNetworksList = armconnectedvmware.VirtualNetworksList{
		// 	Value: []*armconnectedvmware.VirtualNetwork{
		// 		{
		// 			Name: to.Ptr("ProdNetwork"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualNetworks"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/ProdNetwork"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VirtualNetworkProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VirtualNetworksClient) NewListPager

NewListPager - List of virtualNetworks in a subscription.

Generated from API version 2023-10-01

  • options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ListVirtualNetworks.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualNetworksClient().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.VirtualNetworksList = armconnectedvmware.VirtualNetworksList{
		// 	Value: []*armconnectedvmware.VirtualNetwork{
		// 		{
		// 			Name: to.Ptr("ProdNetwork"),
		// 			Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualNetworks"),
		// 			ExtendedLocation: &armconnectedvmware.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
		// 				Type: to.Ptr("customLocation"),
		// 			},
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/ProdNetwork"),
		// 			Location: to.Ptr("East US"),
		// 			Properties: &armconnectedvmware.VirtualNetworkProperties{
		// 				MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
		// 				ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
		// 				VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VirtualNetworksClient) Update

func (client *VirtualNetworksClient) Update(ctx context.Context, resourceGroupName string, virtualNetworkName string, body ResourcePatch, options *VirtualNetworksClientUpdateOptions) (VirtualNetworksClientUpdateResponse, error)

Update - API to update certain properties of the virtual network resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The Resource Group Name.
  • virtualNetworkName - Name of the virtual network resource.
  • body - Resource properties to update.
  • options - VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/UpdateVirtualNetwork.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/connectedvmware/armconnectedvmware"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armconnectedvmware.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualNetworksClient().Update(ctx, "testrg", "ProdNetwork", armconnectedvmware.ResourcePatch{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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.VirtualNetwork = armconnectedvmware.VirtualNetwork{
	// 	Name: to.Ptr("ProdNetwork"),
	// 	Type: to.Ptr("Microsoft.ConnectedVMwarevSphere/VirtualNetworks"),
	// 	ExtendedLocation: &armconnectedvmware.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
	// 		Type: to.Ptr("customLocation"),
	// 	},
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/ProdNetwork"),
	// 	Location: to.Ptr("East US"),
	// 	Properties: &armconnectedvmware.VirtualNetworkProperties{
	// 		MoRefID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
	// 		ProvisioningState: to.Ptr(armconnectedvmware.ProvisioningStateSucceeded),
	// 		VCenterID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// }
}
Output:

type VirtualNetworksClientBeginCreateOptions

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

VirtualNetworksClientBeginCreateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreate method.

type VirtualNetworksClientBeginDeleteOptions

type VirtualNetworksClientBeginDeleteOptions struct {
	// Whether force delete was specified.
	Force *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.

type VirtualNetworksClientCreateResponse

type VirtualNetworksClientCreateResponse struct {
	// Define the virtualNetwork.
	VirtualNetwork
}

VirtualNetworksClientCreateResponse contains the response from method VirtualNetworksClient.BeginCreate.

type VirtualNetworksClientDeleteResponse

type VirtualNetworksClientDeleteResponse struct {
}

VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.BeginDelete.

type VirtualNetworksClientGetOptions

type VirtualNetworksClientGetOptions struct {
}

VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.

type VirtualNetworksClientGetResponse

type VirtualNetworksClientGetResponse struct {
	// Define the virtualNetwork.
	VirtualNetwork
}

VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get.

type VirtualNetworksClientListByResourceGroupOptions

type VirtualNetworksClientListByResourceGroupOptions struct {
}

VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.NewListByResourceGroupPager method.

type VirtualNetworksClientListByResourceGroupResponse

type VirtualNetworksClientListByResourceGroupResponse struct {
	// List of VirtualNetworks.
	VirtualNetworksList
}

VirtualNetworksClientListByResourceGroupResponse contains the response from method VirtualNetworksClient.NewListByResourceGroupPager.

type VirtualNetworksClientListOptions

type VirtualNetworksClientListOptions struct {
}

VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method.

type VirtualNetworksClientListResponse

type VirtualNetworksClientListResponse struct {
	// List of VirtualNetworks.
	VirtualNetworksList
}

VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager.

type VirtualNetworksClientUpdateOptions

type VirtualNetworksClientUpdateOptions struct {
}

VirtualNetworksClientUpdateOptions contains the optional parameters for the VirtualNetworksClient.Update method.

type VirtualNetworksClientUpdateResponse

type VirtualNetworksClientUpdateResponse struct {
	// Define the virtualNetwork.
	VirtualNetwork
}

VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.Update.

type VirtualNetworksList

type VirtualNetworksList struct {
	// REQUIRED; Array of VirtualNetworks
	Value []*VirtualNetwork

	// Url to follow for getting next page of VirtualNetworks.
	NextLink *string
}

VirtualNetworksList - List of VirtualNetworks.

func (VirtualNetworksList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworksList.

func (*VirtualNetworksList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworksList.

type VirtualSCSIController

type VirtualSCSIController struct {
	// Gets or sets the bus number of the controller.
	BusNumber *int32

	// Gets or sets the key of the controller.
	ControllerKey *int32

	// Gets or sets the SCSI controller unit number.
	ScsiCtlrUnitNumber *int32

	// Gets or sets the sharing mode.
	Sharing *VirtualSCSISharing

	// Gets or sets the controller type.
	Type *SCSIControllerType
}

VirtualSCSIController - This data object type contains the properties of a SCSI controller device attached to a virtual machine that is reported by the controller.

func (VirtualSCSIController) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualSCSIController.

func (*VirtualSCSIController) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualSCSIController.

type VirtualSCSISharing

type VirtualSCSISharing string

VirtualSCSISharing - Defines the sharing mode for sharing the SCSI bus.

const (
	VirtualSCSISharingNoSharing       VirtualSCSISharing = "noSharing"
	VirtualSCSISharingPhysicalSharing VirtualSCSISharing = "physicalSharing"
	VirtualSCSISharingVirtualSharing  VirtualSCSISharing = "virtualSharing"
)

func PossibleVirtualSCSISharingValues

func PossibleVirtualSCSISharingValues() []VirtualSCSISharing

PossibleVirtualSCSISharingValues returns the possible values for the VirtualSCSISharing const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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