servicefabricschedules

package
v0.20240214.1100807 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := servicefabricschedules.NewServiceFabricSchedulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServiceFabricSchedulesClient.CreateOrUpdate

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue", "scheduleValue")

payload := servicefabricschedules.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: ServiceFabricSchedulesClient.Delete

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue", "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: ServiceFabricSchedulesClient.Execute

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue", "scheduleValue")

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

Example Usage: ServiceFabricSchedulesClient.Get

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue", "scheduleValue")

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

Example Usage: ServiceFabricSchedulesClient.List

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue")

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

Example Usage: ServiceFabricSchedulesClient.Update

ctx := context.TODO()
id := servicefabricschedules.NewServiceFabricScheduleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "serviceFabricValue", "scheduleValue")

payload := servicefabricschedules.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 ValidateServiceFabricID

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

ValidateServiceFabricID checks that 'input' can be parsed as a Service Fabric ID

func ValidateServiceFabricScheduleID

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

ValidateServiceFabricScheduleID checks that 'input' can be parsed as a Service Fabric Schedule ID

Types

type CreateOrUpdateOperationResponse

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

type DayDetails

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

type DeleteOperationResponse

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

type EnableStatus

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

func (*EnableStatus) UnmarshalJSON

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

type ExecuteOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type HourDetails

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

type ListCompleteResult

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

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

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 ServiceFabricId

type ServiceFabricId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	UserName          string
	ServiceFabricName string
}

ServiceFabricId is a struct representing the Resource ID for a Service Fabric

func NewServiceFabricID

func NewServiceFabricID(subscriptionId string, resourceGroupName string, labName string, userName string, serviceFabricName string) ServiceFabricId

NewServiceFabricID returns a new ServiceFabricId struct

func ParseServiceFabricID

func ParseServiceFabricID(input string) (*ServiceFabricId, error)

ParseServiceFabricID parses 'input' into a ServiceFabricId

func ParseServiceFabricIDInsensitively

func ParseServiceFabricIDInsensitively(input string) (*ServiceFabricId, error)

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

func (*ServiceFabricId) FromParseResult

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

func (ServiceFabricId) ID

func (id ServiceFabricId) ID() string

ID returns the formatted Service Fabric ID

func (ServiceFabricId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service Fabric ID

func (ServiceFabricId) String

func (id ServiceFabricId) String() string

String returns a human-readable description of this Service Fabric ID

type ServiceFabricScheduleId

type ServiceFabricScheduleId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	UserName          string
	ServiceFabricName string
	ScheduleName      string
}

ServiceFabricScheduleId is a struct representing the Resource ID for a Service Fabric Schedule

func NewServiceFabricScheduleID

func NewServiceFabricScheduleID(subscriptionId string, resourceGroupName string, labName string, userName string, serviceFabricName string, scheduleName string) ServiceFabricScheduleId

NewServiceFabricScheduleID returns a new ServiceFabricScheduleId struct

func ParseServiceFabricScheduleID

func ParseServiceFabricScheduleID(input string) (*ServiceFabricScheduleId, error)

ParseServiceFabricScheduleID parses 'input' into a ServiceFabricScheduleId

func ParseServiceFabricScheduleIDInsensitively

func ParseServiceFabricScheduleIDInsensitively(input string) (*ServiceFabricScheduleId, error)

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

func (*ServiceFabricScheduleId) FromParseResult

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

func (ServiceFabricScheduleId) ID

ID returns the formatted Service Fabric Schedule ID

func (ServiceFabricScheduleId) Segments

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

func (ServiceFabricScheduleId) String

func (id ServiceFabricScheduleId) String() string

String returns a human-readable description of this Service Fabric Schedule ID

type ServiceFabricSchedulesClient

type ServiceFabricSchedulesClient struct {
	Client *resourcemanager.Client
}

func NewServiceFabricSchedulesClientWithBaseURI

func NewServiceFabricSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceFabricSchedulesClient, error)

func (ServiceFabricSchedulesClient) CreateOrUpdate

CreateOrUpdate ...

func (ServiceFabricSchedulesClient) Delete

Delete ...

func (ServiceFabricSchedulesClient) Execute

Execute ...

func (ServiceFabricSchedulesClient) ExecuteThenPoll

ExecuteThenPoll performs Execute then polls until it's completed

func (ServiceFabricSchedulesClient) Get

Get ...

func (ServiceFabricSchedulesClient) List

List ...

func (ServiceFabricSchedulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (ServiceFabricSchedulesClient) ListCompleteMatchingPredicate

func (c ServiceFabricSchedulesClient) ListCompleteMatchingPredicate(ctx context.Context, id ServiceFabricId, options ListOperationOptions, predicate ScheduleOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServiceFabricSchedulesClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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