agentpools

package
v0.20240320.1144505 Latest Latest
Warning

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

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

README

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

The agentpools 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/agentpools"

Client Initialization

client := agentpools.NewAgentPoolsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AgentPoolsClient.CreateOrUpdate

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

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


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

Example Usage: AgentPoolsClient.Delete

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

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

Example Usage: AgentPoolsClient.Get

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

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: AgentPoolsClient.GetAvailableAgentPoolVersions

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

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

Example Usage: AgentPoolsClient.GetUpgradeProfile

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

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForContainerServiceOSTypes

func PossibleValuesForContainerServiceOSTypes() []string

func ValidateAgentPoolID

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

ValidateAgentPoolID checks that 'input' can be parsed as a Agent Pool ID

Types

type AgentPool

type AgentPool struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type AgentPoolAvailableVersions

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

type AgentPoolAvailableVersionsProperties

type AgentPoolAvailableVersionsProperties struct {
	AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsInlined `json:"agentPoolVersions,omitempty"`
}

type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsInlined

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

type AgentPoolId

type AgentPoolId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ManagedClusterName string
	AgentPoolName      string
}

AgentPoolId is a struct representing the Resource ID for a Agent Pool

func NewAgentPoolID

func NewAgentPoolID(subscriptionId string, resourceGroupName string, managedClusterName string, agentPoolName string) AgentPoolId

NewAgentPoolID returns a new AgentPoolId struct

func ParseAgentPoolID

func ParseAgentPoolID(input string) (*AgentPoolId, error)

ParseAgentPoolID parses 'input' into a AgentPoolId

func ParseAgentPoolIDInsensitively

func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error)

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

func (*AgentPoolId) FromParseResult

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

func (AgentPoolId) ID

func (id AgentPoolId) ID() string

ID returns the formatted Agent Pool ID

func (AgentPoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Agent Pool ID

func (AgentPoolId) String

func (id AgentPoolId) String() string

String returns a human-readable description of this Agent Pool ID

type AgentPoolOperationPredicate

type AgentPoolOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (AgentPoolOperationPredicate) Matches

func (p AgentPoolOperationPredicate) Matches(input AgentPool) bool

type AgentPoolUpgradeProfile

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

type AgentPoolUpgradeProfileProperties

type AgentPoolUpgradeProfileProperties struct {
	KubernetesVersion string                                              `json:"kubernetesVersion"`
	OsType            ContainerServiceOSTypes                             `json:"osType"`
	Upgrades          *[]AgentPoolUpgradeProfilePropertiesUpgradesInlined `json:"upgrades,omitempty"`
}

type AgentPoolUpgradeProfilePropertiesUpgradesInlined

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

type AgentPoolsClient

type AgentPoolsClient struct {
	Client *resourcemanager.Client
}

func NewAgentPoolsClientWithBaseURI

func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error)

func (AgentPoolsClient) CreateOrUpdate

func (c AgentPoolsClient) CreateOrUpdate(ctx context.Context, id AgentPoolId, input AgentPool) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AgentPoolsClient) CreateOrUpdateThenPoll

func (c AgentPoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id AgentPoolId, input AgentPool) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AgentPoolsClient) Delete

func (c AgentPoolsClient) Delete(ctx context.Context, id AgentPoolId) (result DeleteOperationResponse, err error)

Delete ...

func (AgentPoolsClient) DeleteThenPoll

func (c AgentPoolsClient) DeleteThenPoll(ctx context.Context, id AgentPoolId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AgentPoolsClient) Get

Get ...

func (AgentPoolsClient) GetAvailableAgentPoolVersions

GetAvailableAgentPoolVersions ...

func (AgentPoolsClient) GetUpgradeProfile

func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) (result GetUpgradeProfileOperationResponse, err error)

GetUpgradeProfile ...

func (AgentPoolsClient) List

List ...

func (AgentPoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (AgentPoolsClient) ListCompleteMatchingPredicate

func (c AgentPoolsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.KubernetesClusterId, predicate AgentPoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

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        *AgentPool
}

type DeleteOperationResponse

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

type GetAvailableAgentPoolVersionsOperationResponse

type GetAvailableAgentPoolVersionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AgentPoolAvailableVersions
}

type GetOperationResponse

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

type GetUpgradeProfileOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

Jump to

Keyboard shortcuts

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