agentpools

package
v0.20240125.1170241 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools Documentation

The agentpools SDK allows for interaction with the Azure Resource Manager Service containerregistry (API Version 2019-06-01-preview).

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-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools"

Client Initialization

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

Example Usage: AgentPoolsClient.Create

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

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


if err := client.CreateThenPoll(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", "registryValue", "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", "registryValue", "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.GetQueueStatus

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

read, err := client.GetQueueStatus(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 := agentpools.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue")

// 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: AgentPoolsClient.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOS

func PossibleValuesForOS() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []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

func ValidateRegistryID

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

ValidateRegistryID checks that 'input' can be parsed as a Registry ID

Types

type AgentPool

type AgentPool struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *AgentPoolProperties   `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type AgentPoolId

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

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

func NewAgentPoolID

func NewAgentPoolID(subscriptionId string, resourceGroupName string, registryName 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
	Location *string
	Name     *string
	Type     *string
}

func (AgentPoolOperationPredicate) Matches

func (p AgentPoolOperationPredicate) Matches(input AgentPool) bool

type AgentPoolProperties

type AgentPoolProperties struct {
	Count                          *int64             `json:"count,omitempty"`
	Os                             *OS                `json:"os,omitempty"`
	ProvisioningState              *ProvisioningState `json:"provisioningState,omitempty"`
	Tier                           *string            `json:"tier,omitempty"`
	VirtualNetworkSubnetResourceId *string            `json:"virtualNetworkSubnetResourceId,omitempty"`
}

type AgentPoolPropertiesUpdateParameters

type AgentPoolPropertiesUpdateParameters struct {
	Count *int64 `json:"count,omitempty"`
}

type AgentPoolQueueStatus

type AgentPoolQueueStatus struct {
	Count *int64 `json:"count,omitempty"`
}

type AgentPoolUpdateParameters

type AgentPoolUpdateParameters struct {
	Properties *AgentPoolPropertiesUpdateParameters `json:"properties,omitempty"`
	Tags       *map[string]string                   `json:"tags,omitempty"`
}

type AgentPoolsClient

type AgentPoolsClient struct {
	Client *resourcemanager.Client
}

func NewAgentPoolsClientWithBaseURI

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

func (AgentPoolsClient) Create

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

Create ...

func (AgentPoolsClient) CreateThenPoll

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

CreateThenPoll performs Create 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) GetQueueStatus

func (c AgentPoolsClient) GetQueueStatus(ctx context.Context, id AgentPoolId) (result GetQueueStatusOperationResponse, err error)

GetQueueStatus ...

func (AgentPoolsClient) List

func (c AgentPoolsClient) List(ctx context.Context, id RegistryId) (result ListOperationResponse, err error)

List ...

func (AgentPoolsClient) ListComplete

ListComplete retrieves all the results into a single object

func (AgentPoolsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AgentPoolsClient) Update

Update ...

func (AgentPoolsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type CreateOperationResponse

type CreateOperationResponse 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 GetOperationResponse

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

type GetQueueStatusOperationResponse

type GetQueueStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AgentPoolQueueStatus
}

type ListCompleteResult

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

type ListOperationResponse

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

type OS

type OS string
const (
	OSLinux   OS = "Linux"
	OSWindows OS = "Windows"
)

func (*OS) UnmarshalJSON

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

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

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

type RegistryId

type RegistryId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
}

RegistryId is a struct representing the Resource ID for a Registry

func NewRegistryID

func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId

NewRegistryID returns a new RegistryId struct

func ParseRegistryID

func ParseRegistryID(input string) (*RegistryId, error)

ParseRegistryID parses 'input' into a RegistryId

func ParseRegistryIDInsensitively

func ParseRegistryIDInsensitively(input string) (*RegistryId, error)

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

func (*RegistryId) FromParseResult

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

func (RegistryId) ID

func (id RegistryId) ID() string

ID returns the formatted Registry ID

func (RegistryId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Registry ID

func (RegistryId) String

func (id RegistryId) String() string

String returns a human-readable description of this Registry ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	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