servicefabrics

package
v0.20240621.1124930 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := servicefabrics.NewServiceFabricsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServiceFabricsClient.CreateOrUpdate

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

payload := servicefabrics.ServiceFabric{
	// ...
}


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

Example Usage: ServiceFabricsClient.Delete

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

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

Example Usage: ServiceFabricsClient.Get

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

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

Example Usage: ServiceFabricsClient.List

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

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

Example Usage: ServiceFabricsClient.ListApplicableSchedules

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

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

Example Usage: ServiceFabricsClient.Start

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

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

Example Usage: ServiceFabricsClient.Stop

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

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

Example Usage: ServiceFabricsClient.Update

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

payload := servicefabrics.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 ValidateUserID

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

ValidateUserID checks that 'input' can be parsed as a User ID

Types

type ApplicableSchedule

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

type ApplicableScheduleProperties

type ApplicableScheduleProperties struct {
	LabVMsShutdown *Schedule `json:"labVmsShutdown,omitempty"`
	LabVMsStartup  *Schedule `json:"labVmsStartup,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DayDetails

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	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 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        *ServiceFabric
}

type HourDetails

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

type ListApplicableSchedulesOperationResponse

type ListApplicableSchedulesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplicableSchedule
}

type ListCompleteResult

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

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        *[]ServiceFabric
}

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 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 ServiceFabric

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

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 ServiceFabricOperationPredicate

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

func (ServiceFabricOperationPredicate) Matches

type ServiceFabricProperties

type ServiceFabricProperties struct {
	ApplicableSchedule      *ApplicableSchedule `json:"applicableSchedule,omitempty"`
	EnvironmentId           *string             `json:"environmentId,omitempty"`
	ExternalServiceFabricId *string             `json:"externalServiceFabricId,omitempty"`
	ProvisioningState       *string             `json:"provisioningState,omitempty"`
	UniqueIdentifier        *string             `json:"uniqueIdentifier,omitempty"`
}

type ServiceFabricsClient

type ServiceFabricsClient struct {
	Client *resourcemanager.Client
}

func NewServiceFabricsClientWithBaseURI

func NewServiceFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceFabricsClient, error)

func (ServiceFabricsClient) CreateOrUpdate

CreateOrUpdate ...

func (ServiceFabricsClient) CreateOrUpdateThenPoll

func (c ServiceFabricsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceFabricId, input ServiceFabric) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServiceFabricsClient) Delete

Delete ...

func (ServiceFabricsClient) DeleteThenPoll

func (c ServiceFabricsClient) DeleteThenPoll(ctx context.Context, id ServiceFabricId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ServiceFabricsClient) Get

Get ...

func (ServiceFabricsClient) List

List ...

func (ServiceFabricsClient) ListApplicableSchedules

func (c ServiceFabricsClient) ListApplicableSchedules(ctx context.Context, id ServiceFabricId) (result ListApplicableSchedulesOperationResponse, err error)

ListApplicableSchedules ...

func (ServiceFabricsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ServiceFabricsClient) ListCompleteMatchingPredicate

func (c ServiceFabricsClient) ListCompleteMatchingPredicate(ctx context.Context, id UserId, options ListOperationOptions, predicate ServiceFabricOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServiceFabricsClient) Start

Start ...

func (ServiceFabricsClient) StartThenPoll

func (c ServiceFabricsClient) StartThenPoll(ctx context.Context, id ServiceFabricId) error

StartThenPoll performs Start then polls until it's completed

func (ServiceFabricsClient) Stop

Stop ...

func (ServiceFabricsClient) StopThenPoll

func (c ServiceFabricsClient) StopThenPoll(ctx context.Context, id ServiceFabricId) error

StopThenPoll performs Stop then polls until it's completed

func (ServiceFabricsClient) Update

Update ...

type StartOperationResponse

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

type StopOperationResponse

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServiceFabric
}

type UpdateResource

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

type UserId

type UserId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	UserName          string
}

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, labName string, userName string) UserId

NewUserID returns a new UserId struct

func ParseUserID

func ParseUserID(input string) (*UserId, error)

ParseUserID parses 'input' into a UserId

func ParseUserIDInsensitively

func ParseUserIDInsensitively(input string) (*UserId, error)

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

func (*UserId) FromParseResult

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

func (UserId) ID

func (id UserId) ID() string

ID returns the formatted User ID

func (UserId) Segments

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

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

func (UserId) String

func (id UserId) String() string

String returns a human-readable description of this User ID

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