managedclusters

package
v0.20240315.1103122 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/managedclusters Documentation

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

Client Initialization

client := managedclusters.NewManagedClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedClustersClient.CreateOrUpdate

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

payload := managedclusters.ManagedCluster{
	// ...
}


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

Example Usage: ManagedClustersClient.Delete

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

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

Example Usage: ManagedClustersClient.Get

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

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

Example Usage: ManagedClustersClient.GetAccessProfile

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

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

Example Usage: ManagedClustersClient.GetUpgradeProfile

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

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: ManagedClustersClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: ManagedClustersClient.ListByResourceGroup

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

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

Example Usage: ManagedClustersClient.ListClusterAdminCredentials

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

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

Example Usage: ManagedClustersClient.ListClusterUserCredentials

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

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

Example Usage: ManagedClustersClient.ResetAADProfile

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

payload := managedclusters.ManagedClusterAADProfile{
	// ...
}


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

Example Usage: ManagedClustersClient.ResetServicePrincipalProfile

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

payload := managedclusters.ManagedClusterServicePrincipalProfile{
	// ...
}


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

Example Usage: ManagedClustersClient.RotateClusterCertificates

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

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

Example Usage: ManagedClustersClient.UpdateTags

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

payload := managedclusters.TagsObject{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForContainerServiceOSTypes

func PossibleValuesForContainerServiceOSTypes() []string

func ValidateAccessProfileID

func ValidateAccessProfileID(input interface{}, key string) (warnings []string, errors []error)

ValidateAccessProfileID checks that 'input' can be parsed as a Access Profile ID

Types

type AccessProfileId

type AccessProfileId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ManagedClusterName string
	AccessProfileName  string
}

AccessProfileId is a struct representing the Resource ID for a Access Profile

func NewAccessProfileID

func NewAccessProfileID(subscriptionId string, resourceGroupName string, managedClusterName string, accessProfileName string) AccessProfileId

NewAccessProfileID returns a new AccessProfileId struct

func ParseAccessProfileID

func ParseAccessProfileID(input string) (*AccessProfileId, error)

ParseAccessProfileID parses 'input' into a AccessProfileId

func ParseAccessProfileIDInsensitively

func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error)

ParseAccessProfileIDInsensitively parses 'input' case-insensitively into a AccessProfileId note: this method should only be used for API response data and not user input

func (*AccessProfileId) FromParseResult

func (id *AccessProfileId) FromParseResult(input resourceids.ParseResult) error

func (AccessProfileId) ID

func (id AccessProfileId) ID() string

ID returns the formatted Access Profile ID

func (AccessProfileId) Segments

func (id AccessProfileId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Access Profile ID

func (AccessProfileId) String

func (id AccessProfileId) String() string

String returns a human-readable description of this Access Profile ID

type ContainerServiceOSTypes

type ContainerServiceOSTypes string
const (
	ContainerServiceOSTypesLinux   ContainerServiceOSTypes = "Linux"
	ContainerServiceOSTypesWindows ContainerServiceOSTypes = "Windows"
)

func (*ContainerServiceOSTypes) UnmarshalJSON added in v0.20240213.1120950

func (s *ContainerServiceOSTypes) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedCluster
}

type CredentialResult

type CredentialResult struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

type CredentialResults

type CredentialResults struct {
	Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetAccessProfileOperationResponse

type GetAccessProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedClusterAccessProfile
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedCluster
}

type GetUpgradeProfileOperationResponse

type GetUpgradeProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedClusterUpgradeProfile
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagedCluster
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedCluster
}

type ListClusterAdminCredentialsOperationResponse

type ListClusterAdminCredentialsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CredentialResults
}

type ListClusterUserCredentialsOperationResponse

type ListClusterUserCredentialsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CredentialResults
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagedCluster
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedCluster
}

type ManagedCluster

type ManagedCluster struct {
	Id       *string            `json:"id,omitempty"`
	Location string             `json:"location"`
	Name     *string            `json:"name,omitempty"`
	Tags     *map[string]string `json:"tags,omitempty"`
	Type     *string            `json:"type,omitempty"`
}

type ManagedClusterAADProfile

type ManagedClusterAADProfile struct {
	ClientAppID     string  `json:"clientAppID"`
	ServerAppID     string  `json:"serverAppID"`
	ServerAppSecret *string `json:"serverAppSecret,omitempty"`
	TenantID        *string `json:"tenantID,omitempty"`
}

type ManagedClusterAccessProfile

type ManagedClusterAccessProfile struct {
	Id       *string            `json:"id,omitempty"`
	Location string             `json:"location"`
	Name     *string            `json:"name,omitempty"`
	Tags     *map[string]string `json:"tags,omitempty"`
	Type     *string            `json:"type,omitempty"`
}

