schedule

package
v0.20241017.1093842 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MPL-2.0 Imports: 13 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 Azure Resource Manager 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", "automationAccountName", "scheduleName")

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", "automationAccountName", "scheduleName")

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", "automationAccountName", "scheduleName")

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", "automationAccountName")

// 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", "automationAccountName", "scheduleName")

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) FromParseResult

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

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
	OData        *odata.OData
	Model        *Schedule
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Schedule
}

type ListByAutomationAccountCustomPager added in v0.20240628.1153531

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

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Schedule
}

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 *resourcemanager.Client
}

func NewScheduleClientWithBaseURI

func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error)

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

func (c ScheduleClient) ListByAutomationAccount(ctx context.Context, id AutomationAccountId) (result ListByAutomationAccountOperationResponse, err error)

ListByAutomationAccount ...

func (ScheduleClient) ListByAutomationAccountComplete

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

ListByAutomationAccountComplete retrieves all the results into a single object

func (ScheduleClient) ListByAutomationAccountCompleteMatchingPredicate

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

ListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies 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"
)

func (*ScheduleDay) UnmarshalJSON

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

type ScheduleFrequency

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

func (*ScheduleFrequency) UnmarshalJSON

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

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) FromParseResult

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

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
	OData        *odata.OData
	Model        *Schedule
}

Jump to

Keyboard shortcuts

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