schedule

package
v0.20230214.1105615 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/schedule Documentation

The schedule SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2022-08-08).

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/automation/2022-08-08/schedule"

Client Initialization

client := schedule.NewScheduleClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScheduleClient.CreateOrUpdate

ctx := context.TODO()
id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "scheduleValue")

payload := schedule.ScheduleCreateOrUpdateParameters{
	// ...
}


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: ScheduleClient.Delete

ctx := context.TODO()
id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "scheduleValue")

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: ScheduleClient.Get

ctx := context.TODO()
id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "scheduleValue")

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: ScheduleClient.ListByAutomationAccount

ctx := context.TODO()
id := schedule.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: ScheduleClient.Update

ctx := context.TODO()
id := schedule.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "scheduleValue")

payload := schedule.ScheduleUpdateParameters{
	// ...
}


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

func PossibleValuesForScheduleDay() []string

func PossibleValuesForScheduleFrequency

func PossibleValuesForScheduleFrequency() []string

func ValidateAutomationAccountID

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

ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID

func ValidateScheduleID

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

ValidateScheduleID checks that 'input' can be parsed as a Schedule ID

Types

type AdvancedSchedule

type AdvancedSchedule struct {
	MonthDays          *[]int64                             `json:"monthDays,omitempty"`
	MonthlyOccurrences *[]AdvancedScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"`
	WeekDays           *[]string                            `json:"weekDays,omitempty"`
}

type AdvancedScheduleMonthlyOccurrence

type AdvancedScheduleMonthlyOccurrence struct {
	Day        *ScheduleDay `json:"day,omitempty"`
	Occurrence *int64       `json:"occurrence,omitempty"`
}

type AutomationAccountId

type AutomationAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
}

AutomationAccountId is a struct representing the Resource ID for a Automation Account

func NewAutomationAccountID

func NewAutomationAccountID(subscriptionId string, resourceGroupName string, automationAccountName string) AutomationAccountId

NewAutomationAccountID returns a new AutomationAccountId struct

func ParseAutomationAccountID

func ParseAutomationAccountID(input string) (*AutomationAccountId, error)

ParseAutomationAccountID parses 'input' into a AutomationAccountId

func ParseAutomationAccountIDInsensitively

func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, error)

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

func (AutomationAccountId) ID

func (id AutomationAccountId) ID() string

ID returns the formatted Automation Account ID

func (AutomationAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Automation Account ID

func (AutomationAccountId) String

func (id AutomationAccountId) String() string

String returns a human-readable description of this Automation Account ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Schedule
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Schedule
}

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	Items []Schedule
}

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Schedule
	// contains filtered or unexported fields
}

func (ListByAutomationAccountOperationResponse) HasMore

func (ListByAutomationAccountOperationResponse) LoadMore

type Schedule

