virtualmachineschedules

package
v0.20230815.1145621 Latest Latest
Warning

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

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

README

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

The virtualmachineschedules 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/virtualmachineschedules"

Client Initialization

client := virtualmachineschedules.NewVirtualMachineSchedulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineSchedulesClient.CreateOrUpdate

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

payload := virtualmachineschedules.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: VirtualMachineSchedulesClient.Delete

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

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

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

Example Usage: VirtualMachineSchedulesClient.Get

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

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

Example Usage: VirtualMachineSchedulesClient.List

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

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

Example Usage: VirtualMachineSchedulesClient.Update

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

payload := virtualmachineschedules.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 ValidateVirtualMachineID

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

ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID

func ValidateVirtualMachineScheduleID

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

ValidateVirtualMachineScheduleID checks that 'input' can be parsed as a Virtual Machine 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 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 UpdateOperationResponse

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

type UpdateResource

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

type VirtualMachineId

type VirtualMachineId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LabName            string
	VirtualMachineName string
}

VirtualMachineId is a struct representing the Resource ID for a Virtual Machine

func NewVirtualMachineID

func NewVirtualMachineID(subscriptionId string, resourceGroupName string, labName string, virtualMachineName string) VirtualMachineId

NewVirtualMachineID returns a new VirtualMachineId struct

func ParseVirtualMachineID

func ParseVirtualMachineID(input string) (*VirtualMachineId, error)

ParseVirtualMachineID parses 'input' into a VirtualMachineId

func ParseVirtualMachineIDInsensitively

func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error)

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

func (VirtualMachineId) ID

func (id VirtualMachineId) ID() string

ID returns the formatted Virtual Machine ID

func (VirtualMachineId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine ID

func (VirtualMachineId) String

func (id VirtualMachineId) String() string

String returns a human-readable description of this Virtual Machine ID

type VirtualMachineScheduleId

type VirtualMachineScheduleId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LabName            string
	VirtualMachineName string
	ScheduleName       string
}

VirtualMachineScheduleId is a struct representing the Resource ID for a Virtual Machine Schedule

func NewVirtualMachineScheduleID

func NewVirtualMachineScheduleID(subscriptionId string, resourceGroupName string, labName string, virtualMachineName string, scheduleName string) VirtualMachineScheduleId

NewVirtualMachineScheduleID returns a new VirtualMachineScheduleId struct

func ParseVirtualMachineScheduleID

func ParseVirtualMachineScheduleID(input string) (*VirtualMachineScheduleId, error)

ParseVirtualMachineScheduleID parses 'input' into a VirtualMachineScheduleId

func ParseVirtualMachineScheduleIDInsensitively

func ParseVirtualMachineScheduleIDInsensitively(input string) (*VirtualMachineScheduleId, error)

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

func (VirtualMachineScheduleId) ID

ID returns the formatted Virtual Machine Schedule ID

func (VirtualMachineScheduleId) Segments

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

func (VirtualMachineScheduleId) String

func (id VirtualMachineScheduleId) String() string

String returns a human-readable description of this Virtual Machine Schedule ID

type VirtualMachineSchedulesClient

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

func NewVirtualMachineSchedulesClientWithBaseURI

func NewVirtualMachineSchedulesClientWithBaseURI(endpoint string) VirtualMachineSchedulesClient

func (VirtualMachineSchedulesClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualMachineSchedulesClient) Delete

Delete ...

func (VirtualMachineSchedulesClient) Execute

Execute ...

func (VirtualMachineSchedulesClient) ExecuteThenPoll

ExecuteThenPoll performs Execute then polls until it's completed

func (VirtualMachineSchedulesClient) Get

Get ...

func (VirtualMachineSchedulesClient) List

List ...

func (VirtualMachineSchedulesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (VirtualMachineSchedulesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (VirtualMachineSchedulesClient) Update

Update ...

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