updates

package
v0.20230731.1101513 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-03-01/updates Documentation

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

Client Initialization

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

Example Usage: UpdatesClient.UpdatesDelete

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

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

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
}

Example Usage: UpdatesClient.UpdatesPut

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

payload := updates.Update{
	// ...
}


read, err := client.UpdatesPut(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 PossibleValuesForAvailabilityType

func PossibleValuesForAvailabilityType() []string

func PossibleValuesForHealthState

func PossibleValuesForHealthState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRebootRequirement

func PossibleValuesForRebootRequirement() []string

func PossibleValuesForSeverity

func PossibleValuesForSeverity() []string

func PossibleValuesForState

func PossibleValuesForState() []string

func PossibleValuesForStatus

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

func (*AvailabilityType) UnmarshalJSON added in v0.20230731.1080956

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

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 HealthState

type HealthState string
const (
	HealthStateError      HealthState = "Error"
	HealthStateFailure    HealthState = "Failure"
	HealthStateInProgress HealthState = "InProgress"
	HealthStateSuccess    HealthState = "Success"
	HealthStateUnknown    HealthState = "Unknown"
	HealthStateWarning    HealthState = "Warning"
)

func (*HealthState) UnmarshalJSON added in v0.20230731.1080956

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

type PackageVersionInfo

type PackageVersionInfo struct {
	LastUpdated *string `json:"lastUpdated,omitempty"`
	PackageType *string `json:"packageType,omitempty"`
	Version     *string `json:"version,omitempty"`
}

func (*PackageVersionInfo) GetLastUpdatedAsTime

func (o *PackageVersionInfo) GetLastUpdatedAsTime() (*time.Time, error)

func (*PackageVersionInfo) SetLastUpdatedAsTime

func (o *PackageVersionInfo) SetLastUpdatedAsTime(input time.Time)

type PrecheckResult

type PrecheckResult struct {
	AdditionalData     *string             `json:"additionalData,omitempty"`
	Description        *string             `json:"description,omitempty"`
	HealthCheckSource  *string             `json:"healthCheckSource,omitempty"`
	Name               *string             `json:"name,omitempty"`
	Remediation        *string             `json:"remediation,omitempty"`
	Severity           *Severity           `json:"severity,omitempty"`
	Status             *Status             `json:"status,omitempty"`
	Tags               *PrecheckResultTags `json:"tags,omitempty"`
	TargetResourceID   *string             `json:"targetResourceID,omitempty"`
	TargetResourceName *string             `json:"targetResourceName,omitempty"`
	Timestamp          *string             `json:"timestamp,omitempty"`
	Title              *string             `json:"title,omitempty"`
}

func (*PrecheckResult) GetTimestampAsTime

func (o *PrecheckResult) GetTimestampAsTime() (*time.Time, error)

func (*PrecheckResult) SetTimestampAsTime

func (o *PrecheckResult) SetTimestampAsTime(input time.Time)

type PrecheckResultTags

type PrecheckResultTags struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
}

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON added in v0.20230731.1080956

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

type RebootRequirement

type RebootRequirement string
const (
	RebootRequirementFalse   RebootRequirement = "False"
	RebootRequirementTrue    RebootRequirement = "True"
	RebootRequirementUnknown RebootRequirement = "Unknown"
)

func (*RebootRequirement) UnmarshalJSON added in v0.20230731.1080956

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

type Severity

type Severity string
const (
	SeverityCritical      Severity = "Critical"
	SeverityHidden        Severity = "Hidden"
	SeverityInformational Severity = "Informational"
	SeverityWarning       Severity = "Warning"
)

func (*Severity) UnmarshalJSON added in v0.20230731.1080956

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

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

func (*State) UnmarshalJSON added in v0.20230731.1080956

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

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON added in v0.20230731.1080956

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

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"`
	ComponentVersions     *[]PackageVersionInfo  `json:"componentVersions,omitempty"`
	Description           *string                `json:"description,omitempty"`
	DisplayName           *string                `json:"displayName,omitempty"`
	HealthCheckDate       *string                `json:"healthCheckDate,omitempty"`
	HealthCheckResult     *[]PrecheckResult      `json:"healthCheckResult,omitempty"`
	HealthState           *HealthState           `json:"healthState,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"`
	RebootRequired        *RebootRequirement     `json:"rebootRequired,omitempty"`
	ReleaseLink           *string                `json:"releaseLink,omitempty"`
	State                 *State                 `json:"state,omitempty"`
	UpdateStateProperties *UpdateStateProperties `json:"updateStateProperties,omitempty"`
	Version               *string                `json:"version,omitempty"`
}

func (*UpdateProperties) GetHealthCheckDateAsTime

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

func (*UpdateProperties) GetInstalledDateAsTime

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

func (*UpdateProperties) SetHealthCheckDateAsTime

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

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 *resourcemanager.Client
}

func NewUpdatesClientWithBaseURI

func NewUpdatesClientWithBaseURI(api environments.Api) (*UpdatesClient, error)

func (UpdatesClient) UpdatesDelete

func (c UpdatesClient) UpdatesDelete(ctx context.Context, id UpdateId) (result UpdatesDeleteOperationResponse, err error)

UpdatesDelete ...

func (UpdatesClient) UpdatesDeleteThenPoll

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

UpdatesDeleteThenPoll performs UpdatesDelete then polls until it's completed

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) (result UpdatesListOperationResponse, err error)

UpdatesList ...

func (UpdatesClient) UpdatesListComplete

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

UpdatesListComplete retrieves all the results into a single object

func (UpdatesClient) UpdatesListCompleteMatchingPredicate

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

UpdatesListCompleteMatchingPredicate retrieves all the results and then applies 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

func (UpdatesClient) UpdatesPut

func (c UpdatesClient) UpdatesPut(ctx context.Context, id UpdateId, input Update) (result UpdatesPutOperationResponse, err error)

UpdatesPut ...

type UpdatesDeleteOperationResponse

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

type UpdatesGetOperationResponse

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

type UpdatesListCompleteResult

type UpdatesListCompleteResult struct {
	Items []Update
}

type UpdatesListOperationResponse

type UpdatesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Update
}

type UpdatesPostOperationResponse

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

type UpdatesPutOperationResponse

type UpdatesPutOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Update
}

Jump to

Keyboard shortcuts

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