updateruns

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/updateruns Documentation

The updateruns SDK allows for interaction with Azure Resource Manager containerservice (API Version 2024-04-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-sdk/resource-manager/containerservice/2024-04-01/updateruns"

Client Initialization

client := updateruns.NewUpdateRunsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UpdateRunsClient.CreateOrUpdate

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

payload := updateruns.UpdateRun{
	// ...
}


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

Example Usage: UpdateRunsClient.Delete

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

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

Example Usage: UpdateRunsClient.Get

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

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: UpdateRunsClient.ListByFleet

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

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

Example Usage: UpdateRunsClient.Skip

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

payload := updateruns.SkipProperties{
	// ...
}


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

Example Usage: UpdateRunsClient.Start

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

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

Example Usage: UpdateRunsClient.Stop

ctx := context.TODO()
id := updateruns.NewUpdateRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName", "updateRunName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForManagedClusterUpgradeType

func PossibleValuesForManagedClusterUpgradeType() []string

func PossibleValuesForNodeImageSelectionType

func PossibleValuesForNodeImageSelectionType() []string

func PossibleValuesForTargetType

func PossibleValuesForTargetType() []string

func PossibleValuesForUpdateRunProvisioningState

func PossibleValuesForUpdateRunProvisioningState() []string

func PossibleValuesForUpdateState

func PossibleValuesForUpdateState() []string

func ValidateFleetID

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

ValidateFleetID checks that 'input' can be parsed as a Fleet ID

func ValidateUpdateRunID

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

ValidateUpdateRunID checks that 'input' can be parsed as a Update Run ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorDetail         `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type FleetId

type FleetId struct {
	SubscriptionId    string
	ResourceGroupName string
	FleetName         string
}

FleetId is a struct representing the Resource ID for a Fleet

func NewFleetID

func NewFleetID(subscriptionId string, resourceGroupName string, fleetName string) FleetId

NewFleetID returns a new FleetId struct

func ParseFleetID

func ParseFleetID(input string) (*FleetId, error)

ParseFleetID parses 'input' into a FleetId

func ParseFleetIDInsensitively

func ParseFleetIDInsensitively(input string) (*FleetId, error)

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

func (*FleetId) FromParseResult

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

func (FleetId) ID

func (id FleetId) ID() string

ID returns the formatted Fleet ID

func (FleetId) Segments

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

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

func (FleetId) String

func (id FleetId) String() string

String returns a human-readable description of this Fleet ID

type GetOperationResponse

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

type ListByFleetCompleteResult

type ListByFleetCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UpdateRun
}

type ListByFleetCustomPager

type ListByFleetCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByFleetCustomPager) NextPageLink() *odata.Link

type ListByFleetOperationResponse

type ListByFleetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UpdateRun
}

type ManagedClusterUpdate

type ManagedClusterUpdate struct {
	NodeImageSelection *NodeImageSelection       `json:"nodeImageSelection,omitempty"`
	Upgrade            ManagedClusterUpgradeSpec `json:"upgrade"`
}

type ManagedClusterUpgradeSpec

type ManagedClusterUpgradeSpec struct {
	KubernetesVersion *string                   `json:"kubernetesVersion,omitempty"`
	Type              ManagedClusterUpgradeType `json:"type"`
}

type ManagedClusterUpgradeType

type ManagedClusterUpgradeType string
const (
	ManagedClusterUpgradeTypeControlPlaneOnly ManagedClusterUpgradeType = "ControlPlaneOnly"
	ManagedClusterUpgradeTypeFull             ManagedClusterUpgradeType = "Full"
	ManagedClusterUpgradeTypeNodeImageOnly    ManagedClusterUpgradeType = "NodeImageOnly"
)

func (*ManagedClusterUpgradeType) UnmarshalJSON

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

type MemberUpdateStatus

type MemberUpdateStatus struct {
	ClusterResourceId *string       `json:"clusterResourceId,omitempty"`
	Message           *string       `json:"message,omitempty"`
	Name              *string       `json:"name,omitempty"`
	OperationId       *string       `json:"operationId,omitempty"`
	Status            *UpdateStatus `json:"status,omitempty"`
}

type NodeImageSelection

type NodeImageSelection struct {
	Type NodeImageSelectionType `json:"type"`
}

type NodeImageSelectionStatus

type NodeImageSelectionStatus struct {
	SelectedNodeImageVersions *[]NodeImageVersion `json:"selectedNodeImageVersions,omitempty"`
}

type NodeImageSelectionType

type NodeImageSelectionType string
const (
	NodeImageSelectionTypeConsistent NodeImageSelectionType = "Consistent"
	NodeImageSelectionTypeLatest     NodeImageSelectionType = "Latest"
)

func (*NodeImageSelectionType) UnmarshalJSON

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

type NodeImageVersion

type NodeImageVersion struct {
	Version *string `json:"version,omitempty"`
}

type SkipOperationOptions

type SkipOperationOptions struct {
	IfMatch *string
}

func DefaultSkipOperationOptions

func DefaultSkipOperationOptions() SkipOperationOptions

func (SkipOperationOptions) ToHeaders

func (o SkipOperationOptions) ToHeaders() *client.Headers

func (SkipOperationOptions) ToOData

func (o SkipOperationOptions) ToOData() *odata.Query

func (SkipOperationOptions) ToQuery

type SkipOperationResponse

type SkipOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpdateRun
}

type SkipProperties

type SkipProperties struct {
	Targets []SkipTarget `json:"targets"`
}

type SkipTarget

type SkipTarget struct {
	Name string     `json:"name"`
	Type TargetType `json:"type"`
}

type StartOperationOptions

type StartOperationOptions struct {
	IfMatch *string
}

func DefaultStartOperationOptions

func DefaultStartOperationOptions() StartOperationOptions

func (StartOperationOptions) ToHeaders

func (o StartOperationOptions) ToHeaders() *client.Headers

func (StartOperationOptions) ToOData

func (o StartOperationOptions) ToOData() *odata.Query

func (StartOperationOptions) ToQuery

type StartOperationResponse

type StartOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpdateRun
}

type StopOperationOptions

type StopOperationOptions struct {
	IfMatch *string
}

func DefaultStopOperationOptions

func DefaultStopOperationOptions() StopOperationOptions

func (StopOperationOptions) ToHeaders

func (o StopOperationOptions) ToHeaders() *client.Headers

func (StopOperationOptions) ToOData

func (o StopOperationOptions) ToOData() *odata.Query

func (StopOperationOptions) ToQuery

type StopOperationResponse

type StopOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpdateRun
}

type TargetType

type TargetType string
const (
	TargetTypeAfterStageWait TargetType = "AfterStageWait"
	TargetTypeGroup          TargetType = "Group"
	TargetTypeMember         TargetType = "Member"
	TargetTypeStage          TargetType = "Stage"
)

func (*TargetType) UnmarshalJSON

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

type UpdateGroup

type UpdateGroup struct {
	Name string `json:"name"`
}

type UpdateGroupStatus

type UpdateGroupStatus struct {
	Members *[]MemberUpdateStatus `json:"members,omitempty"`
	Name    *string               `json:"name,omitempty"`
	Status  *UpdateStatus         `json:"status,omitempty"`
}

type UpdateRun

type UpdateRun struct {
	ETag       *string                `json:"eTag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *UpdateRunProperties   `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type UpdateRunId

type UpdateRunId struct {
	SubscriptionId    string
	ResourceGroupName string
	FleetName         string
	UpdateRunName     string
}

UpdateRunId is a struct representing the Resource ID for a Update Run

func NewUpdateRunID

func NewUpdateRunID(subscriptionId string, resourceGroupName string, fleetName string, updateRunName string) UpdateRunId

NewUpdateRunID returns a new UpdateRunId struct

func ParseUpdateRunID

func ParseUpdateRunID(input string) (*UpdateRunId, error)

ParseUpdateRunID parses 'input' into a UpdateRunId

func ParseUpdateRunIDInsensitively

func ParseUpdateRunIDInsensitively(input string) (*UpdateRunId, error)

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

func (*UpdateRunId) FromParseResult

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

func (UpdateRunId) ID

func (id UpdateRunId) ID() string

ID returns the formatted Update Run ID

func (UpdateRunId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Update Run ID

func (UpdateRunId) String

func (id UpdateRunId) String() string

String returns a human-readable description of this Update Run ID

type UpdateRunOperationPredicate

type UpdateRunOperationPredicate struct {
	ETag *string
	Id   *string
	Name *string
	Type *string
}

func (UpdateRunOperationPredicate) Matches

func (p UpdateRunOperationPredicate) Matches(input UpdateRun) bool

type UpdateRunProperties

type UpdateRunProperties struct {
	ManagedClusterUpdate ManagedClusterUpdate        `json:"managedClusterUpdate"`
	ProvisioningState    *UpdateRunProvisioningState `json:"provisioningState,omitempty"`
	Status               *UpdateRunStatus            `json:"status,omitempty"`
	Strategy             *UpdateRunStrategy          `json:"strategy,omitempty"`
	UpdateStrategyId     *string                     `json:"updateStrategyId,omitempty"`
}

type UpdateRunProvisioningState

type UpdateRunProvisioningState string
const (
	UpdateRunProvisioningStateCanceled  UpdateRunProvisioningState = "Canceled"
	UpdateRunProvisioningStateFailed    UpdateRunProvisioningState = "Failed"
	UpdateRunProvisioningStateSucceeded UpdateRunProvisioningState = "Succeeded"
)

func (*UpdateRunProvisioningState) UnmarshalJSON

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

type UpdateRunStatus

type UpdateRunStatus struct {
	NodeImageSelection *NodeImageSelectionStatus `json:"nodeImageSelection,omitempty"`
	Stages             *[]UpdateStageStatus      `json:"stages,omitempty"`
	Status             *UpdateStatus             `json:"status,omitempty"`
}

type UpdateRunStrategy

type UpdateRunStrategy struct {
	Stages []UpdateStage `json:"stages"`
}

type UpdateRunsClient

type UpdateRunsClient struct {
	Client *resourcemanager.Client
}

func NewUpdateRunsClientWithBaseURI

func NewUpdateRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateRunsClient, error)

func (UpdateRunsClient) CreateOrUpdate

CreateOrUpdate ...

func (UpdateRunsClient) CreateOrUpdateThenPoll

func (c UpdateRunsClient) CreateOrUpdateThenPoll(ctx context.Context, id UpdateRunId, input UpdateRun, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (UpdateRunsClient) Delete

Delete ...

func (UpdateRunsClient) DeleteThenPoll

func (c UpdateRunsClient) DeleteThenPoll(ctx context.Context, id UpdateRunId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (UpdateRunsClient) Get

Get ...

func (UpdateRunsClient) ListByFleet

func (c UpdateRunsClient) ListByFleet(ctx context.Context, id FleetId) (result ListByFleetOperationResponse, err error)

ListByFleet ...

func (UpdateRunsClient) ListByFleetComplete

func (c UpdateRunsClient) ListByFleetComplete(ctx context.Context, id FleetId) (ListByFleetCompleteResult, error)

ListByFleetComplete retrieves all the results into a single object

func (UpdateRunsClient) ListByFleetCompleteMatchingPredicate

func (c UpdateRunsClient) ListByFleetCompleteMatchingPredicate(ctx context.Context, id FleetId, predicate UpdateRunOperationPredicate) (result ListByFleetCompleteResult, err error)

ListByFleetCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UpdateRunsClient) Skip

Skip ...

func (UpdateRunsClient) SkipThenPoll

func (c UpdateRunsClient) SkipThenPoll(ctx context.Context, id UpdateRunId, input SkipProperties, options SkipOperationOptions) error

SkipThenPoll performs Skip then polls until it's completed

func (UpdateRunsClient) Start

Start ...

func (UpdateRunsClient) StartThenPoll

func (c UpdateRunsClient) StartThenPoll(ctx context.Context, id UpdateRunId, options StartOperationOptions) error

StartThenPoll performs Start then polls until it's completed

func (UpdateRunsClient) Stop

Stop ...

func (UpdateRunsClient) StopThenPoll

func (c UpdateRunsClient) StopThenPoll(ctx context.Context, id UpdateRunId, options StopOperationOptions) error

StopThenPoll performs Stop then polls until it's completed

type UpdateStage

type UpdateStage struct {
	AfterStageWaitInSeconds *int64         `json:"afterStageWaitInSeconds,omitempty"`
	Groups                  *[]UpdateGroup `json:"groups,omitempty"`
	Name                    string         `json:"name"`
}

type UpdateStageStatus

type UpdateStageStatus struct {
	AfterStageWaitStatus *WaitStatus          `json:"afterStageWaitStatus,omitempty"`
	Groups               *[]UpdateGroupStatus `json:"groups,omitempty"`
	Name                 *string              `json:"name,omitempty"`
	Status               *UpdateStatus        `json:"status,omitempty"`
}

type UpdateState

type UpdateState string
const (
	UpdateStateCompleted  UpdateState = "Completed"
	UpdateStateFailed     UpdateState = "Failed"
	UpdateStateNotStarted UpdateState = "NotStarted"
	UpdateStateRunning    UpdateState = "Running"
	UpdateStateSkipped    UpdateState = "Skipped"
	UpdateStateStopped    UpdateState = "Stopped"
	UpdateStateStopping   UpdateState = "Stopping"
)

func (*UpdateState) UnmarshalJSON

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

type UpdateStatus

type UpdateStatus struct {
	CompletedTime *string      `json:"completedTime,omitempty"`
	Error         *ErrorDetail `json:"error,omitempty"`
	StartTime     *string      `json:"startTime,omitempty"`
	State         *UpdateState `json:"state,omitempty"`
}

func (*UpdateStatus) GetCompletedTimeAsTime

func (o *UpdateStatus) GetCompletedTimeAsTime() (*time.Time, error)

func (*UpdateStatus) GetStartTimeAsTime

func (o *UpdateStatus) GetStartTimeAsTime() (*time.Time, error)

func (*UpdateStatus) SetCompletedTimeAsTime

func (o *UpdateStatus) SetCompletedTimeAsTime(input time.Time)

func (*UpdateStatus) SetStartTimeAsTime

func (o *UpdateStatus) SetStartTimeAsTime(input time.Time)

type WaitStatus

type WaitStatus struct {
	Status                *UpdateStatus `json:"status,omitempty"`
	WaitDurationInSeconds *int64        `json:"waitDurationInSeconds,omitempty"`
}

Jump to

Keyboard shortcuts

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