maintenances

package
v0.20240903.1111904 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances Documentation

The maintenances SDK allows for interaction with the Azure Resource Manager Service mysql (API Version 2023-12-30).

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/mysql/2023-12-30/maintenances"

Client Initialization

client := maintenances.NewMaintenancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MaintenancesClient.List

ctx := context.TODO()
id := maintenances.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue")

// 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: MaintenancesClient.Read

ctx := context.TODO()
id := maintenances.NewMaintenanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "maintenanceValue")

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

Example Usage: MaintenancesClient.Update

ctx := context.TODO()
id := maintenances.NewMaintenanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "maintenanceValue")

payload := maintenances.MaintenanceUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForMaintenanceProvisioningState

func PossibleValuesForMaintenanceProvisioningState() []string

func PossibleValuesForMaintenanceState

func PossibleValuesForMaintenanceState() []string

func PossibleValuesForMaintenanceType

func PossibleValuesForMaintenanceType() []string

func ValidateFlexibleServerID

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

ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID

func ValidateMaintenanceID

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

ValidateMaintenanceID checks that 'input' can be parsed as a Maintenance ID

Types

type FlexibleServerId

type FlexibleServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
}

FlexibleServerId is a struct representing the Resource ID for a Flexible Server

func NewFlexibleServerID

func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId

NewFlexibleServerID returns a new FlexibleServerId struct

func ParseFlexibleServerID

func ParseFlexibleServerID(input string) (*FlexibleServerId, error)

ParseFlexibleServerID parses 'input' into a FlexibleServerId

func ParseFlexibleServerIDInsensitively

func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error)

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

func (*FlexibleServerId) FromParseResult

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

func (FlexibleServerId) ID

func (id FlexibleServerId) ID() string

ID returns the formatted Flexible Server ID

func (FlexibleServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID

func (FlexibleServerId) String

func (id FlexibleServerId) String() string

String returns a human-readable description of this Flexible Server ID

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

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

type Maintenance

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

type MaintenanceId

type MaintenanceId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
	MaintenanceName    string
}

MaintenanceId is a struct representing the Resource ID for a Maintenance

func NewMaintenanceID

func NewMaintenanceID(subscriptionId string, resourceGroupName string, flexibleServerName string, maintenanceName string) MaintenanceId

NewMaintenanceID returns a new MaintenanceId struct

func ParseMaintenanceID

func ParseMaintenanceID(input string) (*MaintenanceId, error)

ParseMaintenanceID parses 'input' into a MaintenanceId

func ParseMaintenanceIDInsensitively

func ParseMaintenanceIDInsensitively(input string) (*MaintenanceId, error)

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

func (*MaintenanceId) FromParseResult

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

func (MaintenanceId) ID

func (id MaintenanceId) ID() string

ID returns the formatted Maintenance ID

func (MaintenanceId) Segments

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

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

func (MaintenanceId) String

func (id MaintenanceId) String() string

String returns a human-readable description of this Maintenance ID

type MaintenanceOperationPredicate

type MaintenanceOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (MaintenanceOperationPredicate) Matches

type MaintenanceProperties

type MaintenanceProperties struct {
	MaintenanceAvailableScheduleMaxTime *string                       `json:"maintenanceAvailableScheduleMaxTime,omitempty"`
	MaintenanceAvailableScheduleMinTime *string                       `json:"maintenanceAvailableScheduleMinTime,omitempty"`
	MaintenanceDescription              *string                       `json:"maintenanceDescription,omitempty"`
	MaintenanceEndTime                  *string                       `json:"maintenanceEndTime,omitempty"`
	MaintenanceExecutionEndTime         *string                       `json:"maintenanceExecutionEndTime,omitempty"`
	MaintenanceExecutionStartTime       *string                       `json:"maintenanceExecutionStartTime,omitempty"`
	MaintenanceStartTime                *string                       `json:"maintenanceStartTime,omitempty"`
	MaintenanceState                    *MaintenanceState             `json:"maintenanceState,omitempty"`
	MaintenanceTitle                    *string                       `json:"maintenanceTitle,omitempty"`
	MaintenanceType                     *MaintenanceType              `json:"maintenanceType,omitempty"`
	ProvisioningState                   *MaintenanceProvisioningState `json:"provisioningState,omitempty"`
}

