updates

package
v0.20221118.1153619 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2022-10-01/updates Documentation

The updates SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2022-10-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/2022-10-01/updates"

Client Initialization

client := updates.NewUpdatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UpdatesClient.UpdatesGet

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

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

Example Usage: UpdatesClient.UpdatesList

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

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

Example Usage: UpdatesClient.UpdatesPost

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAvailabilityType

func PossibleValuesForAvailabilityType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForState

func PossibleValuesForState() []string

func ValidateClusterID

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

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

func ValidateUpdateID

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

ValidateUpdateID checks that 'input' can be parsed as a Update ID

Types

type AvailabilityType

type AvailabilityType string
const (
	AvailabilityTypeLocal  AvailabilityType = "Local"
	AvailabilityTypeNotify AvailabilityType = "Notify"
	AvailabilityTypeOnline AvailabilityType = "Online"
)

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type ProvisioningState

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

type State

type State string
const (
	StateDownloadFailed                                State = "DownloadFailed"
	StateDownloading                                   State = "Downloading"
	StateHasPrerequisite                               State = "HasPrerequisite"
	StateHealthCheckFailed                             State = "HealthCheckFailed"
	StateHealthChecking                                State = "HealthChecking"
	StateInstallationFailed                            State = "InstallationFailed"
	StateInstalled                                     State = "Installed"
	StateInstalling                                    State = "Installing"
	StateInvalid                                       State = "Invalid"
	StateNotApplicableBecauseAnotherUpdateIsInProgress State = "NotApplicableBecauseAnotherUpdateIsInProgress"
	StateObsolete                                      State = "Obsolete"
	StatePreparationFailed                             State = "PreparationFailed"
	StatePreparing                                     State = "Preparing"
	StateReady                                         State = "Ready"
	StateReadyToInstall                                State = "ReadyToInstall"
	StateRecalled                                      State = "Recalled"
	StateScanFailed                                    State = "ScanFailed"
	StateScanInProgress                                State = "ScanInProgress"
)

type Update

type Update struct {
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *UpdateProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

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) 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 UpdateOperationPredicate

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

func (UpdateOperationPredicate) Matches

func (p UpdateOperationPredicate) Matches(input Update) bool

type UpdatePrerequisite

type UpdatePrerequisite struct {
	PackageName *string `json:"packageName,omitempty"`
	UpdateType  *string `json:"updateType,omitempty"`
	Version     *string `json:"version,omitempty"`
}

type UpdateProperties

type UpdateProperties struct {
	AdditionalProperties  *string                `json:"additionalProperties,omitempty"`
	AvailabilityType      *AvailabilityType      `json:"availabilityType,omitempty"`
	Description           *string                `json:"description,omitempty"`
	DisplayName           *string                `json:"displayName,omitempty"`
	InstalledDate         *string                `json:"installedDate,omitempty"`
	PackagePath           *string                `json:"packagePath,omitempty"`
	PackageSizeInMb       *float64               `json:"packageSizeInMb,omitempty"`
	PackageType           *string                `json:"packageType,omitempty"`
	Prerequisites         *[]UpdatePrerequisite  `json:"prerequisites,omitempty"`
	ProvisioningState     *ProvisioningState     `json:"provisioningState,omitempty"`
	Publisher             *string                `json:"publisher,omitempty"`
	ReleaseLink           *string                `json:"releaseLink,omitempty"`
	State                 *State                 `json:"state,omitempty"`
	UpdateStateProperties *UpdateStateProperties `json:"updateStateProperties,omitempty"`
	Version               *string                `json:"version,omitempty"`
}

func (*UpdateProperties) GetInstalledDateAsTime

func (o *UpdateProperties) GetInstalledDateAsTime() (*time.Time, error)

func (*UpdateProperties) SetInstalledDateAsTime

func (o *UpdateProperties) SetInstalledDateAsTime(input time.Time)

type UpdateStateProperties

type UpdateStateProperties struct {
	NotifyMessage      *string  `json:"notifyMessage,omitempty"`
	ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
}

type UpdatesClient

type UpdatesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewUpdatesClientWithBaseURI

func NewUpdatesClientWithBaseURI(endpoint string) UpdatesClient

func (UpdatesClient) UpdatesGet

func (c UpdatesClient) UpdatesGet(ctx context.Context, id UpdateId) (result UpdatesGetOperationResponse, err error)

UpdatesGet ...

func (UpdatesClient) UpdatesList

func (c UpdatesClient) UpdatesList(ctx context.Context, id ClusterId) (resp UpdatesListOperationResponse, err error)

UpdatesList ...

func (UpdatesClient) UpdatesListComplete

func (c UpdatesClient) UpdatesListComplete(ctx context.Context, id ClusterId) (UpdatesListCompleteResult, error)

UpdatesListComplete retrieves all of the results into a single object

func (UpdatesClient) UpdatesListCompleteMatchingPredicate

func (c UpdatesClient) UpdatesListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate UpdateOperationPredicate) (resp UpdatesListCompleteResult, err error)

UpdatesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (UpdatesClient) UpdatesPost

func (c UpdatesClient) UpdatesPost(ctx context.Context, id UpdateId) (result UpdatesPostOperationResponse, err error)

UpdatesPost ...

func (UpdatesClient) UpdatesPostThenPoll

func (c UpdatesClient) UpdatesPostThenPoll(ctx context.Context, id UpdateId) error

UpdatesPostThenPoll performs UpdatesPost then polls until it's completed

type UpdatesGetOperationResponse

type UpdatesGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Update
}

type UpdatesListCompleteResult

type UpdatesListCompleteResult struct {
	Items []Update
}

type UpdatesListOperationResponse

type UpdatesListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Update
	// contains filtered or unexported fields
}

func (UpdatesListOperationResponse) HasMore

func (r UpdatesListOperationResponse) HasMore() bool

func (UpdatesListOperationResponse) LoadMore

type UpdatesPostOperationResponse

type UpdatesPostOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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