updates

package
v0.20240304.1112406 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

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

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

Client Initialization

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

Example Usage: UpdatesClient.Delete

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

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

Example Usage: UpdatesClient.Get

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

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

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

// 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: UpdatesClient.Post

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

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

Example Usage: UpdatesClient.Put

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

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


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

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

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

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 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        *Update
}

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

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

type ListCompleteResult

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

type ListOperationResponse

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

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 PostOperationResponse

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

type PrecheckResult

type PrecheckResult struct {
	AdditionalData     *string             `json:"additionalData,omitempty"`
	Description        *string             `json:"description,omitempty"`
	DisplayName        *string             `json:"displayName,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

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

type PutOperationResponse

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

type RebootRequirement

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

func (*RebootRequirement) UnmarshalJSON

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

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

type State

type State string
const (
	StateAdditionalContentRequired                     State = "AdditionalContentRequired"
	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

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

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) 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 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(sdkApi sdkEnv.Api) (*UpdatesClient, error)

func (UpdatesClient) Delete

func (c UpdatesClient) Delete(ctx context.Context, id UpdateId) (result DeleteOperationResponse, err error)

Delete ...

func (UpdatesClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (UpdatesClient) Get

func (c UpdatesClient) Get(ctx context.Context, id UpdateId) (result GetOperationResponse, err error)

Get ...

func (UpdatesClient) List

func (c UpdatesClient) List(ctx context.Context, id ClusterId) (result ListOperationResponse, err error)

List ...

func (UpdatesClient) ListComplete

func (c UpdatesClient) ListComplete(ctx context.Context, id ClusterId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (UpdatesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UpdatesClient) Post

func (c UpdatesClient) Post(ctx context.Context, id UpdateId) (result PostOperationResponse, err error)

Post ...

func (UpdatesClient) PostThenPoll

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

PostThenPoll performs Post then polls until it's completed

func (UpdatesClient) Put

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

Put ...

Jump to

Keyboard shortcuts

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