schedules

package
v0.20230204.1110518 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules Documentation

The schedules SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/schedules"

Client Initialization

client := schedules.NewSchedulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SchedulesClient.CreateOrUpdate

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue")

payload := schedules.Schedule{
	// ...
}


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

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "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: SchedulesClient.Execute

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue")

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

Example Usage: SchedulesClient.Get

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue")

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

Example Usage: SchedulesClient.List

ctx := context.TODO()
id := schedules.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue")

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

Example Usage: SchedulesClient.ListApplicable

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue")

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

Example Usage: SchedulesClient.Update

ctx := context.TODO()
id := schedules.NewLabScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "scheduleValue")

payload := schedules.UpdateResource{
	// ...
}


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 PossibleValuesForEnableStatus

func PossibleValuesForEnableStatus() []string

func ValidateLabID

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

ValidateLabID checks that 'input' can be parsed as a Lab ID

func ValidateLabScheduleID

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

ValidateLabScheduleID checks that 'input' can be parsed as a Lab Schedule ID

Types

type CreateOrUpdateOperationResponse

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

type DayDetails

type DayDetails struct {
	Time *string `json:"time,omitempty"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type EnableStatus

type EnableStatus string
const (
	EnableStatusDisabled EnableStatus = "Disabled"
	EnableStatusEnabled  EnableStatus = "Enabled"
)

type ExecuteOperationResponse

type ExecuteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

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

type HourDetails

type HourDetails struct {
	Minute *int64 `json:"minute,omitempty"`
}

type LabId

type LabId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
}

LabId is a struct representing the Resource ID for a Lab

func NewLabID

func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId

NewLabID returns a new LabId struct

func ParseLabID

func ParseLabID(input string) (*LabId, error)

ParseLabID parses 'input' into a LabId

func ParseLabIDInsensitively

func ParseLabIDInsensitively(input string) (*LabId, error)

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

func (LabId) ID

func (id LabId) ID() string

ID returns the formatted Lab ID

func (LabId) Segments

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

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

func (LabId) String

func (id LabId) String() string

String returns a human-readable description of this Lab ID

type LabScheduleId

type LabScheduleId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	ScheduleName      string
}

LabScheduleId is a struct representing the Resource ID for a Lab Schedule

func NewLabScheduleID

func NewLabScheduleID(subscriptionId string, resourceGroupName string, labName string, scheduleName string) LabScheduleId

NewLabScheduleID returns a new LabScheduleId struct

func ParseLabScheduleID

func ParseLabScheduleID(input string) (*LabScheduleId, error)

ParseLabScheduleID parses 'input' into a LabScheduleId

func ParseLabScheduleIDInsensitively

func ParseLabScheduleIDInsensitively(input string) (*LabScheduleId, error)

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

func (LabScheduleId) ID

func (id LabScheduleId) ID() string

ID returns the formatted Lab Schedule ID

func (LabScheduleId) Segments

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

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

func (LabScheduleId) String

func (id LabScheduleId) String() string

String returns a human-readable description of this Lab Schedule ID

type ListApplicableCompleteResult

type ListApplicableCompleteResult struct {
	Items []Schedule
}

type ListApplicableOperationResponse

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

func (ListApplicableOperationResponse) HasMore

func (ListApplicableOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Schedule
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type NotificationSettings

type NotificationSettings struct {
	EmailRecipient     *string       `json:"emailRecipient,omitempty"`
	NotificationLocale *string       `json:"notificationLocale,omitempty"`
	Status             *EnableStatus `json:"status,omitempty"`
	TimeInMinutes      *int64        `json:"timeInMinutes,omitempty"`
	WebhookUrl         *string       `json:"webhookUrl,omitempty"`
}

type Schedule

type Schedule struct {
	Id         *string            `json:"id,omitempty"`
	Location   *string            `json:"location,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties ScheduleProperties `json:"properties"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type ScheduleOperationPredicate

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

func (ScheduleOperationPredicate) Matches

func (p ScheduleOperationPredicate) Matches(input Schedule) bool

type ScheduleProperties

type ScheduleProperties struct {
	CreatedDate          *string               `json:"createdDate,omitempty"`
	DailyRecurrence      *DayDetails           `json:"dailyRecurrence,omitempty"`
	HourlyRecurrence     *HourDetails          `json:"hourlyRecurrence,omitempty"`
	NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"`
	ProvisioningState    *string               `json:"provisioningState,omitempty"`
	Status               *EnableStatus         `json:"status,omitempty"`
	TargetResourceId     *string               `json:"targetResourceId,omitempty"`
	TaskType             *string               `json:"taskType,omitempty"`
	TimeZoneId           *string               `json:"timeZoneId,omitempty"`
	UniqueIdentifier     *string               `json:"uniqueIdentifier,omitempty"`
	WeeklyRecurrence     *WeekDetails          `json:"weeklyRecurrence,omitempty"`
}

func (*ScheduleProperties) GetCreatedDateAsTime

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

func (*ScheduleProperties) SetCreatedDateAsTime

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

type SchedulesClient

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

func NewSchedulesClientWithBaseURI

func NewSchedulesClientWithBaseURI(endpoint string) SchedulesClient

func (SchedulesClient) CreateOrUpdate

func (c SchedulesClient) CreateOrUpdate(ctx context.Context, id LabScheduleId, input Schedule) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SchedulesClient) Delete

Delete ...

func (SchedulesClient) Execute

Execute ...

func (SchedulesClient) ExecuteThenPoll

func (c SchedulesClient) ExecuteThenPoll(ctx context.Context, id LabScheduleId) error

ExecuteThenPoll performs Execute then polls until it's completed

func (SchedulesClient) Get

Get ...

func (SchedulesClient) List

List ...

func (SchedulesClient) ListApplicable

func (c SchedulesClient) ListApplicable(ctx context.Context, id LabScheduleId) (resp ListApplicableOperationResponse, err error)

ListApplicable ...

func (SchedulesClient) ListApplicableComplete

func (c SchedulesClient) ListApplicableComplete(ctx context.Context, id LabScheduleId) (ListApplicableCompleteResult, error)

ListApplicableComplete retrieves all of the results into a single object

func (SchedulesClient) ListApplicableCompleteMatchingPredicate

func (c SchedulesClient) ListApplicableCompleteMatchingPredicate(ctx context.Context, id LabScheduleId, predicate ScheduleOperationPredicate) (resp ListApplicableCompleteResult, err error)

ListApplicableCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SchedulesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (SchedulesClient) ListCompleteMatchingPredicate

func (c SchedulesClient) ListCompleteMatchingPredicate(ctx context.Context, id LabId, options ListOperationOptions, predicate ScheduleOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SchedulesClient) Update

Update ...

type UpdateOperationResponse

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

type UpdateResource

type UpdateResource struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type WeekDetails

type WeekDetails struct {
	Time     *string   `json:"time,omitempty"`
	Weekdays *[]string `json:"weekdays,omitempty"`
}

Jump to

Keyboard shortcuts

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