func (*MaintenanceProperties) GetMaintenanceAvailableScheduleMaxTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceAvailableScheduleMaxTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) GetMaintenanceAvailableScheduleMinTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceAvailableScheduleMinTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) GetMaintenanceEndTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceEndTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) GetMaintenanceExecutionEndTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceExecutionEndTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) GetMaintenanceExecutionStartTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceExecutionStartTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) GetMaintenanceStartTimeAsTime

func (o *MaintenanceProperties) GetMaintenanceStartTimeAsTime() (*time.Time, error)

func (*MaintenanceProperties) SetMaintenanceAvailableScheduleMaxTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceAvailableScheduleMaxTimeAsTime(input time.Time)

func (*MaintenanceProperties) SetMaintenanceAvailableScheduleMinTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceAvailableScheduleMinTimeAsTime(input time.Time)

func (*MaintenanceProperties) SetMaintenanceEndTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceEndTimeAsTime(input time.Time)

func (*MaintenanceProperties) SetMaintenanceExecutionEndTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceExecutionEndTimeAsTime(input time.Time)

func (*MaintenanceProperties) SetMaintenanceExecutionStartTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceExecutionStartTimeAsTime(input time.Time)

func (*MaintenanceProperties) SetMaintenanceStartTimeAsTime

func (o *MaintenanceProperties) SetMaintenanceStartTimeAsTime(input time.Time)

type MaintenancePropertiesForUpdate

type MaintenancePropertiesForUpdate struct {
	MaintenanceStartTime *string `json:"maintenanceStartTime,omitempty"`
}

func (*MaintenancePropertiesForUpdate) GetMaintenanceStartTimeAsTime

func (o *MaintenancePropertiesForUpdate) GetMaintenanceStartTimeAsTime() (*time.Time, error)

func (*MaintenancePropertiesForUpdate) SetMaintenanceStartTimeAsTime

func (o *MaintenancePropertiesForUpdate) SetMaintenanceStartTimeAsTime(input time.Time)

type MaintenanceProvisioningState

type MaintenanceProvisioningState string
const (
	MaintenanceProvisioningStateCreating  MaintenanceProvisioningState = "Creating"
	MaintenanceProvisioningStateDeleting  MaintenanceProvisioningState = "Deleting"
	MaintenanceProvisioningStateFailed    MaintenanceProvisioningState = "Failed"
	MaintenanceProvisioningStateSucceeded MaintenanceProvisioningState = "Succeeded"
)

func (*MaintenanceProvisioningState) UnmarshalJSON

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

type MaintenanceState

type MaintenanceState string
const (
	MaintenanceStateCanceled      MaintenanceState = "Canceled"
	MaintenanceStateCompleted     MaintenanceState = "Completed"
	MaintenanceStateInPreparation MaintenanceState = "InPreparation"
	MaintenanceStateProcessing    MaintenanceState = "Processing"
	MaintenanceStateReScheduled   MaintenanceState = "ReScheduled"
	MaintenanceStateScheduled     MaintenanceState = "Scheduled"
)

func (*MaintenanceState) UnmarshalJSON

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

type MaintenanceType

type MaintenanceType string
const (
	MaintenanceTypeHotFixes            MaintenanceType = "HotFixes"
	MaintenanceTypeMinorVersionUpgrade MaintenanceType = "MinorVersionUpgrade"
	MaintenanceTypeRoutineMaintenance  MaintenanceType = "RoutineMaintenance"
	MaintenanceTypeSecurityPatches     MaintenanceType = "SecurityPatches"
)

func (*MaintenanceType) UnmarshalJSON

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

type MaintenanceUpdate

type MaintenanceUpdate struct {
	Properties *MaintenancePropertiesForUpdate `json:"properties,omitempty"`
}

type MaintenancesClient

type MaintenancesClient struct {
	Client *resourcemanager.Client
}

func NewMaintenancesClientWithBaseURI

func NewMaintenancesClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenancesClient, error)

func (MaintenancesClient) List

List ...

func (MaintenancesClient) ListComplete

ListComplete retrieves all the results into a single object

func (MaintenancesClient) ListCompleteMatchingPredicate

func (c MaintenancesClient) ListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate MaintenanceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MaintenancesClient) Read

Read ...

func (MaintenancesClient) Update

Update ...

func (MaintenancesClient) UpdateThenPoll

func (c MaintenancesClient) UpdateThenPoll(ctx context.Context, id MaintenanceId, input MaintenanceUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ReadOperationResponse

type ReadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Maintenance
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Maintenance
}

Jump to

Keyboard shortcuts

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