service

package
v0.20230204.1200350 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/servicefabric/2021-06-01/service Documentation

The service SDK allows for interaction with the Azure Resource Manager Service servicefabric (API Version 2021-06-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/servicefabric/2021-06-01/service"

Client Initialization

client := service.NewServiceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServiceClient.CreateOrUpdate

ctx := context.TODO()
id := service.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "applicationValue", "serviceValue")

payload := service.ServiceResource{
	// ...
}


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

Example Usage: ServiceClient.Delete

ctx := context.TODO()
id := service.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "applicationValue", "serviceValue")

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

Example Usage: ServiceClient.Get

ctx := context.TODO()
id := service.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "applicationValue", "serviceValue")

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: ServiceClient.List

ctx := context.TODO()
id := service.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "applicationValue")

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

Example Usage: ServiceClient.Update

ctx := context.TODO()
id := service.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "applicationValue", "serviceValue")

payload := service.ServiceResourceUpdate{
	// ...
}


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 PossibleValuesForArmServicePackageActivationMode

func PossibleValuesForArmServicePackageActivationMode() []string

func PossibleValuesForMoveCost

func PossibleValuesForMoveCost() []string

func PossibleValuesForPartitionScheme

func PossibleValuesForPartitionScheme() []string

func PossibleValuesForServiceCorrelationScheme

func PossibleValuesForServiceCorrelationScheme() []string

func PossibleValuesForServiceKind

func PossibleValuesForServiceKind() []string

func PossibleValuesForServiceLoadMetricWeight

func PossibleValuesForServiceLoadMetricWeight() []string

func PossibleValuesForServicePlacementPolicyType

func PossibleValuesForServicePlacementPolicyType() []string

func ValidateApplicationID

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

ValidateApplicationID checks that 'input' can be parsed as a Application ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type ApplicationId

type ApplicationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	ApplicationName   string
}

ApplicationId is a struct representing the Resource ID for a Application

func NewApplicationID

func NewApplicationID(subscriptionId string, resourceGroupName string, clusterName string, applicationName string) ApplicationId

NewApplicationID returns a new ApplicationId struct

func ParseApplicationID

func ParseApplicationID(input string) (*ApplicationId, error)

ParseApplicationID parses 'input' into a ApplicationId

func ParseApplicationIDInsensitively

func ParseApplicationIDInsensitively(input string) (*ApplicationId, error)

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

func (ApplicationId) ID

func (id ApplicationId) ID() string

ID returns the formatted Application ID

func (ApplicationId) Segments

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

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

func (ApplicationId) String

func (id ApplicationId) String() string

String returns a human-readable description of this Application ID

type ArmServicePackageActivationMode

type ArmServicePackageActivationMode string
const (
	ArmServicePackageActivationModeExclusiveProcess ArmServicePackageActivationMode = "ExclusiveProcess"
	ArmServicePackageActivationModeSharedProcess    ArmServicePackageActivationMode = "SharedProcess"
)

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *ServiceResourceList
}

type MoveCost

type MoveCost string
const (
	MoveCostHigh   MoveCost = "High"
	MoveCostLow    MoveCost = "Low"
	MoveCostMedium MoveCost = "Medium"
	MoveCostZero   MoveCost = "Zero"
)

type NamedPartitionSchemeDescription

type NamedPartitionSchemeDescription struct {
	Count int64    `json:"count"`
	Names []string `json:"names"`
}

func (NamedPartitionSchemeDescription) MarshalJSON

func (s NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error)

type PartitionScheme

type PartitionScheme string
const (
	PartitionSchemeInvalid                PartitionScheme = "Invalid"
	PartitionSchemeNamed                  PartitionScheme = "Named"
	PartitionSchemeSingleton              PartitionScheme = "Singleton"
	PartitionSchemeUniformIntSixFourRange PartitionScheme = "UniformInt64Range"
)

type PartitionSchemeDescription

