armhybridcontainerservice

package module
v1.0.0 Latest Latest
Warning

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

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

README

Azure Hybrid Container Service Module for Go

PkgGoDev

The armhybridcontainerservice module provides operations for working with Azure Hybrid Container Service.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Hybrid Container Service module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Hybrid Container Service. 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 Hybrid Container Service 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 := armhybridcontainerservice.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 := armhybridcontainerservice.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.NewVirtualNetworksClient()

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 Hybrid Container Service 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 ActionType added in v0.3.0

type ActionType string

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

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues added in v0.3.0

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AddonPhase added in v0.3.0

type AddonPhase string

AddonPhase - Observed phase of the addon or component on the provisioned cluster. Possible values include: 'pending', 'provisioning', 'provisioning {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}', 'provisioned', 'deleting', 'failed', 'upgrading'

const (
	AddonPhaseDeleting                             AddonPhase = "deleting"
	AddonPhaseFailed                               AddonPhase = "failed"
	AddonPhasePending                              AddonPhase = "pending"
	AddonPhaseProvisioned                          AddonPhase = "provisioned"
	AddonPhaseProvisioning                         AddonPhase = "provisioning"
	AddonPhaseProvisioningHelmChartInstalled       AddonPhase = "provisioning {HelmChartInstalled}"
	AddonPhaseProvisioningMSICertificateDownloaded AddonPhase = "provisioning {MSICertificateDownloaded}"
	AddonPhaseUpgrading                            AddonPhase = "upgrading"
)

func PossibleAddonPhaseValues added in v0.3.0

func PossibleAddonPhaseValues() []AddonPhase

PossibleAddonPhaseValues returns the possible values for the AddonPhase const type.

type AddonStatusProfile added in v0.3.0

type AddonStatusProfile struct {
	// Observed error message from the addon or component
	ErrorMessage *string

	// Name of the addon or component
	Name *string

	// Observed phase of the addon or component on the provisioned cluster. Possible values include: 'pending', 'provisioning',
	// 'provisioning {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}',
	// 'provisioned', 'deleting', 'failed', 'upgrading'
	Phase *AddonPhase

	// Indicates whether the addon or component is ready
	Ready *bool
}

AddonStatusProfile - The status profile of the addons and other kubernetes components

