updateruns

package
v0.20240320.1143605 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: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-08-01/updateruns Documentation

The updateruns SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-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-sdk/resource-manager/azurestackhci/2023-08-01/updateruns"

Client Initialization

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

Example Usage: UpdateRunsClient.Delete

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

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

Example Usage: UpdateRunsClient.Get

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

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

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

// 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: UpdateRunsClient.Put

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForUpdateRunPropertiesState

func PossibleValuesForUpdateRunPropertiesState() []string

func ValidateUpdateID

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

ValidateUpdateID checks that 'input' can be parsed as a Update 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 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        *UpdateRun
}

type ListCompleteResult

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

type ListOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type PutOperationResponse

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

type Step

type Step struct {
	Description        *string `json:"description,omitempty"`
	EndTimeUtc         *string `json:"endTimeUtc,omitempty"`
	ErrorMessage       *string `json:"errorMessage,omitempty"`
	LastUpdatedTimeUtc *string `json:"lastUpdatedTimeUtc,omitempty"`
	Name               *string `json:"name,omitempty"`
	StartTimeUtc       *string `json:"startTimeUtc,omitempty"`
	Status             *string `json:"status,omitempty"`
	Steps              *[]Step `json:"steps,omitempty"`
}

func (*Step) GetEndTimeUtcAsTime

func (o *Step) GetEndTimeUtcAsTime() (*time.Time, error)

func (*Step) GetLastUpdatedTimeUtcAsTime

func (o *Step) GetLastUpdatedTimeUtcAsTime() (*time.Time, error)

func (*Step) GetStartTimeUtcAsTime

func (o *Step) GetStartTimeUtcAsTime() (*time.Time, error)

func (*Step) SetEndTimeUtcAsTime

func (o *Step) SetEndTimeUtcAsTime(input time.Time)

func (*Step) SetLastUpdatedTimeUtcAsTime

func (o *Step) SetLastUpdatedTimeUtcAsTime(input time.Time)

func (*Step) SetStartTimeUtcAsTime

func (o *Step) SetStartTimeUtcAsTime(input time.Time)

type UpdateId

type UpdateId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	UpdateName        string
}

UpdateId is a struct representing the Resource ID for a Update

func NewUpdateID

func NewUpdateID(subscriptionId string, resourceGroupName string, clusterName string, updateName string) UpdateId

NewUpdateID returns a new UpdateId struct

func ParseUpdateID

func ParseUpdateID(input string) (*UpdateId, error)

ParseUpdateID parses 'input' into a UpdateId

func ParseUpdateIDInsensitively

func ParseUpdateIDInsensitively(input string) (*UpdateId, error)

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

func (*UpdateId) FromParseResult

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

func (UpdateId) ID

func (id UpdateId) ID() string

ID returns the formatted Update ID

func (UpdateId) Segments

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

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

func (UpdateId) String

func (id UpdateId) String() string

String returns a human-readable description of this Update ID

type UpdateRun

type UpdateRun struct {
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,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
	ClusterName       string
	UpdateName        string
	UpdateRunName     string
}

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

func NewUpdateRunID

func NewUpdateRunID(subscriptionId string, resourceGroupName string, clusterName string, updateName 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 {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (UpdateRunOperationPredicate) Matches

func (p UpdateRunOperationPredicate) Matches(input UpdateRun) bool

type UpdateRunProperties

type UpdateRunProperties struct {
	Duration          *string                   `json:"duration,omitempty"`
	LastUpdatedTime   *string                   `json:"lastUpdatedTime,omitempty"`
	Progress          *Step                     `json:"progress,omitempty"`
	ProvisioningState *ProvisioningState        `json:"provisioningState,omitempty"`
	State             *UpdateRunPropertiesState `json:"state,omitempty"`
	TimeStarted       *string                   `json:"timeStarted,omitempty"`
}

func (*UpdateRunProperties) GetLastUpdatedTimeAsTime

func (o *UpdateRunProperties) GetLastUpdatedTimeAsTime() (*time.Time, error)

func (*UpdateRunProperties) GetTimeStartedAsTime

func (o *UpdateRunProperties) GetTimeStartedAsTime() (*time.Time, error)

func (*UpdateRunProperties) SetLastUpdatedTimeAsTime

func (o *UpdateRunProperties) SetLastUpdatedTimeAsTime(input time.Time)

func (*UpdateRunProperties) SetTimeStartedAsTime

func (o *UpdateRunProperties) SetTimeStartedAsTime(input time.Time)

type UpdateRunPropertiesState

type UpdateRunPropertiesState string
const (
	UpdateRunPropertiesStateFailed     UpdateRunPropertiesState = "Failed"
	UpdateRunPropertiesStateInProgress UpdateRunPropertiesState = "InProgress"
	UpdateRunPropertiesStateSucceeded  UpdateRunPropertiesState = "Succeeded"
	UpdateRunPropertiesStateUnknown    UpdateRunPropertiesState = "Unknown"
)

func (*UpdateRunPropertiesState) UnmarshalJSON

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

type UpdateRunsClient

type UpdateRunsClient struct {
	Client *resourcemanager.Client
}

func NewUpdateRunsClientWithBaseURI

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

func (UpdateRunsClient) Delete

func (c UpdateRunsClient) Delete(ctx context.Context, id UpdateRunId) (result DeleteOperationResponse, err error)

Delete ...

func (UpdateRunsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (UpdateRunsClient) Get

Get ...

func (UpdateRunsClient) List

func (c UpdateRunsClient) List(ctx context.Context, id UpdateId) (result ListOperationResponse, err error)

List ...

func (UpdateRunsClient) ListComplete

func (c UpdateRunsClient) ListComplete(ctx context.Context, id UpdateId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (UpdateRunsClient) ListCompleteMatchingPredicate

func (c UpdateRunsClient) ListCompleteMatchingPredicate(ctx context.Context, id UpdateId, predicate UpdateRunOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UpdateRunsClient) Put

func (c UpdateRunsClient) Put(ctx context.Context, id UpdateRunId, input UpdateRun) (result PutOperationResponse, err error)

Put ...

Jump to

Keyboard shortcuts

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