maintenanceconfigurations

package
v0.20240327.1133120 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: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-04-02-preview/maintenanceconfigurations Documentation

The maintenanceconfigurations SDK allows for interaction with the Azure Resource Manager Service containerservice (API Version 2023-04-02-preview).

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/containerservice/2023-04-02-preview/maintenanceconfigurations"

Client Initialization

client := maintenanceconfigurations.NewMaintenanceConfigurationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MaintenanceConfigurationsClient.CreateOrUpdate

ctx := context.TODO()
id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue")

payload := maintenanceconfigurations.MaintenanceConfiguration{
	// ...
}


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

Example Usage: MaintenanceConfigurationsClient.Delete

ctx := context.TODO()
id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue")

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

Example Usage: MaintenanceConfigurationsClient.Get

ctx := context.TODO()
id := maintenanceconfigurations.NewMaintenanceConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue", "maintenanceConfigurationValue")

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: MaintenanceConfigurationsClient.ListByManagedCluster

ctx := context.TODO()
id := commonids.NewKubernetesClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedClusterValue")

// alternatively `client.ListByManagedCluster(ctx, id)` can be used to do batched pagination
items, err := client.ListByManagedClusterComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForType

func PossibleValuesForType() []string

func PossibleValuesForWeekDay

func PossibleValuesForWeekDay() []string

func ValidateMaintenanceConfigurationID

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

ValidateMaintenanceConfigurationID checks that 'input' can be parsed as a Maintenance Configuration ID

Types

type AbsoluteMonthlySchedule

type AbsoluteMonthlySchedule struct {
	DayOfMonth     int64 `json:"dayOfMonth"`
	IntervalMonths int64 `json:"intervalMonths"`
}

type CreateOrUpdateOperationResponse

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

type DailySchedule

type DailySchedule struct {
	IntervalDays int64 `json:"intervalDays"`
}

type DateSpan

type DateSpan struct {
	End   string `json:"end"`
	Start string `json:"start"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListByManagedClusterCompleteResult

type ListByManagedClusterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MaintenanceConfiguration
}

type ListByManagedClusterOperationResponse

type ListByManagedClusterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MaintenanceConfiguration
}

type MaintenanceConfiguration

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

type MaintenanceConfigurationId

type MaintenanceConfigurationId struct {
	SubscriptionId               string
	ResourceGroupName            string
	ManagedClusterName           string
	MaintenanceConfigurationName string
}

MaintenanceConfigurationId is a struct representing the Resource ID for a Maintenance Configuration

func NewMaintenanceConfigurationID

func NewMaintenanceConfigurationID(subscriptionId string, resourceGroupName string, managedClusterName string, maintenanceConfigurationName string) MaintenanceConfigurationId

NewMaintenanceConfigurationID returns a new MaintenanceConfigurationId struct

func ParseMaintenanceConfigurationID

func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, error)

ParseMaintenanceConfigurationID parses 'input' into a MaintenanceConfigurationId

func ParseMaintenanceConfigurationIDInsensitively

func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceConfigurationId, error)

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

func (*MaintenanceConfigurationId) FromParseResult

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

func (MaintenanceConfigurationId) ID

ID returns the formatted Maintenance Configuration ID

func (MaintenanceConfigurationId) Segments

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

func (MaintenanceConfigurationId) String

func (id MaintenanceConfigurationId) String() string

String returns a human-readable description of this Maintenance Configuration ID

type MaintenanceConfigurationOperationPredicate

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

func (MaintenanceConfigurationOperationPredicate) Matches

type MaintenanceConfigurationProperties

type MaintenanceConfigurationProperties struct {
	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
	NotAllowedTime    *[]TimeSpan        `json:"notAllowedTime,omitempty"`
	TimeInWeek        *[]TimeInWeek      `json:"timeInWeek,omitempty"`
}

type MaintenanceConfigurationsClient

type MaintenanceConfigurationsClient struct {
	Client *resourcemanager.Client
}

func NewMaintenanceConfigurationsClientWithBaseURI

func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error)

func (MaintenanceConfigurationsClient) CreateOrUpdate

CreateOrUpdate ...

func (MaintenanceConfigurationsClient) Delete

Delete ...

func (MaintenanceConfigurationsClient) Get

Get ...

func (MaintenanceConfigurationsClient) ListByManagedCluster

ListByManagedCluster ...

func (MaintenanceConfigurationsClient) ListByManagedClusterComplete

ListByManagedClusterComplete retrieves all the results into a single object

func (MaintenanceConfigurationsClient) ListByManagedClusterCompleteMatchingPredicate

ListByManagedClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate

type MaintenanceWindow

type MaintenanceWindow struct {
	DurationHours   int64       `json:"durationHours"`
	NotAllowedDates *[]DateSpan `json:"notAllowedDates,omitempty"`
	Schedule        Schedule    `json:"schedule"`
	StartDate       *string     `json:"startDate,omitempty"`
	StartTime       string      `json:"startTime"`
	UtcOffset       *string     `json:"utcOffset,omitempty"`
}

type RelativeMonthlySchedule

type RelativeMonthlySchedule struct {
	DayOfWeek      WeekDay `json:"dayOfWeek"`
	IntervalMonths int64   `json:"intervalMonths"`
	WeekIndex      Type    `json:"weekIndex"`
}

type Schedule

type Schedule struct {
	AbsoluteMonthly *AbsoluteMonthlySchedule `json:"absoluteMonthly,omitempty"`
	Daily           *DailySchedule           `json:"daily,omitempty"`
	RelativeMonthly *RelativeMonthlySchedule `json:"relativeMonthly,omitempty"`
	Weekly          *WeeklySchedule          `json:"weekly,omitempty"`
}

type TimeInWeek

type TimeInWeek struct {
	Day       *WeekDay `json:"day,omitempty"`
	HourSlots *[]int64 `json:"hourSlots,omitempty"`
}

type TimeSpan

type TimeSpan struct {
	End   *string `json:"end,omitempty"`
	Start *string `json:"start,omitempty"`
}

func (*TimeSpan) GetEndAsTime

func (o *TimeSpan) GetEndAsTime() (*time.Time, error)

func (*TimeSpan) GetStartAsTime

func (o *TimeSpan) GetStartAsTime() (*time.Time, error)

func (*TimeSpan) SetEndAsTime

func (o *TimeSpan) SetEndAsTime(input time.Time)

func (*TimeSpan) SetStartAsTime

func (o *TimeSpan) SetStartAsTime(input time.Time)

type Type

type Type string
const (
	TypeFirst  Type = "First"
	TypeFourth Type = "Fourth"
	TypeLast   Type = "Last"
	TypeSecond Type = "Second"
	TypeThird  Type = "Third"
)

func (*Type) UnmarshalJSON added in v0.20240213.1120950

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

type WeekDay

type WeekDay string
const (
	WeekDayFriday    WeekDay = "Friday"
	WeekDayMonday    WeekDay = "Monday"
	WeekDaySaturday  WeekDay = "Saturday"
	WeekDaySunday    WeekDay = "Sunday"
	WeekDayThursday  WeekDay = "Thursday"
	WeekDayTuesday   WeekDay = "Tuesday"
	WeekDayWednesday WeekDay = "Wednesday"
)

func (*WeekDay) UnmarshalJSON added in v0.20240213.1120950

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

type WeeklySchedule

type WeeklySchedule struct {
	DayOfWeek     WeekDay `json:"dayOfWeek"`
	IntervalWeeks int64   `json:"intervalWeeks"`
}

Jump to

Keyboard shortcuts

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