type Schedule struct {
	Id         *string             `json:"id,omitempty"`
	Name       *string             `json:"name,omitempty"`
	Properties *ScheduleProperties `json:"properties,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type ScheduleClient

type ScheduleClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewScheduleClientWithBaseURI

func NewScheduleClientWithBaseURI(endpoint string) ScheduleClient

func (ScheduleClient) CreateOrUpdate

CreateOrUpdate ...

func (ScheduleClient) Delete

func (c ScheduleClient) Delete(ctx context.Context, id ScheduleId) (result DeleteOperationResponse, err error)

Delete ...

func (ScheduleClient) Get

func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOperationResponse, err error)

Get ...

func (ScheduleClient) ListByAutomationAccount

ListByAutomationAccount ...

func (ScheduleClient) ListByAutomationAccountComplete

func (c ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, id AutomationAccountId) (ListByAutomationAccountCompleteResult, error)

ListByAutomationAccountComplete retrieves all of the results into a single object

func (ScheduleClient) ListByAutomationAccountCompleteMatchingPredicate

func (c ScheduleClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, predicate ScheduleOperationPredicate) (resp ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScheduleClient) Update

Update ...

type ScheduleCreateOrUpdateParameters

type ScheduleCreateOrUpdateParameters struct {
	Name       string                           `json:"name"`
	Properties ScheduleCreateOrUpdateProperties `json:"properties"`
}

type ScheduleCreateOrUpdateProperties

type ScheduleCreateOrUpdateProperties struct {
	AdvancedSchedule *AdvancedSchedule `json:"advancedSchedule,omitempty"`
	Description      *string           `json:"description,omitempty"`
	ExpiryTime       *string           `json:"expiryTime,omitempty"`
	Frequency        ScheduleFrequency `json:"frequency"`
	Interval         *interface{}      `json:"interval,omitempty"`
	StartTime        string            `json:"startTime"`
	TimeZone         *string           `json:"timeZone,omitempty"`
}

func (*ScheduleCreateOrUpdateProperties) GetExpiryTimeAsTime

func (o *ScheduleCreateOrUpdateProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*ScheduleCreateOrUpdateProperties) GetStartTimeAsTime

func (o *ScheduleCreateOrUpdateProperties) GetStartTimeAsTime() (*time.Time, error)

func (*ScheduleCreateOrUpdateProperties) SetExpiryTimeAsTime

func (o *ScheduleCreateOrUpdateProperties) SetExpiryTimeAsTime(input time.Time)

func (*ScheduleCreateOrUpdateProperties) SetStartTimeAsTime

func (o *ScheduleCreateOrUpdateProperties) SetStartTimeAsTime(input time.Time)

type ScheduleDay

type ScheduleDay string
const (
	ScheduleDayFriday    ScheduleDay = "Friday"
	ScheduleDayMonday    ScheduleDay = "Monday"
	ScheduleDaySaturday  ScheduleDay = "Saturday"
	ScheduleDaySunday    ScheduleDay = "Sunday"
	ScheduleDayThursday  ScheduleDay = "Thursday"
	ScheduleDayTuesday   ScheduleDay = "Tuesday"
	ScheduleDayWednesday ScheduleDay = "Wednesday"
)

type ScheduleFrequency

type ScheduleFrequency string
const (
	ScheduleFrequencyDay     ScheduleFrequency = "Day"
	ScheduleFrequencyHour    ScheduleFrequency = "Hour"
	ScheduleFrequencyMinute  ScheduleFrequency = "Minute"
	ScheduleFrequencyMonth   ScheduleFrequency = "Month"
	ScheduleFrequencyOneTime ScheduleFrequency = "OneTime"
	ScheduleFrequencyWeek    ScheduleFrequency = "Week"
)

type ScheduleId

type ScheduleId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	ScheduleName          string
}

ScheduleId is a struct representing the Resource ID for a Schedule

func NewScheduleID

func NewScheduleID(subscriptionId string, resourceGroupName string, automationAccountName string, scheduleName string) ScheduleId

NewScheduleID returns a new ScheduleId struct

func ParseScheduleID

func ParseScheduleID(input string) (*ScheduleId, error)

ParseScheduleID parses 'input' into a ScheduleId

func ParseScheduleIDInsensitively

func ParseScheduleIDInsensitively(input string) (*ScheduleId, error)

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

func (ScheduleId) ID

func (id ScheduleId) ID() string

ID returns the formatted Schedule ID

func (ScheduleId) Segments

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

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

func (ScheduleId) String

func (id ScheduleId) String() string

String returns a human-readable description of this Schedule ID

type ScheduleOperationPredicate

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

func (ScheduleOperationPredicate) Matches

func (p ScheduleOperationPredicate) Matches(input Schedule) bool

type ScheduleProperties

type ScheduleProperties struct {
	AdvancedSchedule        *AdvancedSchedule  `json:"advancedSchedule,omitempty"`
	CreationTime            *string            `json:"creationTime,omitempty"`
	Description             *string            `json:"description,omitempty"`
	ExpiryTime              *string            `json:"expiryTime,omitempty"`
	ExpiryTimeOffsetMinutes *float64           `json:"expiryTimeOffsetMinutes,omitempty"`
	Frequency               *ScheduleFrequency `json:"frequency,omitempty"`
	Interval                *interface{}       `json:"interval,omitempty"`
	IsEnabled               *bool              `json:"isEnabled,omitempty"`
	LastModifiedTime        *string            `json:"lastModifiedTime,omitempty"`
	NextRun                 *string            `json:"nextRun,omitempty"`
	NextRunOffsetMinutes    *float64           `json:"nextRunOffsetMinutes,omitempty"`
	StartTime               *string            `json:"startTime,omitempty"`
	StartTimeOffsetMinutes  *float64           `json:"startTimeOffsetMinutes,omitempty"`
	TimeZone                *string            `json:"timeZone,omitempty"`
}

func (*ScheduleProperties) GetCreationTimeAsTime

func (o *ScheduleProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*ScheduleProperties) GetExpiryTimeAsTime

func (o *ScheduleProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*ScheduleProperties) GetLastModifiedTimeAsTime

func (o *ScheduleProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*ScheduleProperties) GetNextRunAsTime

func (o *ScheduleProperties) GetNextRunAsTime() (*time.Time, error)

func (*ScheduleProperties) GetStartTimeAsTime

func (o *ScheduleProperties) GetStartTimeAsTime() (*time.Time, error)

func (*ScheduleProperties) SetCreationTimeAsTime

func (o *ScheduleProperties) SetCreationTimeAsTime(input time.Time)

func (*ScheduleProperties) SetExpiryTimeAsTime

func (o *ScheduleProperties) SetExpiryTimeAsTime(input time.Time)

func (*ScheduleProperties) SetLastModifiedTimeAsTime

func (o *ScheduleProperties) SetLastModifiedTimeAsTime(input time.Time)

func (*ScheduleProperties) SetNextRunAsTime

func (o *ScheduleProperties) SetNextRunAsTime(input time.Time)

func (*ScheduleProperties) SetStartTimeAsTime

func (o *ScheduleProperties) SetStartTimeAsTime(input time.Time)

type ScheduleUpdateParameters

type ScheduleUpdateParameters struct {
	Name       *string                   `json:"name,omitempty"`
	Properties *ScheduleUpdateProperties `json:"properties,omitempty"`
}

type ScheduleUpdateProperties

type ScheduleUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	IsEnabled   *bool   `json:"isEnabled,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Schedule
}

Jump to

Keyboard shortcuts

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