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/containerservice/2023-10-01/trustedaccess Documentation

The trustedaccess SDK allows for interaction with the Azure Resource Manager Service containerservice (API Version 2023-10-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/containerservice/2023-10-01/trustedaccess"

Client Initialization

client := trustedaccess.NewTrustedAccessClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TrustedAccessClient.RoleBindingsCreateOrUpdate

ctx := context.TODO()
id := trustedaccess.NewTrustedAccessRoleBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "trustedAccessRoleBindingValue")

payload := trustedaccess.TrustedAccessRoleBinding{
	// ...
}


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

Example Usage: TrustedAccessClient.RoleBindingsDelete

ctx := context.TODO()
id := trustedaccess.NewTrustedAccessRoleBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "trustedAccessRoleBindingValue")

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

Example Usage: TrustedAccessClient.RoleBindingsGet

ctx := context.TODO()
id := trustedaccess.NewTrustedAccessRoleBindingID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "trustedAccessRoleBindingValue")

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

Example Usage: TrustedAccessClient.RoleBindingsList

ctx := context.TODO()
id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue")

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

Example Usage: TrustedAccessClient.RolesList

ctx := context.TODO()
id := trustedaccess.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

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