package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

# README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances Documentation

The provisionedclusterinstances SDK allows for interaction with the Azure Resource Manager Service hybridazurekubernetesservice (API Version 2024-01-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances"

Client Initialization

client := provisionedclusterinstances.NewProvisionedClusterInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProvisionedClusterInstancesClient.AgentPoolCreateOrUpdate

ctx := context.TODO()
id := provisionedclusterinstances.NewScopedAgentPoolID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "agentPoolValue")

payload := provisionedclusterinstances.AgentPool{
	// ...
}


if err := client.AgentPoolCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.AgentPoolDelete

ctx := context.TODO()
id := provisionedclusterinstances.NewScopedAgentPoolID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "agentPoolValue")

if err := client.AgentPoolDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.AgentPoolGet

ctx := context.TODO()
id := provisionedclusterinstances.NewScopedAgentPoolID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "agentPoolValue")

read, err := client.AgentPoolGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.AgentPoolListByProvisionedCluster

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.AgentPoolListByProvisionedCluster(ctx, id)` can be used to do batched pagination
items, err := client.AgentPoolListByProvisionedClusterComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ProvisionedClusterInstancesClient.DeleteKubernetesVersions

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.DeleteKubernetesVersionsThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.DeleteVMSkus

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.DeleteVMSkusThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.GetKubernetesVersions

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.GetKubernetesVersions(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.GetUpgradeProfile

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.GetUpgradeProfile(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.GetVMSkus

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.GetVMSkus(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.HybridIdentityMetadataDelete

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.HybridIdentityMetadataDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.HybridIdentityMetadataGet

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.HybridIdentityMetadataGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.HybridIdentityMetadataListByCluster

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.HybridIdentityMetadataListByCluster(ctx, id)` can be used to do batched pagination
items, err := client.HybridIdentityMetadataListByClusterComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ProvisionedClusterInstancesClient.HybridIdentityMetadataPut

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := provisionedclusterinstances.HybridIdentityMetadata{
	// ...
}


read, err := client.HybridIdentityMetadataPut(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.KubernetesVersionsList

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.KubernetesVersionsList(ctx, id)` can be used to do batched pagination
items, err := client.KubernetesVersionsListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ProvisionedClusterInstancesClient.ListAdminKubeconfig

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.ListAdminKubeconfigThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.ListUserKubeconfig

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.ListUserKubeconfigThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.ProvisionedClusterInstancesCreateOrUpdate

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := provisionedclusterinstances.ProvisionedCluster{
	// ...
}


if err := client.ProvisionedClusterInstancesCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.ProvisionedClusterInstancesDelete

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

if err := client.ProvisionedClusterInstancesDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.ProvisionedClusterInstancesGet

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.ProvisionedClusterInstancesGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvisionedClusterInstancesClient.ProvisionedClusterInstancesList

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.ProvisionedClusterInstancesList(ctx, id)` can be used to do batched pagination
items, err := client.ProvisionedClusterInstancesListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ProvisionedClusterInstancesClient.PutKubernetesVersions

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := provisionedclusterinstances.KubernetesVersionProfile{
	// ...
}


if err := client.PutKubernetesVersionsThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.PutVMSkus

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := provisionedclusterinstances.VMSkuProfile{
	// ...
}


if err := client.PutVMSkusThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ProvisionedClusterInstancesClient.VMSkusList

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.VMSkusList(ctx, id)` can be used to do batched pagination
items, err := client.VMSkusListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}