func (AddonStatusProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AddonStatusProfile.

func (*AddonStatusProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AddonStatusProfile.

type AgentPool

type AgentPool struct {
	// Extended location pointing to the underlying infrastructure
	ExtendedLocation *ExtendedLocation

	// Properties of the agent pool resource
	Properties *AgentPoolProperties

	// Resource tags
	Tags map[string]*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
}

AgentPool - The agentPool resource definition

func (AgentPool) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentPool.

func (*AgentPool) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPool.

type AgentPoolClient

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

AgentPoolClient contains the methods for the AgentPool group. Don't use this type directly, use NewAgentPoolClient() instead.

func NewAgentPoolClient

func NewAgentPoolClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentPoolClient, error)

NewAgentPoolClient creates a new instance of AgentPoolClient with the specified values.

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

func (*AgentPoolClient) BeginCreateOrUpdate

func (client *AgentPoolClient) BeginCreateOrUpdate(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, agentPool AgentPool, options *AgentPoolClientBeginCreateOrUpdateOptions) (*runtime.Poller[AgentPoolClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates the agent pool in the provisioned cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • agentPoolName - Parameter for the name of the agent pool in the provisioned cluster.
  • agentPool - Agent Pool resource definition
  • options - AgentPoolClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutAgentPool.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAgentPoolClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", armhybridcontainerservice.AgentPool{
		Properties: &armhybridcontainerservice.AgentPoolProperties{
			NodeLabels: map[string]*string{
				"env":  to.Ptr("dev"),
				"goal": to.Ptr("test"),
			},
			NodeTaints: []*string{
				to.Ptr("env=prod:NoSchedule"),
				to.Ptr("sku=gpu:NoSchedule")},
			OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
			Count:  to.Ptr[int32](1),
			VMSize: to.Ptr("Standard_A4_v2"),
		},
	}, 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.AgentPool = armhybridcontainerservice.AgentPool{
	// 	Name: to.Ptr("testnodepool"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"),
	// 	Properties: &armhybridcontainerservice.AgentPoolProperties{
	// 		NodeLabels: map[string]*string{
	// 			"env": to.Ptr("dev"),
	// 			"goal": to.Ptr("test"),
	// 		},
	// 		NodeTaints: []*string{
	// 			to.Ptr("env=prod:NoSchedule"),
	// 			to.Ptr("sku=gpu:NoSchedule")},
	// 			OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 			ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 			Count: to.Ptr[int32](1),
	// 			VMSize: to.Ptr("Standard_A4_v2"),
	// 		},
	// 	}
}
Output:

func (*AgentPoolClient) BeginDelete added in v0.3.0

func (client *AgentPoolClient) BeginDelete(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, options *AgentPoolClientBeginDeleteOptions) (*runtime.Poller[AgentPoolClientDeleteResponse], error)

BeginDelete - Deletes the specified agent pool in the provisioned cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • agentPoolName - Parameter for the name of the agent pool in the provisioned cluster.
  • options - AgentPoolClientBeginDeleteOptions contains the optional parameters for the AgentPoolClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteAgentPool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAgentPoolClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", 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 (*AgentPoolClient) Get

func (client *AgentPoolClient) Get(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, options *AgentPoolClientGetOptions) (AgentPoolClientGetResponse, error)

Get - Gets the specified agent pool in the provisioned cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • agentPoolName - Parameter for the name of the agent pool in the provisioned cluster.
  • options - AgentPoolClientGetOptions contains the optional parameters for the AgentPoolClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetAgentPool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAgentPoolClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", 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.AgentPool = armhybridcontainerservice.AgentPool{
	// 	Name: to.Ptr("testnodepool"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"),
	// 	Properties: &armhybridcontainerservice.AgentPoolProperties{
	// 		OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 		ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 		Count: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("Standard_A4_v2"),
	// 	},
	// }
}
Output:

func (*AgentPoolClient) NewListByProvisionedClusterPager added in v1.0.0

func (client *AgentPoolClient) NewListByProvisionedClusterPager(connectedClusterResourceURI string, options *AgentPoolClientListByProvisionedClusterOptions) *runtime.Pager[AgentPoolClientListByProvisionedClusterResponse]

NewListByProvisionedClusterPager - Gets the list of agent pools in the specified provisioned cluster

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - AgentPoolClientListByProvisionedClusterOptions contains the optional parameters for the AgentPoolClient.NewListByProvisionedClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListAgentPoolByProvisionedClusterInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAgentPoolClient().NewListByProvisionedClusterPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.AgentPoolListResult = armhybridcontainerservice.AgentPoolListResult{
		// 	Value: []*armhybridcontainerservice.AgentPool{
		// 		{
		// 			Name: to.Ptr("testnodepool"),
		// 			Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"),
		// 			Properties: &armhybridcontainerservice.AgentPoolProperties{
		// 				OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
		// 				ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
		// 				Count: to.Ptr[int32](1),
		// 				VMSize: to.Ptr("Standard_A4_v2"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AgentPoolClientBeginCreateOrUpdateOptions

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

AgentPoolClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolClient.BeginCreateOrUpdate method.

type AgentPoolClientBeginDeleteOptions added in v0.3.0

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

AgentPoolClientBeginDeleteOptions contains the optional parameters for the AgentPoolClient.BeginDelete method.

type AgentPoolClientCreateOrUpdateResponse

type AgentPoolClientCreateOrUpdateResponse struct {
	// The agentPool resource definition
	AgentPool
}

AgentPoolClientCreateOrUpdateResponse contains the response from method AgentPoolClient.BeginCreateOrUpdate.

type AgentPoolClientDeleteResponse

type AgentPoolClientDeleteResponse struct {
}

AgentPoolClientDeleteResponse contains the response from method AgentPoolClient.BeginDelete.

type AgentPoolClientGetOptions

type AgentPoolClientGetOptions struct {
}

AgentPoolClientGetOptions contains the optional parameters for the AgentPoolClient.Get method.

type AgentPoolClientGetResponse

type AgentPoolClientGetResponse struct {
	// The agentPool resource definition
	AgentPool
}

AgentPoolClientGetResponse contains the response from method AgentPoolClient.Get.

type AgentPoolClientListByProvisionedClusterOptions

type AgentPoolClientListByProvisionedClusterOptions struct {
}

AgentPoolClientListByProvisionedClusterOptions contains the optional parameters for the AgentPoolClient.NewListByProvisionedClusterPager method.

type AgentPoolClientListByProvisionedClusterResponse

type AgentPoolClientListByProvisionedClusterResponse struct {
	// List of all agent pool resources associated with the provisioned cluster.
	AgentPoolListResult
}

AgentPoolClientListByProvisionedClusterResponse contains the response from method AgentPoolClient.NewListByProvisionedClusterPager.

type AgentPoolListResult

type AgentPoolListResult struct {
	NextLink *string
	Value    []*AgentPool
}

AgentPoolListResult - List of all agent pool resources associated with the provisioned cluster.

func (AgentPoolListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentPoolListResult.

func (*AgentPoolListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolListResult.

type AgentPoolProperties

type AgentPoolProperties struct {
	// Number of nodes in the agent pool. The default value is 1.
	Count *int32

	// Whether to enable auto-scaler. Default value is false
	EnableAutoScaling *bool

	// The maximum number of nodes for auto-scaling
	MaxCount *int32

	// The maximum number of pods that can run on a node.
	MaxPods *int32

	// The minimum number of nodes for auto-scaling
	MinCount *int32

	// The node labels to be persisted across all nodes in agent pool.
	NodeLabels map[string]*string

	// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
	NodeTaints []*string

	// Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when
	// OSType is Windows.
	OSSKU *OSSKU

	// The particular KubernetesVersion Image OS Type (Linux, Windows)
	OSType *OsType

	// The observed status of the agent pool.
	Status *AgentPoolProvisioningStatusStatus

	// The VM sku size of the agent pool node VMs.
	VMSize *string

	// READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned
	// cluster.
	KubernetesVersion *string

	// READ-ONLY; The status of the latest long running operation for the agent pool.
	ProvisioningState *ResourceProvisioningState
}

AgentPoolProperties - Properties of the agent pool resource

func (AgentPoolProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentPoolProperties.

func (*AgentPoolProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolProperties.

type AgentPoolProvisioningStatusStatus

type AgentPoolProvisioningStatusStatus struct {
	// Error messages during an agent pool operation or steady state.
	ErrorMessage  *string
	ReadyReplicas []*AgentPoolUpdateProfile

	// READ-ONLY; The current state of the agent pool.
	CurrentState *ResourceProvisioningState
}

AgentPoolProvisioningStatusStatus - The observed status of the agent pool.

func (AgentPoolProvisioningStatusStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentPoolProvisioningStatusStatus.

func (*AgentPoolProvisioningStatusStatus) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolProvisioningStatusStatus.

type AgentPoolUpdateProfile added in v0.3.0

type AgentPoolUpdateProfile struct {
	// Number of nodes in the agent pool. The default value is 1.
	Count *int32

	// The VM sku size of the agent pool node VMs.
	VMSize *string

	// READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned
	// cluster.
	KubernetesVersion *string
}

AgentPoolUpdateProfile - Profile for agent pool properties that can be updated

func (AgentPoolUpdateProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AgentPoolUpdateProfile.

func (*AgentPoolUpdateProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolUpdateProfile.

type AzureHybridBenefit added in v0.3.0

type AzureHybridBenefit string

AzureHybridBenefit - Indicates whether Azure Hybrid Benefit is opted in. Default value is false

const (
	AzureHybridBenefitFalse         AzureHybridBenefit = "False"
	AzureHybridBenefitNotApplicable AzureHybridBenefit = "NotApplicable"
	AzureHybridBenefitTrue          AzureHybridBenefit = "True"
)

func PossibleAzureHybridBenefitValues added in v0.3.0

func PossibleAzureHybridBenefitValues() []AzureHybridBenefit

PossibleAzureHybridBenefitValues returns the possible values for the AzureHybridBenefit const type.

type Client

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

Client contains the methods for the HybridContainerService group. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

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

func (*Client) BeginDeleteKubernetesVersions added in v0.3.0

func (client *Client) BeginDeleteKubernetesVersions(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteKubernetesVersionsOptions) (*runtime.Poller[ClientDeleteKubernetesVersionsResponse], error)

BeginDeleteKubernetesVersions - Delete the default kubernetes versions resource type If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - ClientBeginDeleteKubernetesVersionsOptions contains the optional parameters for the Client.BeginDeleteKubernetesVersions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteKubernetesVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDeleteKubernetesVersions(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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 (*Client) BeginDeleteVMSKUs added in v0.3.0

func (client *Client) BeginDeleteVMSKUs(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteVMSKUsOptions) (*runtime.Poller[ClientDeleteVMSKUsResponse], error)

BeginDeleteVMSKUs - Deletes the default VM skus resource type If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - ClientBeginDeleteVMSKUsOptions contains the optional parameters for the Client.BeginDeleteVMSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteVmSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginDeleteVMSKUs(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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 (*Client) BeginPutKubernetesVersions added in v0.3.0

func (client *Client) BeginPutKubernetesVersions(ctx context.Context, customLocationResourceURI string, kubernetesVersions KubernetesVersionProfile, options *ClientBeginPutKubernetesVersionsOptions) (*runtime.Poller[ClientPutKubernetesVersionsResponse], error)

BeginPutKubernetesVersions - Puts the default kubernetes version resource type (one time operation, before listing the kubernetes versions) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • kubernetesVersions - Kubernetes Versions resource definition
  • options - ClientBeginPutKubernetesVersionsOptions contains the optional parameters for the Client.BeginPutKubernetesVersions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutKubernetesVersions.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginPutKubernetesVersions(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", armhybridcontainerservice.KubernetesVersionProfile{
		ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
			Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		},
	}, 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.KubernetesVersionProfile = armhybridcontainerservice.KubernetesVersionProfile{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/kubernetesVersions"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/kubernetesVersions/default"),
	// 	Properties: &armhybridcontainerservice.KubernetesVersionProfileProperties{
	// 		ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*Client) BeginPutVMSKUs added in v0.3.0

func (client *Client) BeginPutVMSKUs(ctx context.Context, customLocationResourceURI string, skus VMSKUProfile, options *ClientBeginPutVMSKUsOptions) (*runtime.Poller[ClientPutVMSKUsResponse], error)

BeginPutVMSKUs - Puts the default VM skus resource type (one time operation, before listing the VM skus) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • skus - VM SKUs resource definition
  • options - ClientBeginPutVMSKUsOptions contains the optional parameters for the Client.BeginPutVMSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutVmSkus.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginPutVMSKUs(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", armhybridcontainerservice.VMSKUProfile{
		ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
			Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		},
	}, 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.VMSKUProfile = armhybridcontainerservice.VMSKUProfile{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/skus"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/skus/default"),
	// 	Properties: &armhybridcontainerservice.VMSKUProfileProperties{
	// 		ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*Client) GetKubernetesVersions added in v0.3.0

func (client *Client) GetKubernetesVersions(ctx context.Context, customLocationResourceURI string, options *ClientGetKubernetesVersionsOptions) (ClientGetKubernetesVersionsResponse, error)

GetKubernetesVersions - Lists the supported kubernetes versions for the specified custom location If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - ClientGetKubernetesVersionsOptions contains the optional parameters for the Client.GetKubernetesVersions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetKubernetesVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().GetKubernetesVersions(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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.KubernetesVersionProfile = armhybridcontainerservice.KubernetesVersionProfile{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/kubernetesVersions"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation/providers/Microsoft.HybridContainerService/kubernetesVersions/default"),
	// 	ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.KubernetesVersionProfileProperties{
	// 		ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 		Values: []*armhybridcontainerservice.KubernetesVersionProperties{
	// 			{
	// 				IsPreview: to.Ptr(false),
	// 				PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{
	// 					"1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{
	// 						Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{
	// 							{
	// 								OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner),
	// 								OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 								Ready: to.Ptr(true),
	// 							},
	// 							{
	// 								OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")),
	// 								OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
	// 								Ready: to.Ptr(true),
	// 							},
	// 							{
	// 								ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"),
	// 								OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022),
	// 								OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
	// 								Ready: to.Ptr(false),
	// 						}},
	// 						Upgrades: []*string{
	// 							to.Ptr("1.23.13")},
	// 						},
	// 						"1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{
	// 							Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{
	// 								{
	// 									OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner),
	// 									OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 									Ready: to.Ptr(true),
	// 								},
	// 								{
	// 									OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019),
	// 									OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
	// 									Ready: to.Ptr(true),
	// 								},
	// 								{
	// 									OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022),
	// 									OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
	// 									Ready: to.Ptr(true),
	// 							}},
	// 							Upgrades: []*string{
	// 							},
	// 						},
	// 					},
	// 					Version: to.Ptr("1.23"),
	// 			}},
	// 		},
	// 	}
}
Output:

func (*Client) GetVMSKUs added in v0.3.0

func (client *Client) GetVMSKUs(ctx context.Context, customLocationResourceURI string, options *ClientGetVMSKUsOptions) (ClientGetVMSKUsResponse, error)

GetVMSKUs - Lists the supported VM skus for the specified custom location If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - ClientGetVMSKUsOptions contains the optional parameters for the Client.GetVMSKUs method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetVmSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().GetVMSKUs(ctx, "subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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.VMSKUProfile = armhybridcontainerservice.VMSKUProfile{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/skus"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation/providers/Microsoft.HybridContainerService/skus/default"),
	// 	ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.VMSKUProfileProperties{
	// 		ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 		Values: []*armhybridcontainerservice.VMSKUProperties{
	// 			{
	// 				Name: to.Ptr("Standard_A0"),
	// 				Capabilities: []*armhybridcontainerservice.VMSKUCapabilities{
	// 					{
	// 						Name: to.Ptr("vCpu"),
	// 						Value: to.Ptr("2"),
	// 					},
	// 					{
	// 						Name: to.Ptr("MemoryMb"),
	// 						Value: to.Ptr("2345"),
	// 					},
	// 					{
	// 						Name: to.Ptr("DiskSizeGb"),
	// 						Value: to.Ptr("128"),
	// 					},
	// 					{
	// 						Name: to.Ptr("GpuCount"),
	// 						Value: to.Ptr("1"),
	// 					},
	// 					{
	// 						Name: to.Ptr("GpuNameType"),
	// 						Value: to.Ptr("NVIDIA Tesla T4"),
	// 					},
	// 					{
	// 						Name: to.Ptr("GpuAssignMode"),
	// 						Value: to.Ptr("1"),
	// 					},
	// 					{
	// 						Name: to.Ptr("Provider"),
	// 						Value: to.Ptr("HCI"),
	// 				}},
	// 				ResourceType: to.Ptr("VirtualMachines"),
	// 				Size: to.Ptr("A0"),
	// 				Tier: to.Ptr("Standard"),
	// 		}},
	// 	},
	// }
}
Output:

type ClientBeginDeleteKubernetesVersionsOptions added in v0.3.0

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

ClientBeginDeleteKubernetesVersionsOptions contains the optional parameters for the Client.BeginDeleteKubernetesVersions method.

type ClientBeginDeleteVMSKUsOptions added in v0.3.0

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

ClientBeginDeleteVMSKUsOptions contains the optional parameters for the Client.BeginDeleteVMSKUs method.

type ClientBeginPutKubernetesVersionsOptions added in v0.3.0

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

ClientBeginPutKubernetesVersionsOptions contains the optional parameters for the Client.BeginPutKubernetesVersions method.

type ClientBeginPutVMSKUsOptions added in v0.3.0

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

ClientBeginPutVMSKUsOptions contains the optional parameters for the Client.BeginPutVMSKUs method.

type ClientDeleteKubernetesVersionsResponse added in v0.3.0

type ClientDeleteKubernetesVersionsResponse struct {
}

ClientDeleteKubernetesVersionsResponse contains the response from method Client.BeginDeleteKubernetesVersions.

type ClientDeleteVMSKUsResponse added in v0.3.0

type ClientDeleteVMSKUsResponse struct {
}

ClientDeleteVMSKUsResponse contains the response from method Client.BeginDeleteVMSKUs.

type ClientFactory added in v0.2.0

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

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

func NewClientFactory added in v0.2.0

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

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

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

func (*ClientFactory) NewAgentPoolClient added in v0.2.0

func (c *ClientFactory) NewAgentPoolClient() *AgentPoolClient

NewAgentPoolClient creates a new instance of AgentPoolClient.

func (*ClientFactory) NewClient added in v0.2.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewHybridIdentityMetadataClient added in v0.2.0

func (c *ClientFactory) NewHybridIdentityMetadataClient() *HybridIdentityMetadataClient

NewHybridIdentityMetadataClient creates a new instance of HybridIdentityMetadataClient.

func (*ClientFactory) NewKubernetesVersionsClient added in v0.3.0

func (c *ClientFactory) NewKubernetesVersionsClient() *KubernetesVersionsClient

NewKubernetesVersionsClient creates a new instance of KubernetesVersionsClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewProvisionedClusterInstancesClient added in v0.3.0

func (c *ClientFactory) NewProvisionedClusterInstancesClient() *ProvisionedClusterInstancesClient

NewProvisionedClusterInstancesClient creates a new instance of ProvisionedClusterInstancesClient.

func (*ClientFactory) NewVMSKUsClient added in v0.3.0

func (c *ClientFactory) NewVMSKUsClient() *VMSKUsClient

NewVMSKUsClient creates a new instance of VMSKUsClient.

func (*ClientFactory) NewVirtualNetworksClient added in v0.2.0

func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient

NewVirtualNetworksClient creates a new instance of VirtualNetworksClient.

type ClientGetKubernetesVersionsOptions added in v0.3.0

type ClientGetKubernetesVersionsOptions struct {
}

ClientGetKubernetesVersionsOptions contains the optional parameters for the Client.GetKubernetesVersions method.

type ClientGetKubernetesVersionsResponse added in v0.3.0

type ClientGetKubernetesVersionsResponse struct {
	// The supported kubernetes versions.
	KubernetesVersionProfile
}

ClientGetKubernetesVersionsResponse contains the response from method Client.GetKubernetesVersions.

type ClientGetVMSKUsOptions added in v0.3.0

type ClientGetVMSKUsOptions struct {
}

ClientGetVMSKUsOptions contains the optional parameters for the Client.GetVMSKUs method.

type ClientGetVMSKUsResponse added in v0.3.0

type ClientGetVMSKUsResponse struct {
	// The list of supported VM SKUs.
	VMSKUProfile
}

ClientGetVMSKUsResponse contains the response from method Client.GetVMSKUs.

type ClientPutKubernetesVersionsResponse added in v0.3.0

type ClientPutKubernetesVersionsResponse struct {
	// The supported kubernetes versions.
	KubernetesVersionProfile
}

ClientPutKubernetesVersionsResponse contains the response from method Client.BeginPutKubernetesVersions.

type ClientPutVMSKUsResponse added in v0.3.0

type ClientPutVMSKUsResponse struct {
	// The list of supported VM SKUs.
	VMSKUProfile
}

ClientPutVMSKUsResponse contains the response from method Client.BeginPutVMSKUs.

type CloudProviderProfile

type CloudProviderProfile struct {
	// The profile for the infrastructure networks used by the provisioned cluster
	InfraNetworkProfile *CloudProviderProfileInfraNetworkProfile
}

CloudProviderProfile - The profile for the underlying cloud infrastructure provider for the provisioned cluster.

func (CloudProviderProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudProviderProfile.

func (*CloudProviderProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudProviderProfile.

type CloudProviderProfileInfraNetworkProfile

type CloudProviderProfileInfraNetworkProfile struct {
	// List of ARM resource Ids (maximum 1) for the infrastructure network object e.g.
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}
	VnetSubnetIDs []*string
}

CloudProviderProfileInfraNetworkProfile - The profile for the infrastructure networks used by the provisioned cluster

func (CloudProviderProfileInfraNetworkProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudProviderProfileInfraNetworkProfile.

func (*CloudProviderProfileInfraNetworkProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudProviderProfileInfraNetworkProfile.

type ClusterVMAccessProfile added in v1.0.0

type ClusterVMAccessProfile struct {
	// IP Address or CIDR for SSH access to VMs in the provisioned cluster
	AuthorizedIPRanges *string
}

ClusterVMAccessProfile - The SSH restricted access profile for the VMs in the provisioned cluster.

func (ClusterVMAccessProfile) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ClusterVMAccessProfile.

func (*ClusterVMAccessProfile) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterVMAccessProfile.

type ControlPlaneProfile

type ControlPlaneProfile struct {
	// IP Address of the Kubernetes API server
	ControlPlaneEndpoint *ControlPlaneProfileControlPlaneEndpoint

	// Number of control plane nodes. The default value is 1, and the count should be an odd number
	Count *int32

	// VM sku size of the control plane nodes
	VMSize *string
}

ControlPlaneProfile - The properties of the control plane nodes of the provisioned cluster

func (ControlPlaneProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ControlPlaneProfile.

func (*ControlPlaneProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneProfile.

type ControlPlaneProfileControlPlaneEndpoint added in v1.0.0

type ControlPlaneProfileControlPlaneEndpoint struct {
	// IP address of the Kubernetes API server
	HostIP *string
}

ControlPlaneProfileControlPlaneEndpoint - IP Address of the Kubernetes API server

func (ControlPlaneProfileControlPlaneEndpoint) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ControlPlaneProfileControlPlaneEndpoint.

func (*ControlPlaneProfileControlPlaneEndpoint) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneProfileControlPlaneEndpoint.

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

type CredentialResult struct {
	// READ-ONLY; The name of the credential.
	Name *string

	// READ-ONLY; Base64-encoded Kubernetes configuration file.
	Value []byte
}

CredentialResult - The credential result response.

func (CredentialResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type CredentialResult.

func (*CredentialResult) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CredentialResult.

type Expander added in v1.0.0

type Expander string

Expander - If not specified, the default is 'random'. See expanders [https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders] for more information.

const (
	// ExpanderLeastWaste - Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up.
	// This is useful when you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand
	// those when there are pending pods that need a lot of those resources.
	ExpanderLeastWaste Expander = "least-waste"
	// ExpanderMostPods - Selects the node group that would be able to schedule the most pods when scaling up. This is useful
	// when you are using nodeSelector to make sure certain pods land on certain nodes. Note that this won't cause the autoscaler
	// to select bigger nodes vs. smaller, as it can add multiple smaller nodes at once.
	ExpanderMostPods Expander = "most-pods"
	// ExpanderPriority - Selects the node group that has the highest priority assigned by the user. It's configuration is described
	// in more details [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md).
	ExpanderPriority Expander = "priority"
	// ExpanderRandom - Used when you don't have a particular need for the node groups to scale differently.
	ExpanderRandom Expander = "random"
)

func PossibleExpanderValues added in v1.0.0

func PossibleExpanderValues() []Expander

PossibleExpanderValues returns the possible values for the Expander const type.

type ExtendedLocation added in v0.3.0

type ExtendedLocation struct {
	// ARM Id of the extended location.
	Name *string

	// The extended location type. Allowed value: 'CustomLocation'
	Type *ExtendedLocationTypes
}

ExtendedLocation - Extended location pointing to the underlying infrastructure

func (ExtendedLocation) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.

func (*ExtendedLocation) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.

type ExtendedLocationTypes added in v0.3.0

type ExtendedLocationTypes string

ExtendedLocationTypes - The extended location type. Allowed value: 'CustomLocation'

const (
	ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)

func PossibleExtendedLocationTypesValues added in v0.3.0

func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes

PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.

type HybridIdentityMetadata

type HybridIdentityMetadata struct {
	// REQUIRED; Resource properties.
	Properties *HybridIdentityMetadataProperties

	// 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
}

HybridIdentityMetadata - Defines the hybridIdentityMetadata.

func (HybridIdentityMetadata) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadata.

func (*HybridIdentityMetadata) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadata.

type HybridIdentityMetadataClient

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

HybridIdentityMetadataClient contains the methods for the HybridIdentityMetadata group. Don't use this type directly, use NewHybridIdentityMetadataClient() instead.

func NewHybridIdentityMetadataClient

func NewHybridIdentityMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*HybridIdentityMetadataClient, error)

NewHybridIdentityMetadataClient creates a new instance of HybridIdentityMetadataClient with the specified values.

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

func (*HybridIdentityMetadataClient) BeginDelete added in v0.3.0

BeginDelete - Deletes the hybrid identity metadata proxy resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - HybridIdentityMetadataClientBeginDeleteOptions contains the optional parameters for the HybridIdentityMetadataClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteHybridIdentityMetadata.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewHybridIdentityMetadataClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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 (*HybridIdentityMetadataClient) Get

Get - Get the hybrid identity metadata proxy resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetHybridIdentityMetadata.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

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

func (*HybridIdentityMetadataClient) NewListByClusterPager

NewListByClusterPager - Lists the hybrid identity metadata proxy resource in a provisioned cluster instance.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - HybridIdentityMetadataClientListByClusterOptions contains the optional parameters for the HybridIdentityMetadataClient.NewListByClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/HybridIdentityMetadataListByCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHybridIdentityMetadataClient().NewListByClusterPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.HybridIdentityMetadataList = armhybridcontainerservice.HybridIdentityMetadataList{
		// 	Value: []*armhybridcontainerservice.HybridIdentityMetadata{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/hybridIdentityMetadata"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default"),
		// 			Properties: &armhybridcontainerservice.HybridIdentityMetadataProperties{
		// 				PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"),
		// 				ResourceUID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*HybridIdentityMetadataClient) Put

Put - Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • body - Hybrid Identity Metadata resource definition
  • options - HybridIdentityMetadataClientPutOptions contains the optional parameters for the HybridIdentityMetadataClient.Put method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/CreateHybridIdentityMetadata.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHybridIdentityMetadataClient().Put(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", armhybridcontainerservice.HybridIdentityMetadata{
		Properties: &armhybridcontainerservice.HybridIdentityMetadataProperties{
			PublicKey:   to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"),
			ResourceUID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"),
		},
	}, 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.HybridIdentityMetadata = armhybridcontainerservice.HybridIdentityMetadata{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/hybridIdentityMetadata"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default"),
	// 	Properties: &armhybridcontainerservice.HybridIdentityMetadataProperties{
	// 		PublicKey: to.Ptr("8ec7d60c-9700-40b1-8e6e-e5b2f6f477f2"),
	// 		ResourceUID: to.Ptr("f8b82dff-38ef-4220-99ef-d3a3f86ddc6c"),
	// 	},
	// }
}
Output:

type HybridIdentityMetadataClientBeginDeleteOptions added in v0.3.0

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

HybridIdentityMetadataClientBeginDeleteOptions contains the optional parameters for the HybridIdentityMetadataClient.BeginDelete method.

type HybridIdentityMetadataClientDeleteResponse

type HybridIdentityMetadataClientDeleteResponse struct {
}

HybridIdentityMetadataClientDeleteResponse contains the response from method HybridIdentityMetadataClient.BeginDelete.

type HybridIdentityMetadataClientGetOptions

type HybridIdentityMetadataClientGetOptions struct {
}

HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get method.

type HybridIdentityMetadataClientGetResponse

type HybridIdentityMetadataClientGetResponse struct {
	// Defines the hybridIdentityMetadata.
	HybridIdentityMetadata
}

HybridIdentityMetadataClientGetResponse contains the response from method HybridIdentityMetadataClient.Get.

type HybridIdentityMetadataClientListByClusterOptions

type HybridIdentityMetadataClientListByClusterOptions struct {
}

HybridIdentityMetadataClientListByClusterOptions contains the optional parameters for the HybridIdentityMetadataClient.NewListByClusterPager method.

type HybridIdentityMetadataClientListByClusterResponse

type HybridIdentityMetadataClientListByClusterResponse struct {
	// List of hybridIdentityMetadata.
	HybridIdentityMetadataList
}

HybridIdentityMetadataClientListByClusterResponse contains the response from method HybridIdentityMetadataClient.NewListByClusterPager.

type HybridIdentityMetadataClientPutOptions

type HybridIdentityMetadataClientPutOptions struct {
}

HybridIdentityMetadataClientPutOptions contains the optional parameters for the HybridIdentityMetadataClient.Put method.

type HybridIdentityMetadataClientPutResponse

type HybridIdentityMetadataClientPutResponse struct {
	// Defines the hybridIdentityMetadata.
	HybridIdentityMetadata
}

HybridIdentityMetadataClientPutResponse contains the response from method HybridIdentityMetadataClient.Put.

type HybridIdentityMetadataList

type HybridIdentityMetadataList struct {
	// REQUIRED; Array of hybridIdentityMetadata
	Value []*HybridIdentityMetadata

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

HybridIdentityMetadataList - List of hybridIdentityMetadata.

func (HybridIdentityMetadataList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadataList.

func (*HybridIdentityMetadataList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadataList.

type HybridIdentityMetadataProperties

type HybridIdentityMetadataProperties struct {
	// Onboarding public key for provisioning the Managed identity for the connected cluster.
	PublicKey *string

	// Unique id of the parent provisioned cluster resource.
	ResourceUID *string

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

HybridIdentityMetadataProperties - Defines the resource properties for the hybrid identity metadata.

func (HybridIdentityMetadataProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HybridIdentityMetadataProperties.

func (*HybridIdentityMetadataProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HybridIdentityMetadataProperties.

type KubernetesPatchVersions added in v0.3.0

type KubernetesPatchVersions struct {
	// Indicates whether the kubernetes version image is ready or not
	Readiness []*KubernetesVersionReadiness

	// Possible upgrade paths for given patch version
	Upgrades []*string
}

KubernetesPatchVersions - Kubernetes Patch Version profile

func (KubernetesPatchVersions) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesPatchVersions.

func (*KubernetesPatchVersions) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPatchVersions.

type KubernetesVersionProfile added in v0.3.0

type KubernetesVersionProfile struct {
	// Extended location pointing to the underlying infrastructure
	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
	Properties *KubernetesVersionProfileProperties

	// 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
}

KubernetesVersionProfile - The supported kubernetes versions.

func (KubernetesVersionProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProfile.

func (*KubernetesVersionProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionProfile.

type KubernetesVersionProfileList added in v0.3.0

type KubernetesVersionProfileList struct {
	NextLink *string
	Value    []*KubernetesVersionProfile
}

KubernetesVersionProfileList - List of supported kubernetes versions.

func (KubernetesVersionProfileList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProfileList.

func (*KubernetesVersionProfileList) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionProfileList.

type KubernetesVersionProfileProperties added in v0.3.0

type KubernetesVersionProfileProperties struct {
	// List of supported Kubernetes versions
	Values []*KubernetesVersionProperties

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

func (KubernetesVersionProfileProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProfileProperties.

func (*KubernetesVersionProfileProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionProfileProperties.

type KubernetesVersionProperties added in v0.3.0

type KubernetesVersionProperties struct {
	// READ-ONLY; Whether this version is in preview mode.
	IsPreview *bool

	// READ-ONLY; Patch versions of a Kubernetes release
	PatchVersions map[string]*KubernetesPatchVersions

	// READ-ONLY; major.minor version of Kubernetes release
	Version *string
}

KubernetesVersionProperties - Kubernetes version profile for given major.minor release

func (KubernetesVersionProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProperties.

func (*KubernetesVersionProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionProperties.

type KubernetesVersionReadiness added in v0.3.0

type KubernetesVersionReadiness struct {
	// Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when
	// OSType is Windows.
	OSSKU *OSSKU

	// READ-ONLY; The error message for version not being ready
	ErrorMessage *string

	// READ-ONLY; The particular KubernetesVersion Image OS Type (Linux, Windows)
	OSType *OsType

	// READ-ONLY; Whether the kubernetes version image is ready or not
	Ready *bool
}

KubernetesVersionReadiness - Indicates whether the kubernetes version image is ready or not

func (KubernetesVersionReadiness) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type KubernetesVersionReadiness.

func (*KubernetesVersionReadiness) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionReadiness.

type KubernetesVersionsClient added in v0.3.0

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

KubernetesVersionsClient contains the methods for the KubernetesVersions group. Don't use this type directly, use NewKubernetesVersionsClient() instead.

func NewKubernetesVersionsClient added in v0.3.0

func NewKubernetesVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*KubernetesVersionsClient, error)

NewKubernetesVersionsClient creates a new instance of KubernetesVersionsClient with the specified values.

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

func (*KubernetesVersionsClient) NewListPager added in v0.3.0

NewListPager - Lists the supported kubernetes versions for the specified custom location

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - KubernetesVersionsClientListOptions contains the optional parameters for the KubernetesVersionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListKubernetesVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewKubernetesVersionsClient().NewListPager("subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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.KubernetesVersionProfileList = armhybridcontainerservice.KubernetesVersionProfileList{
		// 	Value: []*armhybridcontainerservice.KubernetesVersionProfile{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("microsoft.hybridcontainerservice/kubernetesVersions"),
		// 			ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation/providers/Microsoft.HybridContainerService/kubernetesVersions/default"),
		// 			ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
		// 				Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		// 			},
		// 			Properties: &armhybridcontainerservice.KubernetesVersionProfileProperties{
		// 				ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
		// 				Values: []*armhybridcontainerservice.KubernetesVersionProperties{
		// 					{
		// 						IsPreview: to.Ptr(false),
		// 						PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{
		// 							"1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{
		// 								Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{
		// 									{
		// 										OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner),
		// 										OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
		// 										Ready: to.Ptr(true),
		// 									},
		// 									{
		// 										OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019),
		// 										OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
		// 										Ready: to.Ptr(true),
		// 									},
		// 									{
		// 										ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"),
		// 										OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022),
		// 										OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
		// 										Ready: to.Ptr(false),
		// 								}},
		// 								Upgrades: []*string{
		// 									to.Ptr("1.23.13")},
		// 								},
		// 								"1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{
		// 									Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{
		// 										{
		// 											OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner),
		// 											OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
		// 											Ready: to.Ptr(true),
		// 										},
		// 										{
		// 											OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019),
		// 											OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
		// 											Ready: to.Ptr(true),
		// 										},
		// 										{
		// 											OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022),
		// 											OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows),
		// 											Ready: to.Ptr(true),
		// 									}},
		// 									Upgrades: []*string{
		// 									},
		// 								},
		// 							},
		// 							Version: to.Ptr("1.23"),
		// 					}},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type KubernetesVersionsClientListOptions added in v0.3.0

type KubernetesVersionsClientListOptions struct {
}

KubernetesVersionsClientListOptions contains the optional parameters for the KubernetesVersionsClient.NewListPager method.

type KubernetesVersionsClientListResponse added in v0.3.0

type KubernetesVersionsClientListResponse struct {
	// List of supported kubernetes versions.
	KubernetesVersionProfileList
}

KubernetesVersionsClientListResponse contains the response from method KubernetesVersionsClient.NewListPager.

type LinuxProfileProperties

type LinuxProfileProperties struct {
	// SSH configuration for VMs of the provisioned cluster.
	SSH *LinuxProfilePropertiesSSH
}

LinuxProfileProperties - SSH profile for control plane and nodepool VMs of the provisioned cluster.

func (LinuxProfileProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinuxProfileProperties.

func (*LinuxProfileProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfileProperties.

type LinuxProfilePropertiesSSH

type LinuxProfilePropertiesSSH struct {
	// The list of SSH public keys used to authenticate with VMs. A maximum of 1 key may be specified.
	PublicKeys []*LinuxProfilePropertiesSSHPublicKeysItem
}

LinuxProfilePropertiesSSH - SSH configuration for VMs of the provisioned cluster.

func (LinuxProfilePropertiesSSH) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinuxProfilePropertiesSSH.

func (*LinuxProfilePropertiesSSH) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfilePropertiesSSH.

type LinuxProfilePropertiesSSHPublicKeysItem

type LinuxProfilePropertiesSSHPublicKeysItem struct {
	// Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without
	// headers.
	KeyData *string
}

func (LinuxProfilePropertiesSSHPublicKeysItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinuxProfilePropertiesSSHPublicKeysItem.

func (*LinuxProfilePropertiesSSHPublicKeysItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfilePropertiesSSHPublicKeysItem.

type ListCredentialResponse added in v0.3.0

type ListCredentialResponse struct {
	Error      *ListCredentialResponseError
	Properties *ListCredentialResponseProperties

	// READ-ONLY; Operation Id
	ID *string

	// READ-ONLY; Operation Name
	Name *string

	// READ-ONLY; ARM Resource Id of the provisioned cluster instance
	ResourceID *string

	// READ-ONLY; Provisioning state of the resource
	Status *ResourceProvisioningState
}

ListCredentialResponse - The list kubeconfig result response.

func (ListCredentialResponse) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ListCredentialResponse.

func (*ListCredentialResponse) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListCredentialResponse.

type ListCredentialResponseError added in v0.3.0

type ListCredentialResponseError struct {
	Code    *string
	Message *string
}

func (ListCredentialResponseError) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ListCredentialResponseError.

func (*ListCredentialResponseError) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListCredentialResponseError.

type ListCredentialResponseProperties added in v0.3.0

type ListCredentialResponseProperties struct {
	// READ-ONLY; Base64-encoded Kubernetes configuration file.
	Kubeconfigs []*CredentialResult
}

func (ListCredentialResponseProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ListCredentialResponseProperties.

func (*ListCredentialResponseProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListCredentialResponseProperties.

type NamedAgentPoolProfile

type NamedAgentPoolProfile struct {
	// Number of nodes in the agent pool. The default value is 1.
	Count *int32

	// Whether to enable auto-scaler. Default value is false
	EnableAutoScaling *bool

	// The maximum number of nodes for auto-scaling
	MaxCount *int32

	// The maximum number of pods that can run on a node.
	MaxPods *int32

	// The minimum number of nodes for auto-scaling
	MinCount *int32

	// Unique name of the default agent pool in the context of the provisioned cluster. Default value is -nodepool1
	Name *string

	// The node labels to be persisted across all nodes in agent pool.
	NodeLabels map[string]*string

	// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
	NodeTaints []*string

	// Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when
	// OSType is Windows.
	OSSKU *OSSKU

	// The particular KubernetesVersion Image OS Type (Linux, Windows)
	OSType *OsType

	// The VM sku size of the agent pool node VMs.
	VMSize *string

	// READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned
	// cluster.
	KubernetesVersion *string
}

NamedAgentPoolProfile - Profile of the default agent pool along with a name parameter

func (NamedAgentPoolProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedAgentPoolProfile.

func (*NamedAgentPoolProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedAgentPoolProfile.

type NetworkPolicy

type NetworkPolicy string

NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'calico'.

const (
	NetworkPolicyCalico NetworkPolicy = "calico"
)

func PossibleNetworkPolicyValues

func PossibleNetworkPolicyValues() []NetworkPolicy

PossibleNetworkPolicyValues returns the possible values for the NetworkPolicy const type.

type NetworkProfile

type NetworkProfile struct {
	// Profile of the HA Proxy load balancer.
	LoadBalancerProfile *NetworkProfileLoadBalancerProfile

	// Network policy used for building Kubernetes network. Possible values include: 'calico'.
	NetworkPolicy *NetworkPolicy

	// A CIDR notation IP Address range from which to assign pod IPs.
	PodCidr *string
}

NetworkProfile - The network configuration profile for the provisioned cluster.

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

type NetworkProfileLoadBalancerProfile struct {
	// Number of HA Proxy load balancer VMs. The default value is 0.
	Count *int32
}

NetworkProfileLoadBalancerProfile - Profile of the HA Proxy load balancer.

func (NetworkProfileLoadBalancerProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type NetworkProfileLoadBalancerProfile.

func (*NetworkProfileLoadBalancerProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileLoadBalancerProfile.

type OSSKU added in v0.3.0

type OSSKU string

OSSKU - Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when OSType is Windows.

const (
	// OSSKUCBLMariner - Use Mariner as the OS for node images.
	OSSKUCBLMariner OSSKU = "CBLMariner"
	// OSSKUWindows2019 - Use Windows2019 as the OS for node images.
	OSSKUWindows2019 OSSKU = "Windows2019"
	// OSSKUWindows2022 - Use Windows2022 as the OS for node images.
	OSSKUWindows2022 OSSKU = "Windows2022"
)

func PossibleOSSKUValues added in v0.3.0

func PossibleOSSKUValues() []OSSKU

PossibleOSSKUValues returns the possible values for the OSSKU const type.

type Operation added in v0.3.0

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

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

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

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

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

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

func (Operation) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay added in v0.3.0

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

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

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

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

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult added in v0.3.0

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

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

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

func (OperationListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

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 - Lists the supported operations

Generated from API version 2024-01-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/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armhybridcontainerservice.OperationListResult{
		// 	Value: []*armhybridcontainerservice.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/Read"),
		// 			Display: &armhybridcontainerservice.OperationDisplay{
		// 				Description: to.Ptr("Read provisionedClusters"),
		// 				Operation: to.Ptr("Gets/List provisionedClusters resources"),
		// 				Provider: to.Ptr("Microsoft.HybridContainerService"),
		// 				Resource: to.Ptr("provisionedClusters"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/Write"),
		// 			Display: &armhybridcontainerservice.OperationDisplay{
		// 				Description: to.Ptr("Writes provisionedClusters"),
		// 				Operation: to.Ptr("Create/update provisionedClusters resources"),
		// 				Provider: to.Ptr("Microsoft.HybridContainerService"),
		// 				Resource: to.Ptr("provisionedClusters"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/Delete"),
		// 			Display: &armhybridcontainerservice.OperationDisplay{
		// 				Description: to.Ptr("Deletes provisionedClusters"),
		// 				Operation: to.Ptr("Deletes provisionedClusters resource"),
		// 				Provider: to.Ptr("Microsoft.HybridContainerService"),
		// 				Resource: to.Ptr("provisionedClusters"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/upgradeProfiles/Read"),
		// 			Display: &armhybridcontainerservice.OperationDisplay{
		// 				Description: to.Ptr("Gets the upgrade profile of the cluster"),
		// 				Operation: to.Ptr("Get UpgradeProfile"),
		// 				Provider: to.Ptr("Microsoft.HybridContainerService"),
		// 				Resource: to.Ptr("UpgradeProfile"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin added in v0.3.0

type Origin string

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

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

func PossibleOriginValues added in v0.3.0

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type OsType

type OsType string

OsType - The particular KubernetesVersion Image OS Type (Linux, Windows)

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

func PossibleOsTypeValues

func PossibleOsTypeValues() []OsType

PossibleOsTypeValues returns the possible values for the OsType const type.

type ProvisionedCluster added in v1.0.0

type ProvisionedCluster struct {
	// Extended location pointing to the underlying infrastructure
	ExtendedLocation *ExtendedLocation

	// Properties of the provisioned cluster.
	Properties *ProvisionedClusterProperties

	// 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
}

ProvisionedCluster - The provisioned cluster resource definition.

func (ProvisionedCluster) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedCluster.

func (*ProvisionedCluster) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedCluster.

type ProvisionedClusterInstancesClient added in v0.3.0

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

ProvisionedClusterInstancesClient contains the methods for the ProvisionedClusterInstances group. Don't use this type directly, use NewProvisionedClusterInstancesClient() instead.

func NewProvisionedClusterInstancesClient added in v0.3.0

func NewProvisionedClusterInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProvisionedClusterInstancesClient, error)

NewProvisionedClusterInstancesClient creates a new instance of ProvisionedClusterInstancesClient with the specified values.

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

func (*ProvisionedClusterInstancesClient) BeginCreateOrUpdate added in v0.3.0

BeginCreateOrUpdate - Creates or updates the provisioned cluster instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • provisionedClusterInstance - Provisioned Cluster resource definition
  • options - ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutProvisionedClusterInstance.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", armhybridcontainerservice.ProvisionedCluster{
		ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
			Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armhybridcontainerservice.ProvisionedClusterProperties{
			AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{
				{
					Name: to.Ptr("default-nodepool-1"),
					NodeLabels: map[string]*string{
						"env":  to.Ptr("dev"),
						"goal": to.Ptr("test"),
					},
					NodeTaints: []*string{
						to.Ptr("env=prod:NoSchedule"),
						to.Ptr("sku=gpu:NoSchedule")},
					OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
					Count:  to.Ptr[int32](1),
					VMSize: to.Ptr("Standard_A4_v2"),
				}},
			CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{
				InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{
					VnetSubnetIDs: []*string{
						to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")},
				},
			},
			ClusterVMAccessProfile: &armhybridcontainerservice.ClusterVMAccessProfile{
				AuthorizedIPRanges: to.Ptr("127.0.0.1,127.0.0.2"),
			},
			ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{
				Count:  to.Ptr[int32](1),
				VMSize: to.Ptr("Standard_A4_v2"),
			},
			KubernetesVersion: to.Ptr("v1.20.5"),
			LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{
				AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable),
			},
			LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{
				SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{
					PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{
						{
							KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."),
						}},
				},
			},
			NetworkProfile: &armhybridcontainerservice.NetworkProfile{
				NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico),
				PodCidr:       to.Ptr("10.244.0.0/16"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ProvisionedCluster = armhybridcontainerservice.ProvisionedCluster{
	// 	Name: to.Ptr("test-hybridakscluster"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default"),
	// 	ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.ProvisionedClusterProperties{
	// 		AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{
	// 			{
	// 				Name: to.Ptr("default-nodepool-1"),
	// 				NodeLabels: map[string]*string{
	// 					"env": to.Ptr("dev"),
	// 					"goal": to.Ptr("test"),
	// 				},
	// 				NodeTaints: []*string{
	// 					to.Ptr("env=prod:NoSchedule"),
	// 					to.Ptr("sku=gpu:NoSchedule")},
	// 					OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 					Count: to.Ptr[int32](1),
	// 					VMSize: to.Ptr("Standard_A4_v2"),
	// 			}},
	// 			CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{
	// 				InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{
	// 					VnetSubnetIDs: []*string{
	// 						to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")},
	// 					},
	// 				},
	// 				ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{
	// 					Count: to.Ptr[int32](1),
	// 					VMSize: to.Ptr("Standard_A4_v2"),
	// 				},
	// 				KubernetesVersion: to.Ptr("v1.20.5"),
	// 				LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{
	// 					AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable),
	// 				},
	// 				LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{
	// 					SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{
	// 						PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{
	// 							{
	// 								KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."),
	// 						}},
	// 					},
	// 				},
	// 				NetworkProfile: &armhybridcontainerservice.NetworkProfile{
	// 					NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico),
	// 					PodCidr: to.Ptr("10.244.0.0/16"),
	// 				},
	// 				ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 			},
	// 		}
}
Output:

func (*ProvisionedClusterInstancesClient) BeginDelete added in v0.3.0

BeginDelete - Deletes the provisioned cluster instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientBeginDeleteOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteProvisionedClusterInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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 (*ProvisionedClusterInstancesClient) BeginListAdminKubeconfig added in v0.3.0

BeginListAdminKubeconfig - Lists the admin credentials of the provisioned cluster (can only be used within private network) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListAdminKubeconfig method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceListAdminKubeconfig.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginListAdminKubeconfig(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.ListCredentialResponse = armhybridcontainerservice.ListCredentialResponse{
	// 	Name: to.Ptr("766ea16c-53c6-421e-9b7d-a8bea47285ed*36530D233A0F410A40772AE878D8E7A0B2223081048946AD3D40DE0268480FBE"),
	// 	ID: to.Ptr("/providers/Microsoft.HybridContainerService/locations/EASTUS/operationStatuses/766ea16c-53c6-421e-9b7d-a8bea47285ed*36530D233A0F410A40772AE878D8E7A0B2223081048946AD3D40DE0268480FBE"),
	// 	Properties: &armhybridcontainerservice.ListCredentialResponseProperties{
	// 		Kubeconfigs: []*armhybridcontainerservice.CredentialResult{
	// 			{
	// 				Name: to.Ptr("credentialName1"),
	// 				Value: []byte("Y3JlZGVudGlhbFZhbHVlMQ=="),
	// 		}},
	// 	},
	// 	ResourceID: to.Ptr("/subscriptions/921d26b3-c14d-4efc-b56e-93a2439e028c/resourceGroups/rg/providers/Microsoft.HybridContainerService/provisionedClusters/cluster-pc-1-24"),
	// 	Status: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// }
}
Output:

func (*ProvisionedClusterInstancesClient) BeginListUserKubeconfig added in v0.3.0

BeginListUserKubeconfig - Lists the user credentials of the provisioned cluster (can only be used within private network) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListUserKubeconfig method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceListUserKubeconfig.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginListUserKubeconfig(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.ListCredentialResponse = armhybridcontainerservice.ListCredentialResponse{
	// 	Name: to.Ptr("766ea16c-53c6-421e-9b7d-a8bea47285ed*36530D233A0F410A40772AE878D8E7A0B2223081048946AD3D40DE0268480FBE"),
	// 	ID: to.Ptr("/providers/Microsoft.HybridContainerService/locations/EASTUS/operationStatuses/766ea16c-53c6-421e-9b7d-a8bea47285ed*36530D233A0F410A40772AE878D8E7A0B2223081048946AD3D40DE0268480FBE"),
	// 	Properties: &armhybridcontainerservice.ListCredentialResponseProperties{
	// 		Kubeconfigs: []*armhybridcontainerservice.CredentialResult{
	// 			{
	// 				Name: to.Ptr("credentialName1"),
	// 				Value: []byte("Y3JlZGVudGlhbFZhbHVlMQ=="),
	// 		}},
	// 	},
	// 	ResourceID: to.Ptr("/subscriptions/921d26b3-c14d-4efc-b56e-93a2439e028c/resourceGroups/rg/providers/Microsoft.HybridContainerService/provisionedClusters/cluster-pc-1-24"),
	// 	Status: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// }
}
Output:

func (*ProvisionedClusterInstancesClient) Get added in v0.3.0

Get - Gets the provisioned cluster instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientGetOptions contains the optional parameters for the ProvisionedClusterInstancesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetProvisionedClusterInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProvisionedClusterInstancesClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.ProvisionedCluster = armhybridcontainerservice.ProvisionedCluster{
	// 	Name: to.Ptr("test-hybridakscluster"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default"),
	// 	ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.ProvisionedClusterProperties{
	// 		AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{
	// 			{
	// 				Name: to.Ptr("default-nodepool-1"),
	// 				OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 				Count: to.Ptr[int32](1),
	// 				VMSize: to.Ptr("Standard_A4_v2"),
	// 		}},
	// 		CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{
	// 			InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{
	// 				VnetSubnetIDs: []*string{
	// 					to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")},
	// 				},
	// 			},
	// 			ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{
	// 				Count: to.Ptr[int32](1),
	// 				VMSize: to.Ptr("Standard_A4_v2"),
	// 			},
	// 			KubernetesVersion: to.Ptr("v1.20.5"),
	// 			LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{
	// 				AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable),
	// 			},
	// 			LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{
	// 				SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{
	// 					PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{
	// 						{
	// 							KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."),
	// 					}},
	// 				},
	// 			},
	// 			NetworkProfile: &armhybridcontainerservice.NetworkProfile{
	// 				NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico),
	// 				PodCidr: to.Ptr("10.244.0.0/16"),
	// 			},
	// 			ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*ProvisionedClusterInstancesClient) GetUpgradeProfile added in v0.3.0

GetUpgradeProfile - Gets the upgrade profile of a provisioned cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientGetUpgradeProfileOptions contains the optional parameters for the ProvisionedClusterInstancesClient.GetUpgradeProfile method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceGetUpgradeProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProvisionedClusterInstancesClient().GetUpgradeProfile(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.ProvisionedClusterUpgradeProfile = armhybridcontainerservice.ProvisionedClusterUpgradeProfile{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/upgradeprofiles"),
	// 	ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/upgradeprofiles/default"),
	// 	Properties: &armhybridcontainerservice.ProvisionedClusterUpgradeProfileProperties{
	// 		ControlPlaneProfile: &armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfile{
	// 			KubernetesVersion: to.Ptr("1.7.7"),
	// 			OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
	// 			Upgrades: []*armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfileProperties{
	// 				{
	// 					IsPreview: to.Ptr(true),
	// 					KubernetesVersion: to.Ptr("1.7.9"),
	// 				},
	// 				{
	// 					KubernetesVersion: to.Ptr("1.7.11"),
	// 			}},
	// 		},
	// 	},
	// }
}
Output:

func (*ProvisionedClusterInstancesClient) NewListPager added in v0.3.0

NewListPager - Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster

Generated from API version 2024-01-01

  • connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource.
  • options - ProvisionedClusterInstancesClientListOptions contains the optional parameters for the ProvisionedClusterInstancesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListProvisionedClusterInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewProvisionedClusterInstancesClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", 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.ProvisionedClusterListResult = armhybridcontainerservice.ProvisionedClusterListResult{
		// 	Value: []*armhybridcontainerservice.ProvisionedCluster{
		// 		{
		// 			Name: to.Ptr("test-hybridakscluster"),
		// 			Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"),
		// 			ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default"),
		// 			ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
		// 				Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		// 			},
		// 			Properties: &armhybridcontainerservice.ProvisionedClusterProperties{
		// 				AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{
		// 					{
		// 						Name: to.Ptr("default-nodepool-1"),
		// 						OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux),
		// 						Count: to.Ptr[int32](1),
		// 						VMSize: to.Ptr("Standard_A4_v2"),
		// 				}},
		// 				CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{
		// 					InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{
		// 						VnetSubnetIDs: []*string{
		// 							to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")},
		// 						},
		// 					},
		// 					ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{
		// 						Count: to.Ptr[int32](1),
		// 						VMSize: to.Ptr("Standard_A4_v2"),
		// 					},
		// 					KubernetesVersion: to.Ptr("v1.20.5"),
		// 					LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{
		// 						AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable),
		// 					},
		// 					LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{
		// 						SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{
		// 							PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{
		// 								{
		// 									KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."),
		// 							}},
		// 						},
		// 					},
		// 					NetworkProfile: &armhybridcontainerservice.NetworkProfile{
		// 						NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico),
		// 						PodCidr: to.Ptr("10.244.0.0/16"),
		// 					},
		// 					ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions added in v0.3.0

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

ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginCreateOrUpdate method.

type ProvisionedClusterInstancesClientBeginDeleteOptions added in v0.3.0

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

ProvisionedClusterInstancesClientBeginDeleteOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginDelete method.

type ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions added in v0.3.0

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

ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListAdminKubeconfig method.

type ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions added in v0.3.0

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

ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListUserKubeconfig method.

type ProvisionedClusterInstancesClientCreateOrUpdateResponse added in v0.3.0

type ProvisionedClusterInstancesClientCreateOrUpdateResponse struct {
	// The provisioned cluster resource definition.
	ProvisionedCluster
}

ProvisionedClusterInstancesClientCreateOrUpdateResponse contains the response from method ProvisionedClusterInstancesClient.BeginCreateOrUpdate.

type ProvisionedClusterInstancesClientDeleteResponse added in v0.3.0

type ProvisionedClusterInstancesClientDeleteResponse struct {
}

ProvisionedClusterInstancesClientDeleteResponse contains the response from method ProvisionedClusterInstancesClient.BeginDelete.

type ProvisionedClusterInstancesClientGetOptions added in v0.3.0

type ProvisionedClusterInstancesClientGetOptions struct {
}

ProvisionedClusterInstancesClientGetOptions contains the optional parameters for the ProvisionedClusterInstancesClient.Get method.

type ProvisionedClusterInstancesClientGetResponse added in v0.3.0

type ProvisionedClusterInstancesClientGetResponse struct {
	// The provisioned cluster resource definition.
	ProvisionedCluster
}

ProvisionedClusterInstancesClientGetResponse contains the response from method ProvisionedClusterInstancesClient.Get.

type ProvisionedClusterInstancesClientGetUpgradeProfileOptions added in v0.3.0

type ProvisionedClusterInstancesClientGetUpgradeProfileOptions struct {
}

ProvisionedClusterInstancesClientGetUpgradeProfileOptions contains the optional parameters for the ProvisionedClusterInstancesClient.GetUpgradeProfile method.

type ProvisionedClusterInstancesClientGetUpgradeProfileResponse added in v0.3.0

type ProvisionedClusterInstancesClientGetUpgradeProfileResponse struct {
	// The list of available kubernetes version upgrades for the provisioned cluster.
	ProvisionedClusterUpgradeProfile
}

ProvisionedClusterInstancesClientGetUpgradeProfileResponse contains the response from method ProvisionedClusterInstancesClient.GetUpgradeProfile.

type ProvisionedClusterInstancesClientListAdminKubeconfigResponse added in v0.3.0

type ProvisionedClusterInstancesClientListAdminKubeconfigResponse struct {
	// The list kubeconfig result response.
	ListCredentialResponse
}

ProvisionedClusterInstancesClientListAdminKubeconfigResponse contains the response from method ProvisionedClusterInstancesClient.BeginListAdminKubeconfig.

type ProvisionedClusterInstancesClientListOptions added in v0.3.0

type ProvisionedClusterInstancesClientListOptions struct {
}

ProvisionedClusterInstancesClientListOptions contains the optional parameters for the ProvisionedClusterInstancesClient.NewListPager method.

type ProvisionedClusterInstancesClientListResponse added in v0.3.0

type ProvisionedClusterInstancesClientListResponse struct {
	// Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster.
	ProvisionedClusterListResult
}

ProvisionedClusterInstancesClientListResponse contains the response from method ProvisionedClusterInstancesClient.NewListPager.

type ProvisionedClusterInstancesClientListUserKubeconfigResponse added in v0.3.0

type ProvisionedClusterInstancesClientListUserKubeconfigResponse struct {
	// The list kubeconfig result response.
	ListCredentialResponse
}

ProvisionedClusterInstancesClientListUserKubeconfigResponse contains the response from method ProvisionedClusterInstancesClient.BeginListUserKubeconfig.

type ProvisionedClusterLicenseProfile added in v0.3.0

type ProvisionedClusterLicenseProfile struct {
	// Indicates whether Azure Hybrid Benefit is opted in. Default value is false
	AzureHybridBenefit *AzureHybridBenefit
}

ProvisionedClusterLicenseProfile - The license profile of the provisioned cluster.

func (ProvisionedClusterLicenseProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterLicenseProfile.

func (*ProvisionedClusterLicenseProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterLicenseProfile.

type ProvisionedClusterListResult added in v1.0.0

type ProvisionedClusterListResult struct {
	NextLink *string
	Value    []*ProvisionedCluster
}

ProvisionedClusterListResult - Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster.

func (ProvisionedClusterListResult) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterListResult.

func (*ProvisionedClusterListResult) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterListResult.

type ProvisionedClusterPoolUpgradeProfile added in v0.2.0

type ProvisionedClusterPoolUpgradeProfile struct {
	// List of available kubernetes versions for upgrade.
	Upgrades []*ProvisionedClusterPoolUpgradeProfileProperties

	// READ-ONLY; The Kubernetes version (major.minor.patch).
	KubernetesVersion *string

	// READ-ONLY; The particular KubernetesVersion Image OS Type (Linux, Windows)
	OSType *OsType
}

ProvisionedClusterPoolUpgradeProfile - The list of available kubernetes versions for upgrade.

func (ProvisionedClusterPoolUpgradeProfile) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPoolUpgradeProfile.

func (*ProvisionedClusterPoolUpgradeProfile) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPoolUpgradeProfile.

type ProvisionedClusterPoolUpgradeProfileProperties added in v0.2.0

type ProvisionedClusterPoolUpgradeProfileProperties struct {
	// READ-ONLY; Whether the Kubernetes version is currently in preview.
	IsPreview *bool

	// READ-ONLY; The Kubernetes version (major.minor.patch).
	KubernetesVersion *string
}

ProvisionedClusterPoolUpgradeProfileProperties - The upgrade properties.

func (ProvisionedClusterPoolUpgradeProfileProperties) MarshalJSON added in v0.2.0

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPoolUpgradeProfileProperties.

func (*ProvisionedClusterPoolUpgradeProfileProperties) UnmarshalJSON added in v0.2.0

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPoolUpgradeProfileProperties.

type ProvisionedClusterProperties added in v0.3.0

type ProvisionedClusterProperties struct {
	// The agent pool properties for the provisioned cluster.
	AgentPoolProfiles []*NamedAgentPoolProfile

	// Parameters to be applied to the cluster-autoscaler when auto scaling is enabled for the provisioned cluster.
	AutoScalerProfile *ProvisionedClusterPropertiesAutoScalerProfile

	// The profile for the underlying cloud infrastructure provider for the provisioned cluster.
	CloudProviderProfile *CloudProviderProfile

	// The SSH restricted access profile for the VMs in the provisioned cluster.
	ClusterVMAccessProfile *ClusterVMAccessProfile

	// The profile for control plane of the provisioned cluster.
	ControlPlane *ControlPlaneProfile

	// The version of Kubernetes in use by the provisioned cluster.
	KubernetesVersion *string

	// The license profile of the provisioned cluster.
	LicenseProfile *ProvisionedClusterLicenseProfile

	// The profile for Linux VMs in the provisioned cluster.
	LinuxProfile *LinuxProfileProperties

	// The network configuration profile for the provisioned cluster.
	NetworkProfile *NetworkProfile

	// The storage configuration profile for the provisioned cluster.
	StorageProfile *StorageProfile

	// READ-ONLY; The status of the latest long running operation for the provisioned cluster.
	ProvisioningState *ResourceProvisioningState

	// READ-ONLY; The observed status of the provisioned cluster.
	Status *ProvisionedClusterPropertiesStatus
}

ProvisionedClusterProperties - Properties of the provisioned cluster.

func (ProvisionedClusterProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterProperties.

func (*ProvisionedClusterProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterProperties.

type ProvisionedClusterPropertiesAutoScalerProfile added in v1.0.0

type ProvisionedClusterPropertiesAutoScalerProfile struct {
	// Valid values are 'true' and 'false'
	BalanceSimilarNodeGroups *string

	// If not specified, the default is 'random'. See expanders [https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders]
	// for more information.
	Expander *Expander

	// The default is 10.
	MaxEmptyBulkDelete *string

	// The default is 600.
	MaxGracefulTerminationSec *string

	// The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
	MaxNodeProvisionTime *string

	// The default is 45. The maximum is 100 and the minimum is 0.
	MaxTotalUnreadyPercentage *string

	// For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all
	// the pods, you can tell CA to ignore unscheduled pods before they're a certain
	// age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours,
	// etc).
	NewPodScaleUpDelay *string

	// This must be an integer. The default is 3.
	OkTotalUnreadyCount *string

	// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
	ScaleDownDelayAfterAdd *string

	// The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m)
	// is supported.
	ScaleDownDelayAfterDelete *string

	// The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
	ScaleDownDelayAfterFailure *string

	// The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
	ScaleDownUnneededTime *string

	// The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
	ScaleDownUnreadyTime *string

	// The default is '0.5'.
	ScaleDownUtilizationThreshold *string

	// The default is '10'. Values must be an integer number of seconds.
	ScanInterval *string

	// The default is true.
	SkipNodesWithLocalStorage *string

	// The default is true.
	SkipNodesWithSystemPods *string
}

ProvisionedClusterPropertiesAutoScalerProfile - Parameters to be applied to the cluster-autoscaler when auto scaling is enabled for the provisioned cluster.

func (ProvisionedClusterPropertiesAutoScalerProfile) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesAutoScalerProfile.

func (*ProvisionedClusterPropertiesAutoScalerProfile) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesAutoScalerProfile.

type ProvisionedClusterPropertiesStatus added in v0.3.0

type ProvisionedClusterPropertiesStatus struct {
	// The detailed status of the provisioned cluster components including addons.
	ControlPlaneStatus []*AddonStatusProfile

	// Error messages during a provisioned cluster operation or steady state.
	ErrorMessage *string

	// READ-ONLY; The current state of the provisioned cluster.
	CurrentState *ResourceProvisioningState
}

ProvisionedClusterPropertiesStatus - The observed status of the provisioned cluster.

func (ProvisionedClusterPropertiesStatus) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesStatus.

func (*ProvisionedClusterPropertiesStatus) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesStatus.

type ProvisionedClusterUpgradeProfile added in v0.2.0

type ProvisionedClusterUpgradeProfile struct {
	// REQUIRED; The properties of the upgrade profile.
	Properties *ProvisionedClusterUpgradeProfileProperties

	// 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
}

ProvisionedClusterUpgradeProfile - The list of available kubernetes version upgrades for the provisioned cluster.

func (ProvisionedClusterUpgradeProfile) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterUpgradeProfile.

func (*ProvisionedClusterUpgradeProfile) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterUpgradeProfile.

type ProvisionedClusterUpgradeProfileProperties added in v0.2.0

type ProvisionedClusterUpgradeProfileProperties struct {
	// REQUIRED; The list of available kubernetes version upgrades for the control plane.
	ControlPlaneProfile *ProvisionedClusterPoolUpgradeProfile

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

ProvisionedClusterUpgradeProfileProperties - Control plane and agent pool upgrade profiles.

func (ProvisionedClusterUpgradeProfileProperties) MarshalJSON added in v0.2.0

MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterUpgradeProfileProperties.

func (*ProvisionedClusterUpgradeProfileProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterUpgradeProfileProperties.

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStatePending   ProvisioningState = "Pending"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceProvisioningState added in v0.3.0

type ResourceProvisioningState string

ResourceProvisioningState - Provisioning state of the resource

const (
	ResourceProvisioningStateAccepted  ResourceProvisioningState = "Accepted"
	ResourceProvisioningStateCanceled  ResourceProvisioningState = "Canceled"
	ResourceProvisioningStateCreating  ResourceProvisioningState = "Creating"
	ResourceProvisioningStateDeleting  ResourceProvisioningState = "Deleting"
	ResourceProvisioningStateFailed    ResourceProvisioningState = "Failed"
	ResourceProvisioningStatePending   ResourceProvisioningState = "Pending"
	ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded"
	ResourceProvisioningStateUpdating  ResourceProvisioningState = "Updating"
	ResourceProvisioningStateUpgrading ResourceProvisioningState = "Upgrading"
)

func PossibleResourceProvisioningStateValues added in v0.3.0

func PossibleResourceProvisioningStateValues() []ResourceProvisioningState

PossibleResourceProvisioningStateValues returns the possible values for the ResourceProvisioningState const type.

type StorageProfile added in v1.0.0

type StorageProfile struct {
	// NFS CSI Driver settings for the storage profile.
	NfsCsiDriver *StorageProfileNfsCSIDriver

	// SMB CSI Driver settings for the storage profile.
	SmbCsiDriver *StorageProfileSmbCSIDriver
}

StorageProfile - The storage configuration profile for the provisioned cluster.

func (StorageProfile) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type StorageProfile.

func (*StorageProfile) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.

type StorageProfileNfsCSIDriver added in v1.0.0

type StorageProfileNfsCSIDriver struct {
	// Indicates whether to enable NFS CSI Driver. The default value is true.
	Enabled *bool
}

StorageProfileNfsCSIDriver - NFS CSI Driver settings for the storage profile.

func (StorageProfileNfsCSIDriver) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type StorageProfileNfsCSIDriver.

func (*StorageProfileNfsCSIDriver) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileNfsCSIDriver.

type StorageProfileSmbCSIDriver added in v1.0.0

type StorageProfileSmbCSIDriver struct {
	// Indicates whether to enable SMB CSI Driver. The default value is true.
	Enabled *bool
}

StorageProfileSmbCSIDriver - SMB CSI Driver settings for the storage profile.

func (StorageProfileSmbCSIDriver) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type StorageProfileSmbCSIDriver.

func (*StorageProfileSmbCSIDriver) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileSmbCSIDriver.

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

type VMSKUCapabilities struct {
	// READ-ONLY; Name of the VM SKU capability
	Name *string

	// READ-ONLY; Value of the VM SKU capability
	Value *string
}

VMSKUCapabilities - Describes the VM SKU capabilities like MemoryGB, vCPUs, etc.

func (VMSKUCapabilities) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VMSKUCapabilities.

func (*VMSKUCapabilities) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMSKUCapabilities.

type VMSKUProfile added in v0.3.0

type VMSKUProfile struct {
	// Extended location pointing to the underlying infrastructure
	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
	Properties *VMSKUProfileProperties

	// 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
}

VMSKUProfile - The list of supported VM SKUs.

func (VMSKUProfile) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VMSKUProfile.

func (*VMSKUProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMSKUProfile.

type VMSKUProfileList added in v0.3.0

type VMSKUProfileList struct {
	NextLink *string
	Value    []*VMSKUProfile
}

VMSKUProfileList - The list of supported VM SKUs.

func (VMSKUProfileList) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VMSKUProfileList.

func (*VMSKUProfileList) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMSKUProfileList.

type VMSKUProfileProperties added in v0.3.0

type VMSKUProfileProperties struct {
	// List of supported VM SKUs.
	Values []*VMSKUProperties

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

func (VMSKUProfileProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VMSKUProfileProperties.

func (*VMSKUProfileProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMSKUProfileProperties.

type VMSKUProperties added in v0.3.0

type VMSKUProperties struct {
	// READ-ONLY; The list of name-value pairs to describe VM SKU capabilities like MemoryGB, vCPUs, etc.
	Capabilities []*VMSKUCapabilities

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

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string

	// READ-ONLY; The size of the VM SKU
	Size *string

	// READ-ONLY; The tier of the VM SKU
	Tier *string
}

VMSKUProperties - The profile for supported VM SKUs

func (VMSKUProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VMSKUProperties.

func (*VMSKUProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMSKUProperties.

type VMSKUsClient added in v0.3.0

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

VMSKUsClient contains the methods for the VMSKUs group. Don't use this type directly, use NewVMSKUsClient() instead.

func NewVMSKUsClient added in v0.3.0

func NewVMSKUsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VMSKUsClient, error)

NewVMSKUsClient creates a new instance of VMSKUsClient with the specified values.

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

func (*VMSKUsClient) NewListPager added in v0.3.0

func (client *VMSKUsClient) NewListPager(customLocationResourceURI string, options *VMSKUsClientListOptions) *runtime.Pager[VMSKUsClientListResponse]

NewListPager - Lists the supported VM skus for the specified custom location

Generated from API version 2024-01-01

  • customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource.
  • options - VMSKUsClientListOptions contains the optional parameters for the VMSKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVmSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVMSKUsClient().NewListPager("subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", 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.VMSKUProfileList = armhybridcontainerservice.VMSKUProfileList{
		// 	Value: []*armhybridcontainerservice.VMSKUProfile{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("microsoft.hybridcontainerservice/skus"),
		// 			ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation/providers/Microsoft.HybridContainerService/skus/default"),
		// 			ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
		// 				Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		// 			},
		// 			Properties: &armhybridcontainerservice.VMSKUProfileProperties{
		// 				ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded),
		// 				Values: []*armhybridcontainerservice.VMSKUProperties{
		// 					{
		// 						Name: to.Ptr("Standard_A0"),
		// 						Capabilities: []*armhybridcontainerservice.VMSKUCapabilities{
		// 							{
		// 								Name: to.Ptr("vCpu"),
		// 								Value: to.Ptr("2"),
		// 							},
		// 							{
		// 								Name: to.Ptr("MemoryMb"),
		// 								Value: to.Ptr("2345"),
		// 							},
		// 							{
		// 								Name: to.Ptr("DiskSizeGb"),
		// 								Value: to.Ptr("128"),
		// 							},
		// 							{
		// 								Name: to.Ptr("GpuCount"),
		// 								Value: to.Ptr("1"),
		// 							},
		// 							{
		// 								Name: to.Ptr("GpuNameType"),
		// 								Value: to.Ptr("NVIDIA Tesla T4"),
		// 							},
		// 							{
		// 								Name: to.Ptr("GpuAssignMode"),
		// 								Value: to.Ptr("1"),
		// 							},
		// 							{
		// 								Name: to.Ptr("Provider"),
		// 								Value: to.Ptr("HCI"),
		// 						}},
		// 						ResourceType: to.Ptr("VirtualMachines"),
		// 						Size: to.Ptr("A0"),
		// 						Tier: to.Ptr("Standard"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type VMSKUsClientListOptions added in v0.3.0

type VMSKUsClientListOptions struct {
}

VMSKUsClientListOptions contains the optional parameters for the VMSKUsClient.NewListPager method.

type VMSKUsClientListResponse added in v0.3.0

type VMSKUsClientListResponse struct {
	// The list of supported VM SKUs.
	VMSKUProfileList
}

VMSKUsClientListResponse contains the response from method VMSKUsClient.NewListPager.

type VirtualNetwork added in v0.3.0

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

	// Extended location pointing to the underlying infrastructure
	ExtendedLocation *VirtualNetworkExtendedLocation

	// Properties of the virtual network resource
	Properties *VirtualNetworkProperties

	// Resource tags.
	Tags map[string]*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
}

VirtualNetwork - The Virtual Network resource definition.

func (VirtualNetwork) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetwork.

func (*VirtualNetwork) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork.

type VirtualNetworkExtendedLocation added in v0.3.0

type VirtualNetworkExtendedLocation struct {
	// ARM Id of the extended location.
	Name *string

	// The extended location type. Allowed value: 'CustomLocation'
	Type *ExtendedLocationTypes
}

VirtualNetworkExtendedLocation - Extended location pointing to the underlying infrastructure

func (VirtualNetworkExtendedLocation) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkExtendedLocation.

func (*VirtualNetworkExtendedLocation) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkExtendedLocation.

type VirtualNetworkProperties added in v0.3.0

type VirtualNetworkProperties struct {
	// List of DNS server IP Addresses associated with the network
	DNSServers []*string

	// IP Address of the Gateway associated with the network
	Gateway *string

	// IP Address Prefix of the network
	IPAddressPrefix  *string
	InfraVnetProfile *VirtualNetworkPropertiesInfraVnetProfile

	// Range of IP Addresses for Kubernetes API Server and services if using HA Proxy load balancer
	VipPool []*VirtualNetworkPropertiesVipPoolItem

	// VLAN Id used by the network
	VlanID *int32

	// Range of IP Addresses for Kubernetes node VMs
	VmipPool []*VirtualNetworkPropertiesVmipPoolItem

	// READ-ONLY
	ProvisioningState *ProvisioningState

	// READ-ONLY; Status of the virtual network resource
	Status *VirtualNetworkPropertiesStatus
}

VirtualNetworkProperties - Properties of the virtual network resource

func (VirtualNetworkProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProperties.

func (*VirtualNetworkProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProperties.

type VirtualNetworkPropertiesInfraVnetProfile added in v0.3.0

type VirtualNetworkPropertiesInfraVnetProfile struct {
	// Infrastructure network profile for HCI platform
	Hci *VirtualNetworkPropertiesInfraVnetProfileHci
}

func (VirtualNetworkPropertiesInfraVnetProfile) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesInfraVnetProfile.

func (*VirtualNetworkPropertiesInfraVnetProfile) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesInfraVnetProfile.

type VirtualNetworkPropertiesInfraVnetProfileHci added in v0.3.0

type VirtualNetworkPropertiesInfraVnetProfileHci struct {
	// Group in MOC(Microsoft On-premises Cloud)
	MocGroup *string

	// Location in MOC(Microsoft On-premises Cloud)
	MocLocation *string

	// Virtual Network name in MOC(Microsoft On-premises Cloud)
	MocVnetName *string
}

VirtualNetworkPropertiesInfraVnetProfileHci - Infrastructure network profile for HCI platform

func (VirtualNetworkPropertiesInfraVnetProfileHci) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesInfraVnetProfileHci.

func (*VirtualNetworkPropertiesInfraVnetProfileHci) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesInfraVnetProfileHci.

type VirtualNetworkPropertiesStatus added in v0.3.0

type VirtualNetworkPropertiesStatus struct {
	// The detailed status of the long running operation.
	OperationStatus *VirtualNetworkPropertiesStatusOperationStatus
}

VirtualNetworkPropertiesStatus - Status of the virtual network resource

func (VirtualNetworkPropertiesStatus) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesStatus.

func (*VirtualNetworkPropertiesStatus) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesStatus.

type VirtualNetworkPropertiesStatusOperationStatus added in v0.3.0

type VirtualNetworkPropertiesStatusOperationStatus struct {
	// The error if any from the operation.
	Error *VirtualNetworkPropertiesStatusOperationStatusError

	// The identifier of the operation.
	OperationID *string

	// The status of the operation.
	Status *string
}

VirtualNetworkPropertiesStatusOperationStatus - The detailed status of the long running operation.

func (VirtualNetworkPropertiesStatusOperationStatus) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesStatusOperationStatus.

func (*VirtualNetworkPropertiesStatusOperationStatus) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesStatusOperationStatus.

type VirtualNetworkPropertiesStatusOperationStatusError added in v0.3.0

type VirtualNetworkPropertiesStatusOperationStatusError struct {
	// The error code from the operation.
	Code *string

	// The error message from the operation.
	Message *string
}

VirtualNetworkPropertiesStatusOperationStatusError - The error if any from the operation.

func (VirtualNetworkPropertiesStatusOperationStatusError) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesStatusOperationStatusError.

func (*VirtualNetworkPropertiesStatusOperationStatusError) UnmarshalJSON added in v0.3.0

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesStatusOperationStatusError.

type VirtualNetworkPropertiesVipPoolItem added in v0.3.0

type VirtualNetworkPropertiesVipPoolItem struct {
	// Ending IP address for the IP Pool
	EndIP *string

	// Starting IP address for the IP Pool
	StartIP *string
}

func (VirtualNetworkPropertiesVipPoolItem) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesVipPoolItem.

func (*VirtualNetworkPropertiesVipPoolItem) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesVipPoolItem.

type VirtualNetworkPropertiesVmipPoolItem added in v0.3.0

type VirtualNetworkPropertiesVmipPoolItem struct {
	// Ending IP address for the IP Pool
	EndIP *string

	// Starting IP address for the IP Pool
	StartIP *string
}

func (VirtualNetworkPropertiesVmipPoolItem) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesVmipPoolItem.

func (*VirtualNetworkPropertiesVmipPoolItem) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesVmipPoolItem.

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 ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VirtualNetworksClient) BeginCreateOrUpdate

func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates the virtual network resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - Parameter for the name of the virtual network
  • virtualNetworks - Virtual Network resource definition
  • options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutVirtualNetwork.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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworksClient().BeginCreateOrUpdate(ctx, "test-arcappliance-resgrp", "test-vnet-static", armhybridcontainerservice.VirtualNetwork{
		Location: to.Ptr("westus"),
		ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
			Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
			Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armhybridcontainerservice.VirtualNetworkProperties{
			DNSServers: []*string{
				to.Ptr("192.168.0.1")},
			Gateway: to.Ptr("192.168.0.1"),
			InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
				Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
					MocGroup:    to.Ptr("target-group"),
					MocLocation: to.Ptr("MocLocation"),
					MocVnetName: to.Ptr("vnet1"),
				},
			},
			IPAddressPrefix: to.Ptr("192.168.0.0/16"),
			VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
				{
					EndIP:   to.Ptr("192.168.0.50"),
					StartIP: to.Ptr("192.168.0.10"),
				}},
			VlanID: to.Ptr[int32](10),
			VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
				{
					EndIP:   to.Ptr("192.168.0.130"),
					StartIP: to.Ptr("192.168.0.110"),
				}},
		},
	}, 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 = armhybridcontainerservice.VirtualNetwork{
	// 	Name: to.Ptr("test-vnet-static"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/virtualnetworks"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static"),
	// 	Location: to.Ptr("westus"),
	// 	ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.VirtualNetworkProperties{
	// 		DNSServers: []*string{
	// 			to.Ptr("192.168.0.1")},
	// 			Gateway: to.Ptr("192.168.0.1"),
	// 			InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
	// 				Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
	// 					MocGroup: to.Ptr("target-group"),
	// 					MocLocation: to.Ptr("MocLocation"),
	// 					MocVnetName: to.Ptr("vnet1"),
	// 				},
	// 			},
	// 			IPAddressPrefix: to.Ptr("192.168.0.0/16"),
	// 			ProvisioningState: to.Ptr(armhybridcontainerservice.ProvisioningStateSucceeded),
	// 			VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.50"),
	// 					StartIP: to.Ptr("192.168.0.10"),
	// 			}},
	// 			VlanID: to.Ptr[int32](10),
	// 			VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.130"),
	// 					StartIP: to.Ptr("192.168.0.110"),
	// 			}},
	// 		},
	// 	}
}
Output:

func (*VirtualNetworksClient) BeginDelete added in v0.3.0

func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)

BeginDelete - Deletes the specified virtual network resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - Parameter for the name of the virtual network
  • 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/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworksClient().BeginDelete(ctx, "test-arcappliance-resgrp", "test-vnet-static", 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) BeginUpdate

func (client *VirtualNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetworksPatch, options *VirtualNetworksClientBeginUpdateOptions) (*runtime.Poller[VirtualNetworksClientUpdateResponse], error)

BeginUpdate - Patches the virtual network resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - Parameter for the name of the virtual network
  • virtualNetworks - Virtual Network resource patch definition
  • options - VirtualNetworksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworksClient().BeginUpdate(ctx, "test-arcappliance-resgrp", "test-vnet-static", armhybridcontainerservice.VirtualNetworksPatch{
		Tags: map[string]*string{
			"additionalProperties": to.Ptr("sample"),
		},
	}, 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 = armhybridcontainerservice.VirtualNetwork{
	// 	Name: to.Ptr("test-vnet-static"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/virtualnetworks"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"additionalProperties": to.Ptr("sample"),
	// 	},
	// 	ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.VirtualNetworkProperties{
	// 		DNSServers: []*string{
	// 			to.Ptr("192.168.0.1")},
	// 			Gateway: to.Ptr("192.168.0.1"),
	// 			InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
	// 				Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
	// 					MocGroup: to.Ptr("target-group"),
	// 					MocLocation: to.Ptr("MocLocation"),
	// 					MocVnetName: to.Ptr("vnet1"),
	// 				},
	// 			},
	// 			IPAddressPrefix: to.Ptr("192.168.0.0/16"),
	// 			ProvisioningState: to.Ptr(armhybridcontainerservice.ProvisioningStateSucceeded),
	// 			VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.50"),
	// 					StartIP: to.Ptr("192.168.0.10"),
	// 			}},
	// 			VlanID: to.Ptr[int32](10),
	// 			VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.130"),
	// 					StartIP: to.Ptr("192.168.0.110"),
	// 			}},
	// 		},
	// 	}
}
Output:

func (*VirtualNetworksClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Lists the virtual networks in the specified resource group

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • 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/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVirtualNetworkByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualNetworksClient().NewListByResourceGroupPager("test-arcappliance-resgrp", 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.VirtualNetworksListResult = armhybridcontainerservice.VirtualNetworksListResult{
		// 	Value: []*armhybridcontainerservice.VirtualNetwork{
		// 		{
		// 			Name: to.Ptr("test-vnet-static"),
		// 			Type: to.Ptr("microsoft.hybridcontainerservice/virtualnetworks"),
		// 			ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static"),
		// 			Location: to.Ptr("westus"),
		// 			ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
		// 				Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		// 			},
		// 			Properties: &armhybridcontainerservice.VirtualNetworkProperties{
		// 				DNSServers: []*string{
		// 					to.Ptr("192.168.0.1")},
		// 					Gateway: to.Ptr("192.168.0.1"),
		// 					InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
		// 						Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
		// 							MocGroup: to.Ptr("target-group"),
		// 							MocLocation: to.Ptr("MocLocation"),
		// 							MocVnetName: to.Ptr("vnet1"),
		// 						},
		// 					},
		// 					IPAddressPrefix: to.Ptr("192.168.0.0/16"),
		// 					ProvisioningState: to.Ptr(armhybridcontainerservice.ProvisioningStateSucceeded),
		// 					VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
		// 						{
		// 							EndIP: to.Ptr("192.168.0.50"),
		// 							StartIP: to.Ptr("192.168.0.10"),
		// 					}},
		// 					VlanID: to.Ptr[int32](10),
		// 					VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
		// 						{
		// 							EndIP: to.Ptr("192.168.0.130"),
		// 							StartIP: to.Ptr("192.168.0.110"),
		// 					}},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*VirtualNetworksClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists the virtual networks in the specified subscription

Generated from API version 2024-01-01

  • options - VirtualNetworksClientListBySubscriptionOptions contains the optional parameters for the VirtualNetworksClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVirtualNetworkBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualNetworksClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VirtualNetworksListResult = armhybridcontainerservice.VirtualNetworksListResult{
		// 	Value: []*armhybridcontainerservice.VirtualNetwork{
		// 		{
		// 			Name: to.Ptr("test-vnet-static"),
		// 			Type: to.Ptr("microsoft.hybridcontainerservice/virtualnetworks"),
		// 			ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static"),
		// 			Location: to.Ptr("westus"),
		// 			ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
		// 				Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
		// 				Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
		// 			},
		// 			Properties: &armhybridcontainerservice.VirtualNetworkProperties{
		// 				DNSServers: []*string{
		// 					to.Ptr("192.168.0.1")},
		// 					Gateway: to.Ptr("192.168.0.1"),
		// 					InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
		// 						Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
		// 							MocGroup: to.Ptr("target-group"),
		// 							MocLocation: to.Ptr("MocLocation"),
		// 							MocVnetName: to.Ptr("vnet1"),
		// 						},
		// 					},
		// 					IPAddressPrefix: to.Ptr("192.168.0.0/16"),
		// 					ProvisioningState: to.Ptr(armhybridcontainerservice.ProvisioningStateSucceeded),
		// 					VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
		// 						{
		// 							EndIP: to.Ptr("192.168.0.50"),
		// 							StartIP: to.Ptr("192.168.0.10"),
		// 					}},
		// 					VlanID: to.Ptr[int32](10),
		// 					VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
		// 						{
		// 							EndIP: to.Ptr("192.168.0.130"),
		// 							StartIP: to.Ptr("192.168.0.110"),
		// 					}},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*VirtualNetworksClient) Retrieve

func (client *VirtualNetworksClient) Retrieve(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientRetrieveOptions) (VirtualNetworksClientRetrieveResponse, error)

Retrieve - Gets the specified virtual network resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - Parameter for the name of the virtual network
  • options - VirtualNetworksClientRetrieveOptions contains the optional parameters for the VirtualNetworksClient.Retrieve method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-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/hybridcontainerservice/armhybridcontainerservice"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualNetworksClient().Retrieve(ctx, "test-arcappliance-resgrp", "test-vnet-static", 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 = armhybridcontainerservice.VirtualNetwork{
	// 	Name: to.Ptr("test-vnet-static"),
	// 	Type: to.Ptr("microsoft.hybridcontainerservice/virtualnetworks"),
	// 	ID: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.HybridContainerService/virtualNetworks/test-vnet-static"),
	// 	Location: to.Ptr("westus"),
	// 	ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{
	// 		Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"),
	// 		Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation),
	// 	},
	// 	Properties: &armhybridcontainerservice.VirtualNetworkProperties{
	// 		DNSServers: []*string{
	// 			to.Ptr("192.168.0.1")},
	// 			Gateway: to.Ptr("192.168.0.1"),
	// 			InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{
	// 				Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{
	// 					MocGroup: to.Ptr("target-group"),
	// 					MocLocation: to.Ptr("MocLocation"),
	// 					MocVnetName: to.Ptr("vnet1"),
	// 				},
	// 			},
	// 			IPAddressPrefix: to.Ptr("192.168.0.0/16"),
	// 			ProvisioningState: to.Ptr(armhybridcontainerservice.ProvisioningStateSucceeded),
	// 			VipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.50"),
	// 					StartIP: to.Ptr("192.168.0.10"),
	// 			}},
	// 			VlanID: to.Ptr[int32](10),
	// 			VmipPool: []*armhybridcontainerservice.VirtualNetworkPropertiesVmipPoolItem{
	// 				{
	// 					EndIP: to.Ptr("192.168.0.130"),
	// 					StartIP: to.Ptr("192.168.0.110"),
	// 			}},
	// 		},
	// 	}
}
Output:

type VirtualNetworksClientBeginCreateOrUpdateOptions

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

VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate method.

type VirtualNetworksClientBeginDeleteOptions added in v0.3.0

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

VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.

type VirtualNetworksClientBeginUpdateOptions

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

VirtualNetworksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginUpdate method.

type VirtualNetworksClientCreateOrUpdateResponse

type VirtualNetworksClientCreateOrUpdateResponse struct {
	// The Virtual Network resource definition.
	VirtualNetwork
}

VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate.

type VirtualNetworksClientDeleteResponse

type VirtualNetworksClientDeleteResponse struct {
}

VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.BeginDelete.

type VirtualNetworksClientListByResourceGroupOptions

type VirtualNetworksClientListByResourceGroupOptions struct {
}

VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.NewListByResourceGroupPager method.

type VirtualNetworksClientListByResourceGroupResponse

type VirtualNetworksClientListByResourceGroupResponse struct {
	// A list of virtual network resources.
	VirtualNetworksListResult
}

VirtualNetworksClientListByResourceGroupResponse contains the response from method VirtualNetworksClient.NewListByResourceGroupPager.

type VirtualNetworksClientListBySubscriptionOptions

type VirtualNetworksClientListBySubscriptionOptions struct {
}

VirtualNetworksClientListBySubscriptionOptions contains the optional parameters for the VirtualNetworksClient.NewListBySubscriptionPager method.

type VirtualNetworksClientListBySubscriptionResponse

type VirtualNetworksClientListBySubscriptionResponse struct {
	// A list of virtual network resources.
	VirtualNetworksListResult
}

VirtualNetworksClientListBySubscriptionResponse contains the response from method VirtualNetworksClient.NewListBySubscriptionPager.

type VirtualNetworksClientRetrieveOptions

type VirtualNetworksClientRetrieveOptions struct {
}

VirtualNetworksClientRetrieveOptions contains the optional parameters for the VirtualNetworksClient.Retrieve method.

type VirtualNetworksClientRetrieveResponse

type VirtualNetworksClientRetrieveResponse struct {
	// The Virtual Network resource definition.
	VirtualNetwork
}

VirtualNetworksClientRetrieveResponse contains the response from method VirtualNetworksClient.Retrieve.

type VirtualNetworksClientUpdateResponse

type VirtualNetworksClientUpdateResponse struct {
	// The Virtual Network resource definition.
	VirtualNetwork
}

VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.BeginUpdate.

type VirtualNetworksListResult

type VirtualNetworksListResult struct {
	NextLink *string
	Value    []*VirtualNetwork
}

VirtualNetworksListResult - A list of virtual network resources.

func (VirtualNetworksListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworksListResult.

func (*VirtualNetworksListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworksListResult.

type VirtualNetworksPatch

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

VirtualNetworksPatch - The Virtual Network resource patch definition.

func (VirtualNetworksPatch) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworksPatch.

func (*VirtualNetworksPatch) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworksPatch.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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