type PartitionSchemeDescription interface {
}

type ServiceClient

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

func NewServiceClientWithBaseURI

func NewServiceClientWithBaseURI(endpoint string) ServiceClient

func (ServiceClient) CreateOrUpdate

func (c ServiceClient) CreateOrUpdate(ctx context.Context, id ServiceId, input ServiceResource) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ServiceClient) CreateOrUpdateThenPoll

func (c ServiceClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceId, input ServiceResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServiceClient) Delete

func (c ServiceClient) Delete(ctx context.Context, id ServiceId) (result DeleteOperationResponse, err error)

Delete ...

func (ServiceClient) DeleteThenPoll

func (c ServiceClient) DeleteThenPoll(ctx context.Context, id ServiceId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ServiceClient) Get

func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperationResponse, err error)

Get ...

func (ServiceClient) List

func (c ServiceClient) List(ctx context.Context, id ApplicationId) (result ListOperationResponse, err error)

List ...

func (ServiceClient) Update

Update ...

func (ServiceClient) UpdateThenPoll

func (c ServiceClient) UpdateThenPoll(ctx context.Context, id ServiceId, input ServiceResourceUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ServiceCorrelationDescription

type ServiceCorrelationDescription struct {
	Scheme      ServiceCorrelationScheme `json:"scheme"`
	ServiceName string                   `json:"serviceName"`
}

type ServiceCorrelationScheme

type ServiceCorrelationScheme string
const (
	ServiceCorrelationSchemeAffinity           ServiceCorrelationScheme = "Affinity"
	ServiceCorrelationSchemeAlignedAffinity    ServiceCorrelationScheme = "AlignedAffinity"
	ServiceCorrelationSchemeInvalid            ServiceCorrelationScheme = "Invalid"
	ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity"
)

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	ApplicationName   string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, clusterName string, applicationName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type ServiceKind

type ServiceKind string
const (
	ServiceKindInvalid   ServiceKind = "Invalid"
	ServiceKindStateful  ServiceKind = "Stateful"
	ServiceKindStateless ServiceKind = "Stateless"
)

type ServiceLoadMetricDescription

type ServiceLoadMetricDescription struct {
	DefaultLoad          *int64                   `json:"defaultLoad,omitempty"`
	Name                 string                   `json:"name"`
	PrimaryDefaultLoad   *int64                   `json:"primaryDefaultLoad,omitempty"`
	SecondaryDefaultLoad *int64                   `json:"secondaryDefaultLoad,omitempty"`
	Weight               *ServiceLoadMetricWeight `json:"weight,omitempty"`
}

type ServiceLoadMetricWeight

type ServiceLoadMetricWeight string
const (
	ServiceLoadMetricWeightHigh   ServiceLoadMetricWeight = "High"
	ServiceLoadMetricWeightLow    ServiceLoadMetricWeight = "Low"
	ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium"
	ServiceLoadMetricWeightZero   ServiceLoadMetricWeight = "Zero"
)

type ServicePlacementPolicyDescription

type ServicePlacementPolicyDescription struct {
	Type ServicePlacementPolicyType `json:"type"`
}

type ServicePlacementPolicyType

type ServicePlacementPolicyType string
const (
	ServicePlacementPolicyTypeInvalid                    ServicePlacementPolicyType = "Invalid"
	ServicePlacementPolicyTypeInvalidDomain              ServicePlacementPolicyType = "InvalidDomain"
	ServicePlacementPolicyTypeNonPartiallyPlaceService   ServicePlacementPolicyType = "NonPartiallyPlaceService"
	ServicePlacementPolicyTypePreferredPrimaryDomain     ServicePlacementPolicyType = "PreferredPrimaryDomain"
	ServicePlacementPolicyTypeRequiredDomain             ServicePlacementPolicyType = "RequiredDomain"
	ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = "RequiredDomainDistribution"
)

type ServiceResource

type ServiceResource struct {
	Etag       *string                   `json:"etag,omitempty"`
	Id         *string                   `json:"id,omitempty"`
	Location   *string                   `json:"location,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties ServiceResourceProperties `json:"properties"`
	SystemData *SystemData               `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

func (*ServiceResource) UnmarshalJSON

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

type ServiceResourceList

type ServiceResourceList struct {
	NextLink *string            `json:"nextLink,omitempty"`
	Value    *[]ServiceResource `json:"value,omitempty"`
}

type ServiceResourceProperties

type ServiceResourceProperties interface {
}

type ServiceResourceUpdate

type ServiceResourceUpdate struct {
	Etag       *string                         `json:"etag,omitempty"`
	Id         *string                         `json:"id,omitempty"`
	Location   *string                         `json:"location,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties ServiceResourceUpdateProperties `json:"properties"`
	SystemData *SystemData                     `json:"systemData,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

func (*ServiceResourceUpdate) UnmarshalJSON

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

type ServiceResourceUpdateProperties

type ServiceResourceUpdateProperties interface {
}

type SingletonPartitionSchemeDescription

type SingletonPartitionSchemeDescription struct {
}

func (SingletonPartitionSchemeDescription) MarshalJSON

func (s SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error)

type StatefulServiceProperties

type StatefulServiceProperties struct {
	HasPersistedState          *bool   `json:"hasPersistedState,omitempty"`
	MinReplicaSetSize          *int64  `json:"minReplicaSetSize,omitempty"`
	QuorumLossWaitDuration     *string `json:"quorumLossWaitDuration,omitempty"`
	ReplicaRestartWaitDuration *string `json:"replicaRestartWaitDuration,omitempty"`
	StandByReplicaKeepDuration *string `json:"standByReplicaKeepDuration,omitempty"`
	TargetReplicaSetSize       *int64  `json:"targetReplicaSetSize,omitempty"`

	// Fields inherited from ServiceResourceProperties
	CorrelationScheme            *[]ServiceCorrelationDescription     `json:"correlationScheme,omitempty"`
	DefaultMoveCost              *MoveCost                            `json:"defaultMoveCost,omitempty"`
	PartitionDescription         PartitionSchemeDescription           `json:"partitionDescription"`
	PlacementConstraints         *string                              `json:"placementConstraints,omitempty"`
	ProvisioningState            *string                              `json:"provisioningState,omitempty"`
	ServiceDnsName               *string                              `json:"serviceDnsName,omitempty"`
	ServiceLoadMetrics           *[]ServiceLoadMetricDescription      `json:"serviceLoadMetrics,omitempty"`
	ServicePackageActivationMode *ArmServicePackageActivationMode     `json:"servicePackageActivationMode,omitempty"`
	ServicePlacementPolicies     *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
	ServiceTypeName              *string                              `json:"serviceTypeName,omitempty"`
}

func (StatefulServiceProperties) MarshalJSON

func (s StatefulServiceProperties) MarshalJSON() ([]byte, error)

func (*StatefulServiceProperties) UnmarshalJSON

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

type StatefulServiceUpdateProperties

type StatefulServiceUpdateProperties struct {
	MinReplicaSetSize          *int64  `json:"minReplicaSetSize,omitempty"`
	QuorumLossWaitDuration     *string `json:"quorumLossWaitDuration,omitempty"`
	ReplicaRestartWaitDuration *string `json:"replicaRestartWaitDuration,omitempty"`
	StandByReplicaKeepDuration *string `json:"standByReplicaKeepDuration,omitempty"`
	TargetReplicaSetSize       *int64  `json:"targetReplicaSetSize,omitempty"`

	// Fields inherited from ServiceResourceUpdateProperties
	CorrelationScheme        *[]ServiceCorrelationDescription     `json:"correlationScheme,omitempty"`
	DefaultMoveCost          *MoveCost                            `json:"defaultMoveCost,omitempty"`
	PlacementConstraints     *string                              `json:"placementConstraints,omitempty"`
	ServiceLoadMetrics       *[]ServiceLoadMetricDescription      `json:"serviceLoadMetrics,omitempty"`
	ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
}

func (StatefulServiceUpdateProperties) MarshalJSON

func (s StatefulServiceUpdateProperties) MarshalJSON() ([]byte, error)

type StatelessServiceProperties

type StatelessServiceProperties struct {
	InstanceCloseDelayDuration *string `json:"instanceCloseDelayDuration,omitempty"`
	InstanceCount              *int64  `json:"instanceCount,omitempty"`

	// Fields inherited from ServiceResourceProperties
	CorrelationScheme            *[]ServiceCorrelationDescription     `json:"correlationScheme,omitempty"`
	DefaultMoveCost              *MoveCost                            `json:"defaultMoveCost,omitempty"`
	PartitionDescription         PartitionSchemeDescription           `json:"partitionDescription"`
	PlacementConstraints         *string                              `json:"placementConstraints,omitempty"`
	ProvisioningState            *string                              `json:"provisioningState,omitempty"`
	ServiceDnsName               *string                              `json:"serviceDnsName,omitempty"`
	ServiceLoadMetrics           *[]ServiceLoadMetricDescription      `json:"serviceLoadMetrics,omitempty"`
	ServicePackageActivationMode *ArmServicePackageActivationMode     `json:"servicePackageActivationMode,omitempty"`
	ServicePlacementPolicies     *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
	ServiceTypeName              *string                              `json:"serviceTypeName,omitempty"`
}

func (StatelessServiceProperties) MarshalJSON

func (s StatelessServiceProperties) MarshalJSON() ([]byte, error)

func (*StatelessServiceProperties) UnmarshalJSON

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

type StatelessServiceUpdateProperties

type StatelessServiceUpdateProperties struct {
	InstanceCloseDelayDuration *string `json:"instanceCloseDelayDuration,omitempty"`
	InstanceCount              *int64  `json:"instanceCount,omitempty"`

	// Fields inherited from ServiceResourceUpdateProperties
	CorrelationScheme        *[]ServiceCorrelationDescription     `json:"correlationScheme,omitempty"`
	DefaultMoveCost          *MoveCost                            `json:"defaultMoveCost,omitempty"`
	PlacementConstraints     *string                              `json:"placementConstraints,omitempty"`
	ServiceLoadMetrics       *[]ServiceLoadMetricDescription      `json:"serviceLoadMetrics,omitempty"`
	ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"`
}

func (StatelessServiceUpdateProperties) MarshalJSON

func (s StatelessServiceUpdateProperties) MarshalJSON() ([]byte, error)

type SystemData

type SystemData struct {
	CreatedAt          *string `json:"createdAt,omitempty"`
	CreatedBy          *string `json:"createdBy,omitempty"`
	CreatedByType      *string `json:"createdByType,omitempty"`
	LastModifiedAt     *string `json:"lastModifiedAt,omitempty"`
	LastModifiedBy     *string `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *string `json:"lastModifiedByType,omitempty"`
}

func (*SystemData) GetCreatedAtAsTime

func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error)

func (*SystemData) GetLastModifiedAtAsTime

func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error)

func (*SystemData) SetCreatedAtAsTime

func (o *SystemData) SetCreatedAtAsTime(input time.Time)

func (*SystemData) SetLastModifiedAtAsTime

func (o *SystemData) SetLastModifiedAtAsTime(input time.Time)

type UniformInt64RangePartitionSchemeDescription

type UniformInt64RangePartitionSchemeDescription struct {
	Count   int64  `json:"count"`
	HighKey string `json:"highKey"`
	LowKey  string `json:"lowKey"`
}

func (UniformInt64RangePartitionSchemeDescription) MarshalJSON

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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