type ManagedClusterOperationPredicate

type ManagedClusterOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ManagedClusterOperationPredicate) Matches

type ManagedClusterPoolUpgradeProfile

type ManagedClusterPoolUpgradeProfile struct {
	KubernetesVersion string                                             `json:"kubernetesVersion"`
	Name              *string                                            `json:"name,omitempty"`
	OsType            ContainerServiceOSTypes                            `json:"osType"`
	Upgrades          *[]ManagedClusterPoolUpgradeProfileUpgradesInlined `json:"upgrades,omitempty"`
}

type ManagedClusterPoolUpgradeProfileUpgradesInlined

type ManagedClusterPoolUpgradeProfileUpgradesInlined struct {
	IsPreview         *bool   `json:"isPreview,omitempty"`
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
}

type ManagedClusterServicePrincipalProfile

type ManagedClusterServicePrincipalProfile struct {
	ClientId string  `json:"clientId"`
	Secret   *string `json:"secret,omitempty"`
}

type ManagedClusterUpgradeProfile

type ManagedClusterUpgradeProfile struct {
	Id         *string                                `json:"id,omitempty"`
	Name       *string                                `json:"name,omitempty"`
	Properties ManagedClusterUpgradeProfileProperties `json:"properties"`
	Type       *string                                `json:"type,omitempty"`
}

type ManagedClusterUpgradeProfileProperties

type ManagedClusterUpgradeProfileProperties struct {
	AgentPoolProfiles   []ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles"`
	ControlPlaneProfile ManagedClusterPoolUpgradeProfile   `json:"controlPlaneProfile"`
}

type ManagedClustersClient

type ManagedClustersClient struct {
	Client *resourcemanager.Client
}

func NewManagedClustersClientWithBaseURI

func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error)

func (ManagedClustersClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagedClustersClient) CreateOrUpdateThenPoll

func (c ManagedClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.KubernetesClusterId, input ManagedCluster) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ManagedClustersClient) Delete

Delete ...

func (ManagedClustersClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ManagedClustersClient) Get

Get ...

func (ManagedClustersClient) GetAccessProfile

GetAccessProfile ...

func (ManagedClustersClient) GetUpgradeProfile

GetUpgradeProfile ...

func (ManagedClustersClient) List

List ...

func (ManagedClustersClient) ListByResourceGroup

ListByResourceGroup ...

func (ManagedClustersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ManagedClustersClient) ListByResourceGroupCompleteMatchingPredicate

func (c ManagedClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ManagedClusterOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedClustersClient) ListClusterAdminCredentials

ListClusterAdminCredentials ...

func (ManagedClustersClient) ListClusterUserCredentials

ListClusterUserCredentials ...

func (ManagedClustersClient) ListComplete

ListComplete retrieves all the results into a single object

func (ManagedClustersClient) ListCompleteMatchingPredicate

func (c ManagedClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ManagedClusterOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedClustersClient) ResetAADProfile

ResetAADProfile ...

func (ManagedClustersClient) ResetAADProfileThenPoll

ResetAADProfileThenPoll performs ResetAADProfile then polls until it's completed

func (ManagedClustersClient) ResetServicePrincipalProfile

ResetServicePrincipalProfile ...

func (ManagedClustersClient) ResetServicePrincipalProfileThenPoll

func (c ManagedClustersClient) ResetServicePrincipalProfileThenPoll(ctx context.Context, id commonids.KubernetesClusterId, input ManagedClusterServicePrincipalProfile) error

ResetServicePrincipalProfileThenPoll performs ResetServicePrincipalProfile then polls until it's completed

func (ManagedClustersClient) RotateClusterCertificates

RotateClusterCertificates ...

func (ManagedClustersClient) RotateClusterCertificatesThenPoll

func (c ManagedClustersClient) RotateClusterCertificatesThenPoll(ctx context.Context, id commonids.KubernetesClusterId) error

RotateClusterCertificatesThenPoll performs RotateClusterCertificates then polls until it's completed

func (ManagedClustersClient) UpdateTags

UpdateTags ...

func (ManagedClustersClient) UpdateTagsThenPoll

func (c ManagedClustersClient) UpdateTagsThenPoll(ctx context.Context, id commonids.KubernetesClusterId, input TagsObject) error

UpdateTagsThenPoll performs UpdateTags then polls until it's completed

type ResetAADProfileOperationResponse

type ResetAADProfileOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ResetServicePrincipalProfileOperationResponse

type ResetServicePrincipalProfileOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type RotateClusterCertificatesOperationResponse

type RotateClusterCertificatesOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type TagsObject

type TagsObject struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedCluster
}

Jump to

Keyboard shortcuts

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