applyupdates

package
v0.20240710.1114656 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/applyupdates Documentation

The applyupdates SDK allows for interaction with the Azure Resource Manager Service maintenance (API Version 2023-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/applyupdates"

Client Initialization

client := applyupdates.NewApplyUpdatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApplyUpdatesClient.CreateOrUpdate

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: ApplyUpdatesClient.CreateOrUpdateParent

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: ApplyUpdatesClient.Get

ctx := context.TODO()
id := applyupdates.NewScopedApplyUpdateID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "applyUpdateValue")

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: ApplyUpdatesClient.GetParent

ctx := context.TODO()
id := applyupdates.NewScopedApplyUpdateID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "applyUpdateValue")

read, err := client.GetParent(ctx, id)
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 PossibleValuesForUpdateStatus

func PossibleValuesForUpdateStatus() []string

func ValidateScopedApplyUpdateID

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

ValidateScopedApplyUpdateID checks that 'input' can be parsed as a Scoped Apply Update ID

Types

type ApplyUpdate

type ApplyUpdate struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ApplyUpdateProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ApplyUpdateProperties

type ApplyUpdateProperties struct {
	LastUpdateTime *string       `json:"lastUpdateTime,omitempty"`
	ResourceId     *string       `json:"resourceId,omitempty"`
	Status         *UpdateStatus `json:"status,omitempty"`
}

func (*ApplyUpdateProperties) GetLastUpdateTimeAsTime

func (o *ApplyUpdateProperties) GetLastUpdateTimeAsTime() (*time.Time, error)

func (*ApplyUpdateProperties) SetLastUpdateTimeAsTime

func (o *ApplyUpdateProperties) SetLastUpdateTimeAsTime(input time.Time)

type ApplyUpdatesClient

type ApplyUpdatesClient struct {
	Client *resourcemanager.Client
}

func NewApplyUpdatesClientWithBaseURI

func NewApplyUpdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplyUpdatesClient, error)

func (ApplyUpdatesClient) CreateOrUpdate

CreateOrUpdate ...

func (ApplyUpdatesClient) CreateOrUpdateParent

func (c ApplyUpdatesClient) CreateOrUpdateParent(ctx context.Context, id commonids.ScopeId) (result CreateOrUpdateParentOperationResponse, err error)

CreateOrUpdateParent ...

func (ApplyUpdatesClient) Get

Get ...

func (ApplyUpdatesClient) GetParent

GetParent ...

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplyUpdate
}

type CreateOrUpdateParentOperationResponse

type CreateOrUpdateParentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplyUpdate
}

type GetOperationResponse

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

type GetParentOperationResponse

type GetParentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplyUpdate
}

type ScopedApplyUpdateId

type ScopedApplyUpdateId struct {
	Scope           string
	ApplyUpdateName string
}

ScopedApplyUpdateId is a struct representing the Resource ID for a Scoped Apply Update

func NewScopedApplyUpdateID

func NewScopedApplyUpdateID(scope string, applyUpdateName string) ScopedApplyUpdateId

NewScopedApplyUpdateID returns a new ScopedApplyUpdateId struct

func ParseScopedApplyUpdateID

func ParseScopedApplyUpdateID(input string) (*ScopedApplyUpdateId, error)

ParseScopedApplyUpdateID parses 'input' into a ScopedApplyUpdateId

func ParseScopedApplyUpdateIDInsensitively

func ParseScopedApplyUpdateIDInsensitively(input string) (*ScopedApplyUpdateId, error)

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

func (*ScopedApplyUpdateId) FromParseResult

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

func (ScopedApplyUpdateId) ID

func (id ScopedApplyUpdateId) ID() string

ID returns the formatted Scoped Apply Update ID

func (ScopedApplyUpdateId) Segments

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

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

func (ScopedApplyUpdateId) String

func (id ScopedApplyUpdateId) String() string

String returns a human-readable description of this Scoped Apply Update ID

type UpdateStatus

type UpdateStatus string
const (
	UpdateStatusCompleted  UpdateStatus = "Completed"
	UpdateStatusInProgress UpdateStatus = "InProgress"
	UpdateStatusPending    UpdateStatus = "Pending"
	UpdateStatusRetryLater UpdateStatus = "RetryLater"
	UpdateStatusRetryNow   UpdateStatus = "RetryNow"
)

func (*UpdateStatus) UnmarshalJSON added in v0.20240208.1165011

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

Jump to

Keyboard shortcuts

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