schedules

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/schedules Documentation

The schedules SDK allows for interaction with Azure Resource Manager devcenter (API Version 2024-02-01).

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/devcenter/2024-02-01/schedules"

Client Initialization

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

Example Usage: SchedulesClient.CreateOrUpdate

ctx := context.TODO()
id := schedules.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectName", "poolName", "scheduleName")

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


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

Example Usage: SchedulesClient.Delete

ctx := context.TODO()
id := schedules.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectName", "poolName", "scheduleName")

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

Example Usage: SchedulesClient.Get

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

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

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

Example Usage: SchedulesClient.Update

ctx := context.TODO()
id := schedules.NewScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectName", "poolName", "scheduleName")

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForScheduleEnableStatus

func PossibleValuesForScheduleEnableStatus() []string

func PossibleValuesForScheduledFrequency

func PossibleValuesForScheduledFrequency() []string

func PossibleValuesForScheduledType

func PossibleValuesForScheduledType() []string

func ValidatePoolID

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

ValidatePoolID checks that 'input' can be parsed as a Pool 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Schedule
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByPoolCompleteResult

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

type ListByPoolCustomPager added in v0.20240628.1153531

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

type ListByPoolOperationResponse

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

type PoolId

type PoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
	PoolName          string
}

PoolId is a struct representing the Resource ID for a Pool

func NewPoolID

func NewPoolID(subscriptionId string, resourceGroupName string, projectName string, poolName string) PoolId

NewPoolID returns a new PoolId struct

func ParsePoolID

func ParsePoolID(input string) (*PoolId, error)

ParsePoolID parses 'input' into a PoolId

func ParsePoolIDInsensitively

func ParsePoolIDInsensitively(input string) (*PoolId, error)

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

func (*PoolId) FromParseResult

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

func (PoolId) ID

func (id PoolId) ID() string

ID returns the formatted Pool ID

func (PoolId) Segments

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

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

func (PoolId) String

func (id PoolId) String() string

String returns a human-readable description of this Pool ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	ProvisioningStateUpdating                  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type Schedule

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

type ScheduleEnableStatus

type ScheduleEnableStatus string
const (
	ScheduleEnableStatusDisabled ScheduleEnableStatus = "Disabled"
	ScheduleEnableStatusEnabled  ScheduleEnableStatus = "Enabled"
)

func (*ScheduleEnableStatus) UnmarshalJSON

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

type ScheduleId

type ScheduleId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
	PoolName          string
	ScheduleName      string
}

ScheduleId is a struct representing the Resource ID for a Schedule

func NewScheduleID

func NewScheduleID(subscriptionId string, resourceGroupName string, projectName string, poolName 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 {
	Frequency         *ScheduledFrequency   `json:"frequency,omitempty"`
	Location          *string               `json:"location,omitempty"`
	ProvisioningState *ProvisioningState    `json:"provisioningState,omitempty"`
	State             *ScheduleEnableStatus `json:"state,omitempty"`
	Tags              *map[string]string    `json:"tags,omitempty"`
	Time              *string               `json:"time,omitempty"`
	TimeZone          *string               `json:"timeZone,omitempty"`
	Type              *ScheduledType        `json:"type,omitempty"`
}

type ScheduleUpdate

type ScheduleUpdate struct {
	Properties *ScheduleUpdateProperties `json:"properties,omitempty"`
}

type ScheduleUpdateProperties

type ScheduleUpdateProperties struct {
	Frequency *ScheduledFrequency   `json:"frequency,omitempty"`
	Location  *string               `json:"location,omitempty"`
	State     *ScheduleEnableStatus `json:"state,omitempty"`
	Tags      *map[string]string    `json:"tags,omitempty"`
	Time      *string               `json:"time,omitempty"`
	TimeZone  *string               `json:"timeZone,omitempty"`
	Type      *ScheduledType        `json:"type,omitempty"`
}

type ScheduledFrequency

type ScheduledFrequency string
const (
	ScheduledFrequencyDaily ScheduledFrequency = "Daily"
)

func (*ScheduledFrequency) UnmarshalJSON

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

type ScheduledType

type ScheduledType string
const (
	ScheduledTypeStopDevBox ScheduledType = "StopDevBox"
)

func (*ScheduledType) UnmarshalJSON

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

type SchedulesClient

type SchedulesClient struct {
	Client *resourcemanager.Client
}

func NewSchedulesClientWithBaseURI

func NewSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SchedulesClient, error)

func (SchedulesClient) CreateOrUpdate

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

CreateOrUpdate ...

func (SchedulesClient) CreateOrUpdateThenPoll

func (c SchedulesClient) CreateOrUpdateThenPoll(ctx context.Context, id ScheduleId, input Schedule) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SchedulesClient) Delete

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

Delete ...

func (SchedulesClient) DeleteThenPoll

func (c SchedulesClient) DeleteThenPoll(ctx context.Context, id ScheduleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SchedulesClient) Get

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

Get ...

func (SchedulesClient) ListByPool

func (c SchedulesClient) ListByPool(ctx context.Context, id PoolId) (result ListByPoolOperationResponse, err error)

ListByPool ...

func (SchedulesClient) ListByPoolComplete

func (c SchedulesClient) ListByPoolComplete(ctx context.Context, id PoolId) (ListByPoolCompleteResult, error)

ListByPoolComplete retrieves all the results into a single object

func (SchedulesClient) ListByPoolCompleteMatchingPredicate

func (c SchedulesClient) ListByPoolCompleteMatchingPredicate(ctx context.Context, id PoolId, predicate ScheduleOperationPredicate) (result ListByPoolCompleteResult, err error)

ListByPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SchedulesClient) Update

func (c SchedulesClient) Update(ctx context.Context, id ScheduleId, input ScheduleUpdate) (result UpdateOperationResponse, err error)

Update ...

func (SchedulesClient) UpdateThenPoll

func (c SchedulesClient) UpdateThenPoll(ctx context.Context, id ScheduleId, input ScheduleUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	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