updates

package
v0.20240327.1161949 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The updates 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/updates"

Client Initialization

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

Example Usage: UpdatesClient.List

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

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

Example Usage: UpdatesClient.ListParent

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

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

func PossibleValuesForImpactType() []string

func PossibleValuesForMaintenanceScope

func PossibleValuesForMaintenanceScope() []string

func PossibleValuesForUpdateStatus

func PossibleValuesForUpdateStatus() []string

Types

type ImpactType

type ImpactType string
const (
	ImpactTypeFreeze   ImpactType = "Freeze"
	ImpactTypeNone     ImpactType = "None"
	ImpactTypeRedeploy ImpactType = "Redeploy"
	ImpactTypeRestart  ImpactType = "Restart"
)

func (*ImpactType) UnmarshalJSON added in v0.20240208.1165011

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ListUpdatesResult
}

type ListParentOperationResponse

type ListParentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ListUpdatesResult
}

type ListUpdatesResult

type ListUpdatesResult struct {
	Value *[]Update `json:"value,omitempty"`
}

type MaintenanceScope

type MaintenanceScope string
const (
	MaintenanceScopeExtension          MaintenanceScope = "Extension"
	MaintenanceScopeHost               MaintenanceScope = "Host"
	MaintenanceScopeInGuestPatch       MaintenanceScope = "InGuestPatch"
	MaintenanceScopeOSImage            MaintenanceScope = "OSImage"
	MaintenanceScopeResource           MaintenanceScope = "Resource"
	MaintenanceScopeSQLDB              MaintenanceScope = "SQLDB"
	MaintenanceScopeSQLManagedInstance MaintenanceScope = "SQLManagedInstance"
)

func (*MaintenanceScope) UnmarshalJSON added in v0.20240208.1165011

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

type Update

type Update struct {
	ImpactDurationInSec *int64            `json:"impactDurationInSec,omitempty"`
	ImpactType          *ImpactType       `json:"impactType,omitempty"`
	MaintenanceScope    *MaintenanceScope `json:"maintenanceScope,omitempty"`
	NotBefore           *string           `json:"notBefore,omitempty"`
	Properties          *UpdateProperties `json:"properties,omitempty"`
	Status              *UpdateStatus     `json:"status,omitempty"`
}

func (*Update) GetNotBeforeAsTime

func (o *Update) GetNotBeforeAsTime() (*time.Time, error)

func (*Update) SetNotBeforeAsTime

func (o *Update) SetNotBeforeAsTime(input time.Time)

type UpdateProperties

type UpdateProperties struct {
	ResourceId *string `json:"resourceId,omitempty"`
}

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

type UpdatesClient

type UpdatesClient struct {
	Client *resourcemanager.Client
}

func NewUpdatesClientWithBaseURI

func NewUpdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdatesClient, error)

func (UpdatesClient) List

List ...

func (UpdatesClient) ListParent

func (c UpdatesClient) ListParent(ctx context.Context, id commonids.ScopeId) (result ListParentOperationResponse, err error)

ListParent ...

Jump to

Keyboard shortcuts

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