Documentation ¶
Index ¶
- type AddOnFeatures
- type ApplicationDeltaHealthPolicy
- type ApplicationHealthPolicy
- type ApplicationMetricDescription
- type ApplicationResource
- type ApplicationResourceList
- type ApplicationResourceProperties
- type ApplicationResourceUpdate
- type ApplicationResourceUpdateProperties
- type ApplicationTypeResource
- type ApplicationTypeResourceList
- type ApplicationTypeResourceProperties
- type ApplicationTypeVersionResource
- type ApplicationTypeVersionResourceList
- type ApplicationTypeVersionResourceProperties
- type ApplicationTypeVersionsCleanupPolicy
- type ApplicationTypeVersionsClient
- func (client *ApplicationTypeVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationTypeVersionsClientCreateOrUpdateResponse], error)
- func (client *ApplicationTypeVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationTypeVersionsClientDeleteResponse], error)
- func (client *ApplicationTypeVersionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationTypeVersionsClientGetResponse, error)
- func (client *ApplicationTypeVersionsClient) NewListPager(resourceGroupName string, clusterName string, applicationTypeName string, ...) *runtime.Pager[ApplicationTypeVersionsClientListResponse]
- type ApplicationTypeVersionsClientBeginCreateOrUpdateOptions
- type ApplicationTypeVersionsClientBeginDeleteOptions
- type ApplicationTypeVersionsClientCreateOrUpdateResponse
- type ApplicationTypeVersionsClientDeleteResponse
- type ApplicationTypeVersionsClientGetOptions
- type ApplicationTypeVersionsClientGetResponse
- type ApplicationTypeVersionsClientListOptions
- type ApplicationTypeVersionsClientListResponse
- type ApplicationTypesClient
- func (client *ApplicationTypesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationTypesClientDeleteResponse], error)
- func (client *ApplicationTypesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationTypesClientCreateOrUpdateResponse, error)
- func (client *ApplicationTypesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationTypesClientGetResponse, error)
- func (client *ApplicationTypesClient) NewListPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ApplicationTypesClientListResponse]
- type ApplicationTypesClientBeginDeleteOptions
- type ApplicationTypesClientCreateOrUpdateOptions
- type ApplicationTypesClientCreateOrUpdateResponse
- type ApplicationTypesClientDeleteResponse
- type ApplicationTypesClientGetOptions
- type ApplicationTypesClientGetResponse
- type ApplicationTypesClientListOptions
- type ApplicationTypesClientListResponse
- type ApplicationUpgradePolicy
- type ApplicationUserAssignedIdentity
- type ApplicationsClient
- func (client *ApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationsClientCreateOrUpdateResponse], error)
- func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationsClientDeleteResponse], error)
- func (client *ApplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationsClientUpdateResponse], error)
- func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationsClientGetResponse, error)
- func (client *ApplicationsClient) NewListPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ApplicationsClientListResponse]
- type ApplicationsClientBeginCreateOrUpdateOptions
- type ApplicationsClientBeginDeleteOptions
- type ApplicationsClientBeginUpdateOptions
- type ApplicationsClientCreateOrUpdateResponse
- type ApplicationsClientDeleteResponse
- type ApplicationsClientGetOptions
- type ApplicationsClientGetResponse
- type ApplicationsClientListOptions
- type ApplicationsClientListResponse
- type ApplicationsClientUpdateResponse
- type ArmApplicationHealthPolicy
- type ArmRollingUpgradeMonitoringPolicy
- type ArmServicePackageActivationMode
- type ArmServiceTypeHealthPolicy
- type ArmUpgradeFailureAction
- type AvailableOperationDisplay
- type AzureActiveDirectory
- type CertificateDescription
- type ClientCertificateCommonName
- type ClientCertificateThumbprint
- type ClientFactory
- func (c *ClientFactory) NewApplicationTypeVersionsClient() *ApplicationTypeVersionsClient
- func (c *ClientFactory) NewApplicationTypesClient() *ApplicationTypesClient
- func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
- func (c *ClientFactory) NewClusterVersionsClient() *ClusterVersionsClient
- func (c *ClientFactory) NewClustersClient() *ClustersClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewServicesClient() *ServicesClient
- type Cluster
- type ClusterCodeVersionsListResult
- type ClusterCodeVersionsResult
- type ClusterEnvironment
- type ClusterHealthPolicy
- type ClusterListResult
- type ClusterProperties
- type ClusterPropertiesUpdateParameters
- type ClusterState
- type ClusterUpdateParameters
- type ClusterUpgradeCadence
- type ClusterUpgradeDeltaHealthPolicy
- type ClusterUpgradePolicy
- type ClusterVersionDetails
- type ClusterVersionsClient
- func (client *ClusterVersionsClient) Get(ctx context.Context, location string, clusterVersion string, ...) (ClusterVersionsClientGetResponse, error)
- func (client *ClusterVersionsClient) GetByEnvironment(ctx context.Context, location string, environment ClusterVersionsEnvironment, ...) (ClusterVersionsClientGetByEnvironmentResponse, error)
- func (client *ClusterVersionsClient) List(ctx context.Context, location string, ...) (ClusterVersionsClientListResponse, error)
- func (client *ClusterVersionsClient) ListByEnvironment(ctx context.Context, location string, environment ClusterVersionsEnvironment, ...) (ClusterVersionsClientListByEnvironmentResponse, error)
- type ClusterVersionsClientGetByEnvironmentOptions
- type ClusterVersionsClientGetByEnvironmentResponse
- type ClusterVersionsClientGetOptions
- type ClusterVersionsClientGetResponse
- type ClusterVersionsClientListByEnvironmentOptions
- type ClusterVersionsClientListByEnvironmentResponse
- type ClusterVersionsClientListOptions
- type ClusterVersionsClientListResponse
- type ClusterVersionsEnvironment
- type ClustersClient
- func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)
- func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateResponse], error)
- func (client *ClustersClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientDeleteResponse, error)
- func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetResponse, error)
- func (client *ClustersClient) ListUpgradableVersions(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientListUpgradableVersionsResponse, error)
- func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
- func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
- type ClustersClientBeginCreateOrUpdateOptions
- type ClustersClientBeginUpdateOptions
- type ClustersClientCreateOrUpdateResponse
- type ClustersClientDeleteOptions
- type ClustersClientDeleteResponse
- type ClustersClientGetOptions
- type ClustersClientGetResponse
- type ClustersClientListByResourceGroupOptions
- type ClustersClientListByResourceGroupResponse
- type ClustersClientListOptions
- type ClustersClientListResponse
- type ClustersClientListUpgradableVersionsOptions
- type ClustersClientListUpgradableVersionsResponse
- type ClustersClientUpdateResponse
- type DiagnosticsStorageAccountConfig
- type DurabilityLevel
- type EndpointRangeDescription
- type ErrorModel
- type ErrorModelError
- type ManagedIdentity
- type ManagedIdentityType
- type MoveCost
- type NamedPartitionSchemeDescription
- type NodeTypeDescription
- type Notification
- type NotificationCategory
- type NotificationChannel
- type NotificationLevel
- type NotificationTarget
- type OperationListResult
- type OperationResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PartitionScheme
- type PartitionSchemeDescription
- type PartitionSchemeDescriptionClassification
- type ProvisioningState
- type ProxyResource
- type ReliabilityLevel
- type Resource
- type RollingUpgradeMode
- type ServerCertificateCommonName
- type ServerCertificateCommonNames
- type ServiceCorrelationDescription
- type ServiceCorrelationScheme
- type ServiceKind
- type ServiceLoadMetricDescription
- type ServiceLoadMetricWeight
- type ServicePlacementPolicyDescription
- type ServicePlacementPolicyDescriptionClassification
- type ServicePlacementPolicyType
- type ServiceResource
- type ServiceResourceList
- type ServiceResourceProperties
- type ServiceResourcePropertiesBase
- type ServiceResourcePropertiesClassification
- type ServiceResourceUpdate
- type ServiceResourceUpdateProperties
- type ServiceResourceUpdatePropertiesClassification
- type ServiceTypeDeltaHealthPolicy
- type ServiceTypeHealthPolicy
- type ServicesClient
- func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error)
- func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ServicesClientDeleteResponse], error)
- func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ServicesClientUpdateResponse], error)
- func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ServicesClientGetResponse, error)
- func (client *ServicesClient) NewListPager(resourceGroupName string, clusterName string, applicationName string, ...) *runtime.Pager[ServicesClientListResponse]
- type ServicesClientBeginCreateOrUpdateOptions
- type ServicesClientBeginDeleteOptions
- type ServicesClientBeginUpdateOptions
- type ServicesClientCreateOrUpdateResponse
- type ServicesClientDeleteResponse
- type ServicesClientGetOptions
- type ServicesClientGetResponse
- type ServicesClientListOptions
- type ServicesClientListResponse
- type ServicesClientUpdateResponse
- type SettingsParameterDescription
- type SettingsSectionDescription
- type SfZonalUpgradeMode
- type SingletonPartitionSchemeDescription
- type StatefulServiceProperties
- type StatefulServiceUpdateProperties
- type StatelessServiceProperties
- type StatelessServiceUpdateProperties
- type StoreName
- type SystemData
- type UniformInt64RangePartitionSchemeDescription
- type UpgradableVersionPathResult
- type UpgradableVersionsDescription
- type UpgradeMode
- type UserAssignedIdentity
- type VmssZonalUpgradeMode
Examples ¶
- ApplicationTypeVersionsClient.BeginCreateOrUpdate
- ApplicationTypeVersionsClient.BeginDelete
- ApplicationTypeVersionsClient.Get
- ApplicationTypeVersionsClient.NewListPager
- ApplicationTypesClient.BeginDelete
- ApplicationTypesClient.CreateOrUpdate
- ApplicationTypesClient.Get
- ApplicationTypesClient.NewListPager
- ApplicationsClient.BeginCreateOrUpdate (PutAnApplicationWithMaximumParameters)
- ApplicationsClient.BeginCreateOrUpdate (PutAnApplicationWithMinimumParameters)
- ApplicationsClient.BeginCreateOrUpdate (PutAnApplicationWithRecreateOption)
- ApplicationsClient.BeginDelete
- ApplicationsClient.BeginUpdate
- ApplicationsClient.Get
- ApplicationsClient.NewListPager
- ClusterVersionsClient.Get
- ClusterVersionsClient.GetByEnvironment
- ClusterVersionsClient.List
- ClusterVersionsClient.ListByEnvironment
- ClustersClient.BeginCreateOrUpdate (PutAClusterWithMaximumParameters)
- ClustersClient.BeginCreateOrUpdate (PutAClusterWithMinimumParameters)
- ClustersClient.BeginUpdate
- ClustersClient.Delete
- ClustersClient.Get
- ClustersClient.ListUpgradableVersions (GetMinimumAndMaximumCodeVersions)
- ClustersClient.ListUpgradableVersions (GetUpgradePath)
- ClustersClient.NewListByResourceGroupPager
- ClustersClient.NewListPager
- OperationsClient.NewListPager
- ServicesClient.BeginCreateOrUpdate (PutAServiceWithMaximumParameters)
- ServicesClient.BeginCreateOrUpdate (PutAServiceWithMinimumParameters)
- ServicesClient.BeginDelete
- ServicesClient.BeginUpdate
- ServicesClient.Get
- ServicesClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOnFeatures ¶
type AddOnFeatures string
AddOnFeatures - Available cluster add-on features
const ( AddOnFeaturesBackupRestoreService AddOnFeatures = "BackupRestoreService" AddOnFeaturesDNSService AddOnFeatures = "DnsService" AddOnFeaturesRepairManager AddOnFeatures = "RepairManager" AddOnFeaturesResourceMonitorService AddOnFeatures = "ResourceMonitorService" )
func PossibleAddOnFeaturesValues ¶
func PossibleAddOnFeaturesValues() []AddOnFeatures
PossibleAddOnFeaturesValues returns the possible values for the AddOnFeatures const type.
type ApplicationDeltaHealthPolicy ¶
type ApplicationDeltaHealthPolicy struct { // The delta health policy used by default to evaluate the health of a service type when upgrading the cluster. DefaultServiceTypeDeltaHealthPolicy *ServiceTypeDeltaHealthPolicy // The map with service type delta health policy per service type name. The map is empty by default. ServiceTypeDeltaHealthPolicies map[string]*ServiceTypeDeltaHealthPolicy }
ApplicationDeltaHealthPolicy - Defines a delta health policy used to evaluate the health of an application or one of its child entities when upgrading the cluster.
func (ApplicationDeltaHealthPolicy) MarshalJSON ¶
func (a ApplicationDeltaHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationDeltaHealthPolicy.
func (*ApplicationDeltaHealthPolicy) UnmarshalJSON ¶
func (a *ApplicationDeltaHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationDeltaHealthPolicy.
type ApplicationHealthPolicy ¶
type ApplicationHealthPolicy struct { // The health policy used by default to evaluate the health of a service type. DefaultServiceTypeHealthPolicy *ServiceTypeHealthPolicy // The map with service type health policy per service type name. The map is empty by default. ServiceTypeHealthPolicies map[string]*ServiceTypeHealthPolicy }
ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities.
func (ApplicationHealthPolicy) MarshalJSON ¶
func (a ApplicationHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationHealthPolicy.
func (*ApplicationHealthPolicy) UnmarshalJSON ¶
func (a *ApplicationHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationHealthPolicy.
type ApplicationMetricDescription ¶
type ApplicationMetricDescription struct { // The maximum node capacity for Service Fabric application. This is the maximum Load for an instance of this application // on a single node. Even if the capacity of node is greater than this value, // Service Fabric will limit the total load of services within the application on each node to this value. If set to zero, // capacity for this metric is unlimited on each node. When creating a new // application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or // equal to TotalApplicationCapacity. When updating existing application with // application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. MaximumCapacity *int64 // The name of the metric. Name *string // The node reservation capacity for Service Fabric application. This is the amount of load which is reserved on nodes which // have instances of this application. If MinimumNodes is specified, then the // product of these values will be the capacity reserved in the cluster for the application. If set to zero, no capacity is // reserved for this metric. When setting application capacity or when updating // application capacity; this value must be smaller than or equal to MaximumCapacity for each metric. ReservationCapacity *int64 // The total metric capacity for Service Fabric application. This is the total metric capacity for this application in the // cluster. Service Fabric will try to limit the sum of loads of services within // the application to this value. When creating a new application with application capacity defined, the product of MaximumNodes // and MaximumCapacity must always be smaller than or equal to this value. TotalApplicationCapacity *int64 }
ApplicationMetricDescription - Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application.
func (ApplicationMetricDescription) MarshalJSON ¶
func (a ApplicationMetricDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationMetricDescription.
func (*ApplicationMetricDescription) UnmarshalJSON ¶
func (a *ApplicationMetricDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationMetricDescription.
type ApplicationResource ¶
type ApplicationResource struct { // Describes the managed identities for an Azure resource. Identity *ManagedIdentity // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The application resource properties. Properties *ApplicationResourceProperties // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ApplicationResource - The application resource.
func (ApplicationResource) MarshalJSON ¶
func (a ApplicationResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResource.
func (*ApplicationResource) UnmarshalJSON ¶
func (a *ApplicationResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResource.
type ApplicationResourceList ¶
type ApplicationResourceList struct { Value []*ApplicationResource // READ-ONLY; URL to get the next set of application list results if there are any. NextLink *string }
ApplicationResourceList - The list of application resources.
func (ApplicationResourceList) MarshalJSON ¶
func (a ApplicationResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceList.
func (*ApplicationResourceList) UnmarshalJSON ¶
func (a *ApplicationResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceList.
type ApplicationResourceProperties ¶
type ApplicationResourceProperties struct { // List of user assigned identities for the application, each mapped to a friendly name. ManagedIdentities []*ApplicationUserAssignedIdentity // The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean // that the services of this application will be placed on all of those nodes. By // default, the value of this property is zero and it means that the services can be placed on any node. MaximumNodes *int64 // List of application capacity metric description. Metrics []*ApplicationMetricDescription // The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean // that the services of this application will be placed on all of those nodes. If // this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of // the MaximumNodes property. MinimumNodes *int64 // List of application parameters with overridden values from their default values specified in the application manifest. Parameters map[string]*string // Remove the current application capacity settings. RemoveApplicationCapacity *bool // The application type name as defined in the application manifest. TypeName *string // The version of the application type as defined in the application manifest. TypeVersion *string // Describes the policy for a monitored application upgrade. UpgradePolicy *ApplicationUpgradePolicy // READ-ONLY; The current deployment or provisioning state, which only appears in the response ProvisioningState *string }
ApplicationResourceProperties - The application resource properties.
func (ApplicationResourceProperties) MarshalJSON ¶
func (a ApplicationResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceProperties.
func (*ApplicationResourceProperties) UnmarshalJSON ¶
func (a *ApplicationResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceProperties.
type ApplicationResourceUpdate ¶
type ApplicationResourceUpdate struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The application resource properties for patch operations. Properties *ApplicationResourceUpdateProperties // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ApplicationResourceUpdate - The application resource for patch operations.
func (ApplicationResourceUpdate) MarshalJSON ¶
func (a ApplicationResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceUpdate.
func (*ApplicationResourceUpdate) UnmarshalJSON ¶
func (a *ApplicationResourceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceUpdate.
type ApplicationResourceUpdateProperties ¶
type ApplicationResourceUpdateProperties struct { // List of user assigned identities for the application, each mapped to a friendly name. ManagedIdentities []*ApplicationUserAssignedIdentity // The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean // that the services of this application will be placed on all of those nodes. By // default, the value of this property is zero and it means that the services can be placed on any node. MaximumNodes *int64 // List of application capacity metric description. Metrics []*ApplicationMetricDescription // The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean // that the services of this application will be placed on all of those nodes. If // this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of // the MaximumNodes property. MinimumNodes *int64 // List of application parameters with overridden values from their default values specified in the application manifest. Parameters map[string]*string // Remove the current application capacity settings. RemoveApplicationCapacity *bool // The version of the application type as defined in the application manifest. TypeVersion *string // Describes the policy for a monitored application upgrade. UpgradePolicy *ApplicationUpgradePolicy }
ApplicationResourceUpdateProperties - The application resource properties for patch operations.
func (ApplicationResourceUpdateProperties) MarshalJSON ¶
func (a ApplicationResourceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceUpdateProperties.
func (*ApplicationResourceUpdateProperties) UnmarshalJSON ¶
func (a *ApplicationResourceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceUpdateProperties.
type ApplicationTypeResource ¶
type ApplicationTypeResource struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The application type name properties Properties *ApplicationTypeResourceProperties // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ApplicationTypeResource - The application type name resource
func (ApplicationTypeResource) MarshalJSON ¶
func (a ApplicationTypeResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeResource.
func (*ApplicationTypeResource) UnmarshalJSON ¶
func (a *ApplicationTypeResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeResource.
type ApplicationTypeResourceList ¶
type ApplicationTypeResourceList struct { Value []*ApplicationTypeResource // READ-ONLY; URL to get the next set of application type list results if there are any. NextLink *string }
ApplicationTypeResourceList - The list of application type names.
func (ApplicationTypeResourceList) MarshalJSON ¶
func (a ApplicationTypeResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeResourceList.
func (*ApplicationTypeResourceList) UnmarshalJSON ¶
func (a *ApplicationTypeResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeResourceList.
type ApplicationTypeResourceProperties ¶
type ApplicationTypeResourceProperties struct { // READ-ONLY; The current deployment or provisioning state, which only appears in the response. ProvisioningState *string }
ApplicationTypeResourceProperties - The application type name properties
func (ApplicationTypeResourceProperties) MarshalJSON ¶
func (a ApplicationTypeResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeResourceProperties.
func (*ApplicationTypeResourceProperties) UnmarshalJSON ¶
func (a *ApplicationTypeResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeResourceProperties.
type ApplicationTypeVersionResource ¶
type ApplicationTypeVersionResource struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The properties of the application type version resource. Properties *ApplicationTypeVersionResourceProperties // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ApplicationTypeVersionResource - An application type version resource for the specified application type name resource.
func (ApplicationTypeVersionResource) MarshalJSON ¶
func (a ApplicationTypeVersionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeVersionResource.
func (*ApplicationTypeVersionResource) UnmarshalJSON ¶
func (a *ApplicationTypeVersionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeVersionResource.
type ApplicationTypeVersionResourceList ¶
type ApplicationTypeVersionResourceList struct { Value []*ApplicationTypeVersionResource // READ-ONLY; URL to get the next set of application type version list results if there are any. NextLink *string }
ApplicationTypeVersionResourceList - The list of application type version resources for the specified application type name resource.
func (ApplicationTypeVersionResourceList) MarshalJSON ¶
func (a ApplicationTypeVersionResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeVersionResourceList.
func (*ApplicationTypeVersionResourceList) UnmarshalJSON ¶
func (a *ApplicationTypeVersionResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeVersionResourceList.
type ApplicationTypeVersionResourceProperties ¶
type ApplicationTypeVersionResourceProperties struct { // REQUIRED; The URL to the application package AppPackageURL *string // READ-ONLY; List of application type parameters that can be overridden when creating or updating the application. DefaultParameterList map[string]*string // READ-ONLY; The current deployment or provisioning state, which only appears in the response ProvisioningState *string }
ApplicationTypeVersionResourceProperties - The properties of the application type version resource.
func (ApplicationTypeVersionResourceProperties) MarshalJSON ¶
func (a ApplicationTypeVersionResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeVersionResourceProperties.
func (*ApplicationTypeVersionResourceProperties) UnmarshalJSON ¶
func (a *ApplicationTypeVersionResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeVersionResourceProperties.
type ApplicationTypeVersionsCleanupPolicy ¶
type ApplicationTypeVersionsCleanupPolicy struct { // REQUIRED; Number of unused versions per application type to keep. MaxUnusedVersionsToKeep *int64 }
func (ApplicationTypeVersionsCleanupPolicy) MarshalJSON ¶
func (a ApplicationTypeVersionsCleanupPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationTypeVersionsCleanupPolicy.
func (*ApplicationTypeVersionsCleanupPolicy) UnmarshalJSON ¶
func (a *ApplicationTypeVersionsCleanupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationTypeVersionsCleanupPolicy.
type ApplicationTypeVersionsClient ¶
type ApplicationTypeVersionsClient struct {
// contains filtered or unexported fields
}
ApplicationTypeVersionsClient contains the methods for the ApplicationTypeVersions group. Don't use this type directly, use NewApplicationTypeVersionsClient() instead.
func NewApplicationTypeVersionsClient ¶
func NewApplicationTypeVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationTypeVersionsClient, error)
NewApplicationTypeVersionsClient creates a new instance of ApplicationTypeVersionsClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationTypeVersionsClient) BeginCreateOrUpdate ¶
func (client *ApplicationTypeVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string, parameters ApplicationTypeVersionResource, options *ApplicationTypeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationTypeVersionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Service Fabric application type version resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- version - The application type version.
- parameters - The application type version resource.
- options - ApplicationTypeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationTypeVersionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionPutOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationTypeVersionsClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myAppType", "1.0", armservicefabric.ApplicationTypeVersionResource{ Tags: map[string]*string{}, Properties: &armservicefabric.ApplicationTypeVersionResourceProperties{ AppPackageURL: to.Ptr("http://fakelink.test.com/MyAppType"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationTypeVersionsClient) BeginDelete ¶
func (client *ApplicationTypeVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string, options *ApplicationTypeVersionsClientBeginDeleteOptions) (*runtime.Poller[ApplicationTypeVersionsClientDeleteResponse], error)
BeginDelete - Delete a Service Fabric application type version resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- version - The application type version.
- options - ApplicationTypeVersionsClientBeginDeleteOptions contains the optional parameters for the ApplicationTypeVersionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionDeleteOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationTypeVersionsClient().BeginDelete(ctx, "resRg", "myCluster", "myAppType", "1.0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationTypeVersionsClient) Get ¶
func (client *ApplicationTypeVersionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, version string, options *ApplicationTypeVersionsClientGetOptions) (ApplicationTypeVersionsClientGetResponse, error)
Get - Get a Service Fabric application type version resource created or in the process of being created in the Service Fabric application type name resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- version - The application type version.
- options - ApplicationTypeVersionsClientGetOptions contains the optional parameters for the ApplicationTypeVersionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionGetOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationTypeVersionsClient().Get(ctx, "resRg", "myCluster", "myAppType", "1.0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationTypeVersionResource = armservicefabric.ApplicationTypeVersionResource{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("versions"), // Etag: to.Ptr("W/\"636462502176040417\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationTypeVersionResourceProperties{ // AppPackageURL: to.Ptr("http://fakelink.test.com/MyAppType"), // DefaultParameterList: map[string]*string{ // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }
Output:
func (*ApplicationTypeVersionsClient) NewListPager ¶
func (client *ApplicationTypeVersionsClient) NewListPager(resourceGroupName string, clusterName string, applicationTypeName string, options *ApplicationTypeVersionsClientListOptions) *runtime.Pager[ApplicationTypeVersionsClientListResponse]
NewListPager - Gets all application type version resources created or in the process of being created in the Service Fabric application type name resource.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- options - ApplicationTypeVersionsClientListOptions contains the optional parameters for the ApplicationTypeVersionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionListOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationTypeVersionsClient().NewListPager("resRg", "myCluster", "myAppType", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationTypeVersionResourceList = armservicefabric.ApplicationTypeVersionResourceList{ // Value: []*armservicefabric.ApplicationTypeVersionResource{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("versions"), // Etag: to.Ptr("W/\"636462502176040417\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationTypeVersionResourceProperties{ // AppPackageURL: to.Ptr("http://fakelink.test.com/MyAppType"), // DefaultParameterList: map[string]*string{ // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } }
Output:
type ApplicationTypeVersionsClientBeginCreateOrUpdateOptions ¶
type ApplicationTypeVersionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationTypeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationTypeVersionsClient.BeginCreateOrUpdate method.
type ApplicationTypeVersionsClientBeginDeleteOptions ¶
type ApplicationTypeVersionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationTypeVersionsClientBeginDeleteOptions contains the optional parameters for the ApplicationTypeVersionsClient.BeginDelete method.
type ApplicationTypeVersionsClientCreateOrUpdateResponse ¶
type ApplicationTypeVersionsClientCreateOrUpdateResponse struct { // An application type version resource for the specified application type name resource. ApplicationTypeVersionResource }
ApplicationTypeVersionsClientCreateOrUpdateResponse contains the response from method ApplicationTypeVersionsClient.BeginCreateOrUpdate.
type ApplicationTypeVersionsClientDeleteResponse ¶
type ApplicationTypeVersionsClientDeleteResponse struct { }
ApplicationTypeVersionsClientDeleteResponse contains the response from method ApplicationTypeVersionsClient.BeginDelete.
type ApplicationTypeVersionsClientGetOptions ¶
type ApplicationTypeVersionsClientGetOptions struct { }
ApplicationTypeVersionsClientGetOptions contains the optional parameters for the ApplicationTypeVersionsClient.Get method.
type ApplicationTypeVersionsClientGetResponse ¶
type ApplicationTypeVersionsClientGetResponse struct { // An application type version resource for the specified application type name resource. ApplicationTypeVersionResource }
ApplicationTypeVersionsClientGetResponse contains the response from method ApplicationTypeVersionsClient.Get.
type ApplicationTypeVersionsClientListOptions ¶
type ApplicationTypeVersionsClientListOptions struct { }
ApplicationTypeVersionsClientListOptions contains the optional parameters for the ApplicationTypeVersionsClient.NewListPager method.
type ApplicationTypeVersionsClientListResponse ¶
type ApplicationTypeVersionsClientListResponse struct { // The list of application type version resources for the specified application type name resource. ApplicationTypeVersionResourceList }
ApplicationTypeVersionsClientListResponse contains the response from method ApplicationTypeVersionsClient.NewListPager.
type ApplicationTypesClient ¶
type ApplicationTypesClient struct {
// contains filtered or unexported fields
}
ApplicationTypesClient contains the methods for the ApplicationTypes group. Don't use this type directly, use NewApplicationTypesClient() instead.
func NewApplicationTypesClient ¶
func NewApplicationTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationTypesClient, error)
NewApplicationTypesClient creates a new instance of ApplicationTypesClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationTypesClient) BeginDelete ¶
func (client *ApplicationTypesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, options *ApplicationTypesClientBeginDeleteOptions) (*runtime.Poller[ApplicationTypesClientDeleteResponse], error)
BeginDelete - Delete a Service Fabric application type name resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- options - ApplicationTypesClientBeginDeleteOptions contains the optional parameters for the ApplicationTypesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameDeleteOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationTypesClient().BeginDelete(ctx, "resRg", "myCluster", "myAppType", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationTypesClient) CreateOrUpdate ¶
func (client *ApplicationTypesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, parameters ApplicationTypeResource, options *ApplicationTypesClientCreateOrUpdateOptions) (ApplicationTypesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a Service Fabric application type name resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- parameters - The application type name resource.
- options - ApplicationTypesClientCreateOrUpdateOptions contains the optional parameters for the ApplicationTypesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNamePutOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationTypesClient().CreateOrUpdate(ctx, "resRg", "myCluster", "myAppType", armservicefabric.ApplicationTypeResource{ Tags: map[string]*string{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationTypeResource = armservicefabric.ApplicationTypeResource{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("applicationTypes"), // Etag: to.Ptr("W/\"636462502174844831\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationTypeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }
Output:
func (*ApplicationTypesClient) Get ¶
func (client *ApplicationTypesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationTypeName string, options *ApplicationTypesClientGetOptions) (ApplicationTypesClientGetResponse, error)
Get - Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationTypeName - The name of the application type name resource.
- options - ApplicationTypesClientGetOptions contains the optional parameters for the ApplicationTypesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameGetOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationTypesClient().Get(ctx, "resRg", "myCluster", "myAppType", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationTypeResource = armservicefabric.ApplicationTypeResource{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("applicationTypes"), // Etag: to.Ptr("W/\"636462502174844831\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationTypeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }
Output:
func (*ApplicationTypesClient) NewListPager ¶
func (client *ApplicationTypesClient) NewListPager(resourceGroupName string, clusterName string, options *ApplicationTypesClientListOptions) *runtime.Pager[ApplicationTypesClientListResponse]
NewListPager - Gets all application type name resources created or in the process of being created in the Service Fabric cluster resource.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- options - ApplicationTypesClientListOptions contains the optional parameters for the ApplicationTypesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameListOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationTypesClient().NewListPager("resRg", "myCluster", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationTypeResourceList = armservicefabric.ApplicationTypeResourceList{ // Value: []*armservicefabric.ApplicationTypeResource{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("applicationTypes"), // Etag: to.Ptr("W/\"636462502174844831\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationTypeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } }
Output:
type ApplicationTypesClientBeginDeleteOptions ¶
type ApplicationTypesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationTypesClientBeginDeleteOptions contains the optional parameters for the ApplicationTypesClient.BeginDelete method.
type ApplicationTypesClientCreateOrUpdateOptions ¶
type ApplicationTypesClientCreateOrUpdateOptions struct { }
ApplicationTypesClientCreateOrUpdateOptions contains the optional parameters for the ApplicationTypesClient.CreateOrUpdate method.
type ApplicationTypesClientCreateOrUpdateResponse ¶
type ApplicationTypesClientCreateOrUpdateResponse struct { // The application type name resource ApplicationTypeResource }
ApplicationTypesClientCreateOrUpdateResponse contains the response from method ApplicationTypesClient.CreateOrUpdate.
type ApplicationTypesClientDeleteResponse ¶
type ApplicationTypesClientDeleteResponse struct { }
ApplicationTypesClientDeleteResponse contains the response from method ApplicationTypesClient.BeginDelete.
type ApplicationTypesClientGetOptions ¶
type ApplicationTypesClientGetOptions struct { }
ApplicationTypesClientGetOptions contains the optional parameters for the ApplicationTypesClient.Get method.
type ApplicationTypesClientGetResponse ¶
type ApplicationTypesClientGetResponse struct { // The application type name resource ApplicationTypeResource }
ApplicationTypesClientGetResponse contains the response from method ApplicationTypesClient.Get.
type ApplicationTypesClientListOptions ¶
type ApplicationTypesClientListOptions struct { }
ApplicationTypesClientListOptions contains the optional parameters for the ApplicationTypesClient.NewListPager method.
type ApplicationTypesClientListResponse ¶
type ApplicationTypesClientListResponse struct { // The list of application type names. ApplicationTypeResourceList }
ApplicationTypesClientListResponse contains the response from method ApplicationTypesClient.NewListPager.
type ApplicationUpgradePolicy ¶
type ApplicationUpgradePolicy struct { // Defines a health policy used to evaluate the health of an application or one of its children entities. ApplicationHealthPolicy *ArmApplicationHealthPolicy // If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade // only changes configuration or data). ForceRestart *bool // Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters // are not allowed and it will result in availability loss. RecreateApplication *bool // The policy used for monitoring the application upgrade RollingUpgradeMonitoringPolicy *ArmRollingUpgradeMonitoringPolicy // The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. UpgradeMode *RollingUpgradeMode // The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected // issues. When this timeout expires, processing of the upgrade domain will // proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values // are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). UpgradeReplicaSetCheckTimeout *string }
ApplicationUpgradePolicy - Describes the policy for a monitored application upgrade.
func (ApplicationUpgradePolicy) MarshalJSON ¶
func (a ApplicationUpgradePolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationUpgradePolicy.
func (*ApplicationUpgradePolicy) UnmarshalJSON ¶
func (a *ApplicationUpgradePolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationUpgradePolicy.
type ApplicationUserAssignedIdentity ¶
type ApplicationUserAssignedIdentity struct { // REQUIRED; The friendly name of user assigned identity. Name *string // REQUIRED; The principal id of user assigned identity. PrincipalID *string }
func (ApplicationUserAssignedIdentity) MarshalJSON ¶
func (a ApplicationUserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationUserAssignedIdentity.
func (*ApplicationUserAssignedIdentity) UnmarshalJSON ¶
func (a *ApplicationUserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationUserAssignedIdentity.
type ApplicationsClient ¶
type ApplicationsClient struct {
// contains filtered or unexported fields
}
ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.
func NewApplicationsClient ¶
func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)
NewApplicationsClient creates a new instance of ApplicationsClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationsClient) BeginCreateOrUpdate ¶
func (client *ApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResource, options *ApplicationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Service Fabric application resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- parameters - The application resource.
- options - ApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.BeginCreateOrUpdate method.
Example (PutAnApplicationWithMaximumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_max.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myApp", armservicefabric.ApplicationResource{ Tags: map[string]*string{}, Properties: &armservicefabric.ApplicationResourceProperties{ MaximumNodes: to.Ptr[int64](3), Metrics: []*armservicefabric.ApplicationMetricDescription{ { Name: to.Ptr("metric1"), MaximumCapacity: to.Ptr[int64](3), ReservationCapacity: to.Ptr[int64](1), TotalApplicationCapacity: to.Ptr[int64](5), }}, MinimumNodes: to.Ptr[int64](1), Parameters: map[string]*string{ "param1": to.Ptr("value1"), }, RemoveApplicationCapacity: to.Ptr(false), TypeVersion: to.Ptr("1.0"), UpgradePolicy: &armservicefabric.ApplicationUpgradePolicy{ ApplicationHealthPolicy: &armservicefabric.ArmApplicationHealthPolicy{ ConsiderWarningAsError: to.Ptr(true), DefaultServiceTypeHealthPolicy: &armservicefabric.ArmServiceTypeHealthPolicy{ MaxPercentUnhealthyPartitionsPerService: to.Ptr[int32](0), MaxPercentUnhealthyReplicasPerPartition: to.Ptr[int32](0), MaxPercentUnhealthyServices: to.Ptr[int32](0), }, MaxPercentUnhealthyDeployedApplications: to.Ptr[int32](0), }, ForceRestart: to.Ptr(false), RollingUpgradeMonitoringPolicy: &armservicefabric.ArmRollingUpgradeMonitoringPolicy{ FailureAction: to.Ptr(armservicefabric.ArmUpgradeFailureActionRollback), HealthCheckRetryTimeout: to.Ptr("00:10:00"), HealthCheckStableDuration: to.Ptr("00:05:00"), HealthCheckWaitDuration: to.Ptr("00:02:00"), UpgradeDomainTimeout: to.Ptr("1.06:00:00"), UpgradeTimeout: to.Ptr("01:00:00"), }, UpgradeMode: to.Ptr(armservicefabric.RollingUpgradeModeMonitored), UpgradeReplicaSetCheckTimeout: to.Ptr("01:00:00"), }, TypeName: to.Ptr("myAppType"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (PutAnApplicationWithMinimumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_min.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myApp", armservicefabric.ApplicationResource{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armservicefabric.ApplicationResourceProperties{ RemoveApplicationCapacity: to.Ptr(false), TypeVersion: to.Ptr("1.0"), TypeName: to.Ptr("myAppType"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (PutAnApplicationWithRecreateOption) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_recreate_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myApp", armservicefabric.ApplicationResource{ Tags: map[string]*string{}, Properties: &armservicefabric.ApplicationResourceProperties{ Parameters: map[string]*string{ "param1": to.Ptr("value1"), }, TypeVersion: to.Ptr("1.0"), UpgradePolicy: &armservicefabric.ApplicationUpgradePolicy{ RecreateApplication: to.Ptr(true), }, TypeName: to.Ptr("myAppType"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationsClient) BeginDelete ¶
func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*runtime.Poller[ApplicationsClientDeleteResponse], error)
BeginDelete - Delete a Service Fabric application resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- options - ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationDeleteOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginDelete(ctx, "resRg", "myCluster", "myApp", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationsClient) BeginUpdate ¶
func (client *ApplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters ApplicationResourceUpdate, options *ApplicationsClientBeginUpdateOptions) (*runtime.Poller[ApplicationsClientUpdateResponse], error)
BeginUpdate - Update a Service Fabric application resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- parameters - The application resource for patch operations.
- options - ApplicationsClientBeginUpdateOptions contains the optional parameters for the ApplicationsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPatchOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginUpdate(ctx, "resRg", "myCluster", "myApp", armservicefabric.ApplicationResourceUpdate{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armservicefabric.ApplicationResourceUpdateProperties{ Metrics: []*armservicefabric.ApplicationMetricDescription{ { Name: to.Ptr("metric1"), MaximumCapacity: to.Ptr[int64](3), ReservationCapacity: to.Ptr[int64](1), TotalApplicationCapacity: to.Ptr[int64](5), }}, RemoveApplicationCapacity: to.Ptr(false), TypeVersion: to.Ptr("1.0"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ApplicationsClient) Get ¶
func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error)
Get - Get a Service Fabric application resource created or in the process of being created in the Service Fabric cluster resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationGetOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().Get(ctx, "resRg", "myCluster", "myApp", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationResource = armservicefabric.ApplicationResource{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("applications"), // Etag: to.Ptr("W/\"636462502180261859\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationResourceProperties{ // MaximumNodes: to.Ptr[int64](3), // Metrics: []*armservicefabric.ApplicationMetricDescription{ // { // Name: to.Ptr("metric1"), // MaximumCapacity: to.Ptr[int64](3), // ReservationCapacity: to.Ptr[int64](1), // TotalApplicationCapacity: to.Ptr[int64](5), // }}, // MinimumNodes: to.Ptr[int64](1), // Parameters: map[string]*string{ // "param1": to.Ptr("value1"), // }, // RemoveApplicationCapacity: to.Ptr(false), // TypeVersion: to.Ptr("1.0"), // UpgradePolicy: &armservicefabric.ApplicationUpgradePolicy{ // ApplicationHealthPolicy: &armservicefabric.ArmApplicationHealthPolicy{ // ConsiderWarningAsError: to.Ptr(true), // DefaultServiceTypeHealthPolicy: &armservicefabric.ArmServiceTypeHealthPolicy{ // MaxPercentUnhealthyPartitionsPerService: to.Ptr[int32](0), // MaxPercentUnhealthyReplicasPerPartition: to.Ptr[int32](0), // MaxPercentUnhealthyServices: to.Ptr[int32](0), // }, // MaxPercentUnhealthyDeployedApplications: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // RollingUpgradeMonitoringPolicy: &armservicefabric.ArmRollingUpgradeMonitoringPolicy{ // FailureAction: to.Ptr(armservicefabric.ArmUpgradeFailureActionRollback), // HealthCheckRetryTimeout: to.Ptr("00:10:00"), // HealthCheckStableDuration: to.Ptr("00:05:00"), // HealthCheckWaitDuration: to.Ptr("00:02:00"), // UpgradeDomainTimeout: to.Ptr("1.06:00:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.RollingUpgradeModeMonitored), // UpgradeReplicaSetCheckTimeout: to.Ptr("01:00:00"), // }, // ProvisioningState: to.Ptr("Succeeded"), // TypeName: to.Ptr("myAppType"), // }, // }
Output:
func (*ApplicationsClient) NewListPager ¶
func (client *ApplicationsClient) NewListPager(resourceGroupName string, clusterName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse]
NewListPager - Gets all application resources created or in the process of being created in the Service Fabric cluster resource.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationListOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationsClient().NewListPager("resRg", "myCluster", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationResourceList = armservicefabric.ApplicationResourceList{ // Value: []*armservicefabric.ApplicationResource{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("applications"), // Etag: to.Ptr("W/\"636462502180261858\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ApplicationResourceProperties{ // Metrics: []*armservicefabric.ApplicationMetricDescription{ // { // Name: to.Ptr("metric1"), // MaximumCapacity: to.Ptr[int64](3), // ReservationCapacity: to.Ptr[int64](1), // TotalApplicationCapacity: to.Ptr[int64](5), // }}, // RemoveApplicationCapacity: to.Ptr(false), // TypeVersion: to.Ptr("1.0"), // ProvisioningState: to.Ptr("Succeeded"), // TypeName: to.Ptr("myAppType"), // }, // }}, // } }
Output:
type ApplicationsClientBeginCreateOrUpdateOptions ¶
type ApplicationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.BeginCreateOrUpdate method.
type ApplicationsClientBeginDeleteOptions ¶
type ApplicationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method.
type ApplicationsClientBeginUpdateOptions ¶
type ApplicationsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationsClientBeginUpdateOptions contains the optional parameters for the ApplicationsClient.BeginUpdate method.
type ApplicationsClientCreateOrUpdateResponse ¶
type ApplicationsClientCreateOrUpdateResponse struct { // The application resource. ApplicationResource }
ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.BeginCreateOrUpdate.
type ApplicationsClientDeleteResponse ¶
type ApplicationsClientDeleteResponse struct { }
ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.BeginDelete.
type ApplicationsClientGetOptions ¶
type ApplicationsClientGetOptions struct { }
ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
type ApplicationsClientGetResponse ¶
type ApplicationsClientGetResponse struct { // The application resource. ApplicationResource }
ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get.
type ApplicationsClientListOptions ¶
type ApplicationsClientListOptions struct { }
ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method.
type ApplicationsClientListResponse ¶
type ApplicationsClientListResponse struct { // The list of application resources. ApplicationResourceList }
ApplicationsClientListResponse contains the response from method ApplicationsClient.NewListPager.
type ApplicationsClientUpdateResponse ¶
type ApplicationsClientUpdateResponse struct { // The application resource. ApplicationResource }
ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.BeginUpdate.
type ArmApplicationHealthPolicy ¶
type ArmApplicationHealthPolicy struct { // Indicates whether warnings are treated with the same severity as errors. ConsiderWarningAsError *bool // The health policy used by default to evaluate the health of a service type. DefaultServiceTypeHealthPolicy *ArmServiceTypeHealthPolicy // The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. The // percentage represents the maximum tolerated percentage of deployed applications // that can be unhealthy before the application is considered in error. This is calculated by dividing the number of unhealthy // deployed applications over the number of nodes where the application is // currently deployed on in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default // percentage is zero. MaxPercentUnhealthyDeployedApplications *int32 // The map with service type health policy per service type name. The map is empty by default. ServiceTypeHealthPolicyMap map[string]*ArmServiceTypeHealthPolicy }
ArmApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities.
func (ArmApplicationHealthPolicy) MarshalJSON ¶
func (a ArmApplicationHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmApplicationHealthPolicy.
func (*ArmApplicationHealthPolicy) UnmarshalJSON ¶
func (a *ArmApplicationHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmApplicationHealthPolicy.
type ArmRollingUpgradeMonitoringPolicy ¶
type ArmRollingUpgradeMonitoringPolicy struct { // The activation Mode of the service package FailureAction *ArmUpgradeFailureAction // The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. // It is first interpreted as a string representing an ISO 8601 duration. If // that fails, then it is interpreted as a number representing the total number of milliseconds. HealthCheckRetryTimeout *string // The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade // domain. It is first interpreted as a string representing an ISO 8601 duration. If // that fails, then it is interpreted as a number representing the total number of milliseconds. HealthCheckStableDuration *string // The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted // as a string representing an ISO 8601 duration. If that fails, then it is // interpreted as a number representing the total number of milliseconds. HealthCheckWaitDuration *string // The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string // representing an ISO 8601 duration. If that fails, then it is interpreted as // a number representing the total number of milliseconds. UpgradeDomainTimeout *string // The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string // representing an ISO 8601 duration. If that fails, then it is interpreted as // a number representing the total number of milliseconds. UpgradeTimeout *string }
ArmRollingUpgradeMonitoringPolicy - The policy used for monitoring the application upgrade
func (ArmRollingUpgradeMonitoringPolicy) MarshalJSON ¶
func (a ArmRollingUpgradeMonitoringPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmRollingUpgradeMonitoringPolicy.
func (*ArmRollingUpgradeMonitoringPolicy) UnmarshalJSON ¶
func (a *ArmRollingUpgradeMonitoringPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmRollingUpgradeMonitoringPolicy.
type ArmServicePackageActivationMode ¶
type ArmServicePackageActivationMode string
ArmServicePackageActivationMode - The activation Mode of the service package
const ( // ArmServicePackageActivationModeExclusiveProcess - Indicates the application package activation mode will use exclusive // process. ArmServicePackageActivationModeExclusiveProcess ArmServicePackageActivationMode = "ExclusiveProcess" ArmServicePackageActivationModeSharedProcess ArmServicePackageActivationMode = "SharedProcess" )
func PossibleArmServicePackageActivationModeValues ¶
func PossibleArmServicePackageActivationModeValues() []ArmServicePackageActivationMode
PossibleArmServicePackageActivationModeValues returns the possible values for the ArmServicePackageActivationMode const type.
type ArmServiceTypeHealthPolicy ¶
type ArmServiceTypeHealthPolicy struct { // The maximum percentage of partitions per service allowed to be unhealthy before your application is considered in error. MaxPercentUnhealthyPartitionsPerService *int32 // The maximum percentage of replicas per partition allowed to be unhealthy before your application is considered in error. MaxPercentUnhealthyReplicasPerPartition *int32 // The maximum percentage of services allowed to be unhealthy before your application is considered in error. MaxPercentUnhealthyServices *int32 }
ArmServiceTypeHealthPolicy - Represents the health policy used to evaluate the health of services belonging to a service type.
func (ArmServiceTypeHealthPolicy) MarshalJSON ¶
func (a ArmServiceTypeHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmServiceTypeHealthPolicy.
func (*ArmServiceTypeHealthPolicy) UnmarshalJSON ¶
func (a *ArmServiceTypeHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmServiceTypeHealthPolicy.
type ArmUpgradeFailureAction ¶
type ArmUpgradeFailureAction string
ArmUpgradeFailureAction - The activation Mode of the service package
const ( // ArmUpgradeFailureActionManual - Indicates that a manual repair will need to be performed by the administrator if the upgrade // fails. Service Fabric will not proceed to the next upgrade domain automatically. ArmUpgradeFailureActionManual ArmUpgradeFailureAction = "Manual" // ArmUpgradeFailureActionRollback - Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade // fails. ArmUpgradeFailureActionRollback ArmUpgradeFailureAction = "Rollback" )
func PossibleArmUpgradeFailureActionValues ¶
func PossibleArmUpgradeFailureActionValues() []ArmUpgradeFailureAction
PossibleArmUpgradeFailureActionValues returns the possible values for the ArmUpgradeFailureAction const type.
type AvailableOperationDisplay ¶
type AvailableOperationDisplay struct { // Operation description Description *string // The operation that can be performed. Operation *string // The name of the provider. Provider *string // The resource on which the operation is performed Resource *string }
AvailableOperationDisplay - Operation supported by the Service Fabric resource provider
func (AvailableOperationDisplay) MarshalJSON ¶
func (a AvailableOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplay.
func (*AvailableOperationDisplay) UnmarshalJSON ¶
func (a *AvailableOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplay.
type AzureActiveDirectory ¶
type AzureActiveDirectory struct { // Azure active directory client application id. ClientApplication *string // Azure active directory cluster application id. ClusterApplication *string // Azure active directory tenant id. TenantID *string }
AzureActiveDirectory - The settings to enable AAD authentication on the cluster.
func (AzureActiveDirectory) MarshalJSON ¶
func (a AzureActiveDirectory) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectory.
func (*AzureActiveDirectory) UnmarshalJSON ¶
func (a *AzureActiveDirectory) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectory.
type CertificateDescription ¶
type CertificateDescription struct { // REQUIRED; Thumbprint of the primary certificate. Thumbprint *string // Thumbprint of the secondary certificate. ThumbprintSecondary *string // The local certificate store location. X509StoreName *StoreName }
CertificateDescription - Describes the certificate details.
func (CertificateDescription) MarshalJSON ¶
func (c CertificateDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateDescription.
func (*CertificateDescription) UnmarshalJSON ¶
func (c *CertificateDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDescription.
type ClientCertificateCommonName ¶
type ClientCertificateCommonName struct { // REQUIRED; The common name of the client certificate. CertificateCommonName *string // REQUIRED; The issuer thumbprint of the client certificate. CertificateIssuerThumbprint *string // REQUIRED; Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read // only operations on the cluster. IsAdmin *bool }
ClientCertificateCommonName - Describes the client certificate details using common name.
func (ClientCertificateCommonName) MarshalJSON ¶
func (c ClientCertificateCommonName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientCertificateCommonName.
func (*ClientCertificateCommonName) UnmarshalJSON ¶
func (c *ClientCertificateCommonName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientCertificateCommonName.
type ClientCertificateThumbprint ¶
type ClientCertificateThumbprint struct { // REQUIRED; The thumbprint of the client certificate. CertificateThumbprint *string // REQUIRED; Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read // only operations on the cluster. IsAdmin *bool }
ClientCertificateThumbprint - Describes the client certificate details using thumbprint.
func (ClientCertificateThumbprint) MarshalJSON ¶
func (c ClientCertificateThumbprint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientCertificateThumbprint.
func (*ClientCertificateThumbprint) UnmarshalJSON ¶
func (c *ClientCertificateThumbprint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientCertificateThumbprint.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewApplicationTypeVersionsClient ¶
func (c *ClientFactory) NewApplicationTypeVersionsClient() *ApplicationTypeVersionsClient
NewApplicationTypeVersionsClient creates a new instance of ApplicationTypeVersionsClient.
func (*ClientFactory) NewApplicationTypesClient ¶
func (c *ClientFactory) NewApplicationTypesClient() *ApplicationTypesClient
NewApplicationTypesClient creates a new instance of ApplicationTypesClient.
func (*ClientFactory) NewApplicationsClient ¶
func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
NewApplicationsClient creates a new instance of ApplicationsClient.
func (*ClientFactory) NewClusterVersionsClient ¶
func (c *ClientFactory) NewClusterVersionsClient() *ClusterVersionsClient
NewClusterVersionsClient creates a new instance of ClusterVersionsClient.
func (*ClientFactory) NewClustersClient ¶
func (c *ClientFactory) NewClustersClient() *ClustersClient
NewClustersClient creates a new instance of ClustersClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewServicesClient ¶
func (c *ClientFactory) NewServicesClient() *ServicesClient
NewServicesClient creates a new instance of ServicesClient.
type Cluster ¶
type Cluster struct { // REQUIRED; Azure resource location. Location *string // The cluster resource properties Properties *ClusterProperties // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
Cluster - The cluster resource
func (Cluster) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Cluster.
func (*Cluster) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.
type ClusterCodeVersionsListResult ¶
type ClusterCodeVersionsListResult struct { // The URL to use for getting the next set of results. NextLink *string Value []*ClusterCodeVersionsResult }
ClusterCodeVersionsListResult - The list results of the Service Fabric runtime versions.
func (ClusterCodeVersionsListResult) MarshalJSON ¶
func (c ClusterCodeVersionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCodeVersionsListResult.
func (*ClusterCodeVersionsListResult) UnmarshalJSON ¶
func (c *ClusterCodeVersionsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCodeVersionsListResult.
type ClusterCodeVersionsResult ¶
type ClusterCodeVersionsResult struct { // The identification of the result ID *string // The name of the result Name *string // The detail of the Service Fabric runtime version result Properties *ClusterVersionDetails // The result resource type Type *string }
ClusterCodeVersionsResult - The result of the Service Fabric runtime versions
func (ClusterCodeVersionsResult) MarshalJSON ¶
func (c ClusterCodeVersionsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCodeVersionsResult.
func (*ClusterCodeVersionsResult) UnmarshalJSON ¶
func (c *ClusterCodeVersionsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCodeVersionsResult.
type ClusterEnvironment ¶
type ClusterEnvironment string
ClusterEnvironment - Cluster operating system, the default will be Windows
const ( ClusterEnvironmentLinux ClusterEnvironment = "Linux" ClusterEnvironmentWindows ClusterEnvironment = "Windows" )
func PossibleClusterEnvironmentValues ¶
func PossibleClusterEnvironmentValues() []ClusterEnvironment
PossibleClusterEnvironmentValues returns the possible values for the ClusterEnvironment const type.
type ClusterHealthPolicy ¶
type ClusterHealthPolicy struct { // Defines the application health policy map used to evaluate the health of an application or one of its children entities. ApplicationHealthPolicies map[string]*ApplicationHealthPolicy // The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications // to be unhealthy, this value would be 10. // The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is // considered in error. If the percentage is respected but there is at least one // unhealthy application, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy applications // over the total number of application instances in the cluster, excluding // applications of application types that are included in the ApplicationTypeHealthPolicyMap. The computation rounds up to // tolerate one failure on small numbers of applications. Default percentage is // zero. MaxPercentUnhealthyApplications *int32 // The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, // this value would be 10. // The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered // in error. If the percentage is respected but there is at least one unhealthy // node, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy nodes over the // total number of nodes in the cluster. The computation rounds up to tolerate // one failure on small numbers of nodes. Default percentage is zero. // In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate // that. MaxPercentUnhealthyNodes *int32 }
ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node.
func (ClusterHealthPolicy) MarshalJSON ¶
func (c ClusterHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterHealthPolicy.
func (*ClusterHealthPolicy) UnmarshalJSON ¶
func (c *ClusterHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterHealthPolicy.
type ClusterListResult ¶
type ClusterListResult struct { // The URL to use for getting the next set of results. NextLink *string Value []*Cluster }
ClusterListResult - Cluster list results
func (ClusterListResult) MarshalJSON ¶
func (c ClusterListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterListResult.
func (*ClusterListResult) UnmarshalJSON ¶
func (c *ClusterListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListResult.
type ClusterProperties ¶
type ClusterProperties struct { // REQUIRED; The http management endpoint of the cluster. ManagementEndpoint *string // REQUIRED; The list of node types in the cluster. NodeTypes []*NodeTypeDescription // The list of add-on features to enable in the cluster. AddOnFeatures []*AddOnFeatures // The policy used to clean up unused versions. ApplicationTypeVersionsCleanupPolicy *ApplicationTypeVersionsCleanupPolicy // The AAD authentication settings of the cluster. AzureActiveDirectory *AzureActiveDirectory // The certificate to use for securing the cluster. The certificate provided will be used for node to node security within // the cluster, SSL certificate for cluster management endpoint and default admin // client. Certificate *CertificateDescription // Describes a list of server certificates referenced by common name that are used to secure the cluster. CertificateCommonNames *ServerCertificateCommonNames // The list of client certificates referenced by common name that are allowed to manage the cluster. ClientCertificateCommonNames []*ClientCertificateCommonName // The list of client certificates referenced by thumbprint that are allowed to manage the cluster. ClientCertificateThumbprints []*ClientCertificateThumbprint // The Service Fabric runtime version of the cluster. This property can only by set the user when upgradeMode is set to 'Manual'. // To get list of available Service Fabric versions for new clusters use // ClusterVersion API [https://learn.microsoft.com/rest/api/servicefabric/cluster-versions/list]. To get the list of available // version for existing clusters use availableClusterVersions. ClusterCodeVersion *string // The storage account information for storing Service Fabric diagnostic logs. DiagnosticsStorageAccountConfig *DiagnosticsStorageAccountConfig // Indicates if the event store service is enabled. EventStoreServiceEnabled *bool // The list of custom fabric settings to configure the cluster. FabricSettings []*SettingsSectionDescription // Indicates if infrastructure service manager is enabled. InfrastructureServiceManager *bool // Indicates a list of notification channels for cluster events. Notifications []*Notification // The reliability level sets the replica set size of system services. Learn about ReliabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity]. // * None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // * Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // * Silver - Run the System services with a target replica set count of 5. // * Gold - Run the System services with a target replica set count of 7. // * Platinum - Run the System services with a target replica set count of 9. ReliabilityLevel *ReliabilityLevel // The server certificate used by reverse proxy. ReverseProxyCertificate *CertificateDescription // Describes a list of server certificates referenced by common name that are used to secure the cluster. ReverseProxyCertificateCommonNames *ServerCertificateCommonNames // This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if a node // type with multiple Availability Zones is already present in the cluster. SfZonalUpgradeMode *SfZonalUpgradeMode // The policy to use when upgrading the cluster. UpgradeDescription *ClusterUpgradePolicy // The upgrade mode of the cluster when new Service Fabric runtime version is available. UpgradeMode *UpgradeMode // Indicates the end date and time to pause automatic runtime version upgrades on the cluster for an specific period of time // on the cluster (UTC). UpgradePauseEndTimestampUTC *time.Time // Indicates the start date and time to pause automatic runtime version upgrades on the cluster for an specific period of // time on the cluster (UTC). UpgradePauseStartTimestampUTC *time.Time // Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only // applies when upgradeMode is set to 'Automatic'. UpgradeWave *ClusterUpgradeCadence // The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used. VMImage *string // This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with multiple // Availability Zones is added. VmssZonalUpgradeMode *VmssZonalUpgradeMode // Boolean to pause automatic runtime version upgrades to the cluster. WaveUpgradePaused *bool // READ-ONLY; The Service Fabric runtime versions available for this cluster. AvailableClusterVersions []*ClusterVersionDetails // READ-ONLY; The Azure Resource Provider endpoint. A system service in the cluster connects to this endpoint. ClusterEndpoint *string // READ-ONLY; A service generated unique identifier for the cluster resource. ClusterID *string // READ-ONLY; The current state of the cluster. // * WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric // VM extension to boot up and report to it. // * Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this // state until the cluster boots up and system services are up. // * BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically // initiated when the cluster boots up for the first time. // * UpdatingUserConfiguration - Indicates that the cluster is being upgraded with the user provided configuration. // * UpdatingUserCertificate - Indicates that the cluster is being upgraded with the user provided certificate. // * UpdatingInfrastructure - Indicates that the cluster is being upgraded with the latest Service Fabric runtime version. // This happens only when the upgradeMode is set to 'Automatic'. // * EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the cluster is being upgraded // to the expected version. // * UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource Provider. // Clusters in this state cannot be managed by the Resource Provider. // * AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted. // * Ready - Indicates that the cluster is in a stable state. ClusterState *ClusterState // READ-ONLY; The provisioning state of the cluster resource. ProvisioningState *ProvisioningState }
ClusterProperties - Describes the cluster resource properties.
func (ClusterProperties) MarshalJSON ¶
func (c ClusterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterProperties.
func (*ClusterProperties) UnmarshalJSON ¶
func (c *ClusterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.
type ClusterPropertiesUpdateParameters ¶
type ClusterPropertiesUpdateParameters struct { // The list of add-on features to enable in the cluster. AddOnFeatures []*AddOnFeatures // The policy used to clean up unused versions. ApplicationTypeVersionsCleanupPolicy *ApplicationTypeVersionsCleanupPolicy // The certificate to use for securing the cluster. The certificate provided will be used for node to node security within // the cluster, SSL certificate for cluster management endpoint and default admin // client. Certificate *CertificateDescription // Describes a list of server certificates referenced by common name that are used to secure the cluster. CertificateCommonNames *ServerCertificateCommonNames // The list of client certificates referenced by common name that are allowed to manage the cluster. This will overwrite the // existing list. ClientCertificateCommonNames []*ClientCertificateCommonName // The list of client certificates referenced by thumbprint that are allowed to manage the cluster. This will overwrite the // existing list. ClientCertificateThumbprints []*ClientCertificateThumbprint // The Service Fabric runtime version of the cluster. This property can only by set the user when upgradeMode is set to 'Manual'. // To get list of available Service Fabric versions for new clusters use // ClusterVersion API [https://learn.microsoft.com/rest/api/servicefabric/cluster-versions/list]. To get the list of available // version for existing clusters use availableClusterVersions. ClusterCodeVersion *string // Indicates if the event store service is enabled. EventStoreServiceEnabled *bool // The list of custom fabric settings to configure the cluster. This will overwrite the existing list. FabricSettings []*SettingsSectionDescription // Indicates if infrastructure service manager is enabled. InfrastructureServiceManager *bool // The list of node types in the cluster. This will overwrite the existing list. NodeTypes []*NodeTypeDescription // Indicates a list of notification channels for cluster events. Notifications []*Notification // The reliability level sets the replica set size of system services. Learn about ReliabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity]. // * None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // * Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // * Silver - Run the System services with a target replica set count of 5. // * Gold - Run the System services with a target replica set count of 7. // * Platinum - Run the System services with a target replica set count of 9. ReliabilityLevel *ReliabilityLevel // The server certificate used by reverse proxy. ReverseProxyCertificate *CertificateDescription // This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if a node // type with multiple Availability Zones is already present in the cluster. SfZonalUpgradeMode *SfZonalUpgradeMode // The policy to use when upgrading the cluster. UpgradeDescription *ClusterUpgradePolicy // The upgrade mode of the cluster when new Service Fabric runtime version is available. UpgradeMode *UpgradeMode // The end timestamp of pause runtime version upgrades on the cluster (UTC). UpgradePauseEndTimestampUTC *time.Time // The start timestamp to pause runtime version upgrades on the cluster (UTC). UpgradePauseStartTimestampUTC *time.Time // Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only // applies when upgradeMode is set to 'Automatic'. UpgradeWave *ClusterUpgradeCadence // This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with multiple // Availability Zones is added. VmssZonalUpgradeMode *VmssZonalUpgradeMode // Boolean to pause automatic runtime version upgrades to the cluster. WaveUpgradePaused *bool }
ClusterPropertiesUpdateParameters - Describes the cluster resource properties that can be updated during PATCH operation.
func (ClusterPropertiesUpdateParameters) MarshalJSON ¶
func (c ClusterPropertiesUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPropertiesUpdateParameters.
func (*ClusterPropertiesUpdateParameters) UnmarshalJSON ¶
func (c *ClusterPropertiesUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPropertiesUpdateParameters.
type ClusterState ¶
type ClusterState string
ClusterState - The current state of the cluster. * WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it. * Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up. * BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time. * UpdatingUserConfiguration - Indicates that the cluster is being upgraded with the user provided configuration. * UpdatingUserCertificate - Indicates that the cluster is being upgraded with the user provided certificate. * UpdatingInfrastructure - Indicates that the cluster is being upgraded with the latest Service Fabric runtime version. This happens only when the upgradeMode is set to 'Automatic'. * EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the cluster is being upgraded to the expected version. * UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource Provider. Clusters in this state cannot be managed by the Resource Provider. * AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted. * Ready - Indicates that the cluster is in a stable state.
const ( ClusterStateAutoScale ClusterState = "AutoScale" ClusterStateBaselineUpgrade ClusterState = "BaselineUpgrade" ClusterStateDeploying ClusterState = "Deploying" ClusterStateEnforcingClusterVersion ClusterState = "EnforcingClusterVersion" ClusterStateReady ClusterState = "Ready" ClusterStateUpdatingInfrastructure ClusterState = "UpdatingInfrastructure" ClusterStateUpdatingUserCertificate ClusterState = "UpdatingUserCertificate" ClusterStateUpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration" ClusterStateUpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable" ClusterStateWaitingForNodes ClusterState = "WaitingForNodes" )
func PossibleClusterStateValues ¶
func PossibleClusterStateValues() []ClusterState
PossibleClusterStateValues returns the possible values for the ClusterState const type.
type ClusterUpdateParameters ¶
type ClusterUpdateParameters struct { // Describes the cluster resource properties that can be updated during PATCH operation. Properties *ClusterPropertiesUpdateParameters // Cluster update parameters Tags map[string]*string }
ClusterUpdateParameters - Cluster update request
func (ClusterUpdateParameters) MarshalJSON ¶
func (c ClusterUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterUpdateParameters.
func (*ClusterUpdateParameters) UnmarshalJSON ¶
func (c *ClusterUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateParameters.
type ClusterUpgradeCadence ¶
type ClusterUpgradeCadence string
ClusterUpgradeCadence - Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0.
const ( // ClusterUpgradeCadenceWave0 - Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev // clusters. ClusterUpgradeCadenceWave0 ClusterUpgradeCadence = "Wave0" // ClusterUpgradeCadenceWave1 - Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod // clusters. ClusterUpgradeCadenceWave1 ClusterUpgradeCadence = "Wave1" // ClusterUpgradeCadenceWave2 - Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production // clusters. ClusterUpgradeCadenceWave2 ClusterUpgradeCadence = "Wave2" )
func PossibleClusterUpgradeCadenceValues ¶
func PossibleClusterUpgradeCadenceValues() []ClusterUpgradeCadence
PossibleClusterUpgradeCadenceValues returns the possible values for the ClusterUpgradeCadence const type.
type ClusterUpgradeDeltaHealthPolicy ¶
type ClusterUpgradeDeltaHealthPolicy struct { // REQUIRED; The maximum allowed percentage of applications health degradation allowed during cluster upgrades. The delta // is measured between the state of the applications at the beginning of upgrade and the state // of the applications at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion // to make sure the global state of the cluster is within tolerated limits. // System services are not included in this. MaxPercentDeltaUnhealthyApplications *int32 // REQUIRED; The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. The delta is measured // between the state of the nodes at the beginning of upgrade and the state of the nodes // at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure // the global state of the cluster is within tolerated limits. MaxPercentDeltaUnhealthyNodes *int32 // REQUIRED; The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. The // delta is measured between the state of the upgrade domain nodes at the beginning of // upgrade and the state of the upgrade domain nodes at the time of the health evaluation. The check is performed after every // upgrade domain upgrade completion for all completed upgrade domains to make // sure the state of the upgrade domains is within tolerated limits. MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 // Defines the application delta health policy map used to evaluate the health of an application or one of its child entities // when upgrading the cluster. ApplicationDeltaHealthPolicies map[string]*ApplicationDeltaHealthPolicy }
ClusterUpgradeDeltaHealthPolicy - Describes the delta health policies for the cluster upgrade.
func (ClusterUpgradeDeltaHealthPolicy) MarshalJSON ¶
func (c ClusterUpgradeDeltaHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterUpgradeDeltaHealthPolicy.
func (*ClusterUpgradeDeltaHealthPolicy) UnmarshalJSON ¶
func (c *ClusterUpgradeDeltaHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpgradeDeltaHealthPolicy.
type ClusterUpgradePolicy ¶
type ClusterUpgradePolicy struct { // REQUIRED; The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade // rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. HealthCheckRetryTimeout *string // REQUIRED; The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next // upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. HealthCheckStableDuration *string // REQUIRED; The length of time to wait after completing an upgrade domain before performing health checks. The duration can // be in either hh:mm:ss or in d.hh:mm:ss.ms format. HealthCheckWaitDuration *string // REQUIRED; The cluster health policy used when upgrading the cluster. HealthPolicy *ClusterHealthPolicy // REQUIRED; The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either // hh:mm:ss or in d.hh:mm:ss.ms format. UpgradeDomainTimeout *string // REQUIRED; The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there // are unexpected issues. When this timeout expires, processing of the upgrade domain will // proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. The timeout can // be in either hh:mm:ss or in d.hh:mm:ss.ms format. UpgradeReplicaSetCheckTimeout *string // REQUIRED; The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either // hh:mm:ss or in d.hh:mm:ss.ms format. UpgradeTimeout *string // The cluster delta health policy used when upgrading the cluster. DeltaHealthPolicy *ClusterUpgradeDeltaHealthPolicy // If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade // only changes configuration or data). ForceRestart *bool }
ClusterUpgradePolicy - Describes the policy used when upgrading the cluster.
func (ClusterUpgradePolicy) MarshalJSON ¶
func (c ClusterUpgradePolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterUpgradePolicy.
func (*ClusterUpgradePolicy) UnmarshalJSON ¶
func (c *ClusterUpgradePolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpgradePolicy.
type ClusterVersionDetails ¶
type ClusterVersionDetails struct { // The Service Fabric runtime version of the cluster. CodeVersion *string // Indicates if this version is for Windows or Linux operating system. Environment *ClusterEnvironment // The date of expiry of support of the version. SupportExpiryUTC *string }
ClusterVersionDetails - The detail of the Service Fabric runtime version result
func (ClusterVersionDetails) MarshalJSON ¶
func (c ClusterVersionDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterVersionDetails.
func (*ClusterVersionDetails) UnmarshalJSON ¶
func (c *ClusterVersionDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterVersionDetails.
type ClusterVersionsClient ¶
type ClusterVersionsClient struct {
// contains filtered or unexported fields
}
ClusterVersionsClient contains the methods for the ClusterVersions group. Don't use this type directly, use NewClusterVersionsClient() instead.
func NewClusterVersionsClient ¶
func NewClusterVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterVersionsClient, error)
NewClusterVersionsClient creates a new instance of ClusterVersionsClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClusterVersionsClient) Get ¶
func (client *ClusterVersionsClient) Get(ctx context.Context, location string, clusterVersion string, options *ClusterVersionsClientGetOptions) (ClusterVersionsClientGetResponse, error)
Get - Gets information about an available Service Fabric cluster code version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The location for the cluster code versions. This is different from cluster location.
- clusterVersion - The cluster code version.
- options - ClusterVersionsClientGetOptions contains the optional parameters for the ClusterVersionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGet_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterVersionsClient().Get(ctx, "eastus", "6.1.480.9494", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterCodeVersionsListResult = armservicefabric.ClusterCodeVersionsListResult{ // Value: []*armservicefabric.ClusterCodeVersionsResult{ // { // Name: to.Ptr("6.1.480.9494"), // Type: to.Ptr("Microsoft.ServiceFabric/locations/environments/clusterVersions"), // ID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/clusterVersions/6.1.480.9494"), // Properties: &armservicefabric.ClusterVersionDetails{ // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }, // }}, // }
Output:
func (*ClusterVersionsClient) GetByEnvironment ¶
func (client *ClusterVersionsClient) GetByEnvironment(ctx context.Context, location string, environment ClusterVersionsEnvironment, clusterVersion string, options *ClusterVersionsClientGetByEnvironmentOptions) (ClusterVersionsClientGetByEnvironmentResponse, error)
GetByEnvironment - Gets information about an available Service Fabric cluster code version by environment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The location for the cluster code versions. This is different from cluster location.
- environment - The operating system of the cluster. The default means all.
- clusterVersion - The cluster code version.
- options - ClusterVersionsClientGetByEnvironmentOptions contains the optional parameters for the ClusterVersionsClient.GetByEnvironment method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGetByEnvironment_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterVersionsClient().GetByEnvironment(ctx, "eastus", armservicefabric.ClusterVersionsEnvironmentWindows, "6.1.480.9494", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterCodeVersionsListResult = armservicefabric.ClusterCodeVersionsListResult{ // Value: []*armservicefabric.ClusterCodeVersionsResult{ // { // Name: to.Ptr("6.1.480.9494"), // Type: to.Ptr("Microsoft.ServiceFabric/locations/environments/clusterVersions"), // ID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/clusterVersions/6.1.480.9494"), // Properties: &armservicefabric.ClusterVersionDetails{ // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }, // }}, // }
Output:
func (*ClusterVersionsClient) List ¶
func (client *ClusterVersionsClient) List(ctx context.Context, location string, options *ClusterVersionsClientListOptions) (ClusterVersionsClientListResponse, error)
List - Gets all available code versions for Service Fabric cluster resources by location. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The location for the cluster code versions. This is different from cluster location.
- options - ClusterVersionsClientListOptions contains the optional parameters for the ClusterVersionsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsList_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterVersionsClient().List(ctx, "eastus", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterCodeVersionsListResult = armservicefabric.ClusterCodeVersionsListResult{ // Value: []*armservicefabric.ClusterCodeVersionsResult{ // { // Name: to.Ptr("6.1.480.9494"), // Type: to.Ptr("Microsoft.ServiceFabric/locations/environments/clusterVersions"), // ID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/clusterVersions/6.1.480.9494"), // Properties: &armservicefabric.ClusterVersionDetails{ // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }, // }, // { // Name: to.Ptr("6.1.187.1"), // Type: to.Ptr("Microsoft.ServiceFabric/locations/environments/clusterVersions"), // ID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Linux/clusterVersions/6.1.187.1"), // Properties: &armservicefabric.ClusterVersionDetails{ // CodeVersion: to.Ptr("6.1.187.1"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentLinux), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }, // }}, // }
Output:
func (*ClusterVersionsClient) ListByEnvironment ¶
func (client *ClusterVersionsClient) ListByEnvironment(ctx context.Context, location string, environment ClusterVersionsEnvironment, options *ClusterVersionsClientListByEnvironmentOptions) (ClusterVersionsClientListByEnvironmentResponse, error)
ListByEnvironment - Gets all available code versions for Service Fabric cluster resources by environment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The location for the cluster code versions. This is different from cluster location.
- environment - The operating system of the cluster. The default means all.
- options - ClusterVersionsClientListByEnvironmentOptions contains the optional parameters for the ClusterVersionsClient.ListByEnvironment method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsListByEnvironment.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClusterVersionsClient().ListByEnvironment(ctx, "eastus", armservicefabric.ClusterVersionsEnvironmentWindows, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterCodeVersionsListResult = armservicefabric.ClusterCodeVersionsListResult{ // Value: []*armservicefabric.ClusterCodeVersionsResult{ // { // Name: to.Ptr("6.1.480.9494"), // Type: to.Ptr("Microsoft.ServiceFabric/locations/environments/clusterVersions"), // ID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/clusterVersions/6.1.480.9494"), // Properties: &armservicefabric.ClusterVersionDetails{ // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }, // }}, // }
Output:
type ClusterVersionsClientGetByEnvironmentOptions ¶
type ClusterVersionsClientGetByEnvironmentOptions struct { }
ClusterVersionsClientGetByEnvironmentOptions contains the optional parameters for the ClusterVersionsClient.GetByEnvironment method.
type ClusterVersionsClientGetByEnvironmentResponse ¶
type ClusterVersionsClientGetByEnvironmentResponse struct { // The list results of the Service Fabric runtime versions. ClusterCodeVersionsListResult }
ClusterVersionsClientGetByEnvironmentResponse contains the response from method ClusterVersionsClient.GetByEnvironment.
type ClusterVersionsClientGetOptions ¶
type ClusterVersionsClientGetOptions struct { }
ClusterVersionsClientGetOptions contains the optional parameters for the ClusterVersionsClient.Get method.
type ClusterVersionsClientGetResponse ¶
type ClusterVersionsClientGetResponse struct { // The list results of the Service Fabric runtime versions. ClusterCodeVersionsListResult }
ClusterVersionsClientGetResponse contains the response from method ClusterVersionsClient.Get.
type ClusterVersionsClientListByEnvironmentOptions ¶
type ClusterVersionsClientListByEnvironmentOptions struct { }
ClusterVersionsClientListByEnvironmentOptions contains the optional parameters for the ClusterVersionsClient.ListByEnvironment method.
type ClusterVersionsClientListByEnvironmentResponse ¶
type ClusterVersionsClientListByEnvironmentResponse struct { // The list results of the Service Fabric runtime versions. ClusterCodeVersionsListResult }
ClusterVersionsClientListByEnvironmentResponse contains the response from method ClusterVersionsClient.ListByEnvironment.
type ClusterVersionsClientListOptions ¶
type ClusterVersionsClientListOptions struct { }
ClusterVersionsClientListOptions contains the optional parameters for the ClusterVersionsClient.List method.
type ClusterVersionsClientListResponse ¶
type ClusterVersionsClientListResponse struct { // The list results of the Service Fabric runtime versions. ClusterCodeVersionsListResult }
ClusterVersionsClientListResponse contains the response from method ClusterVersionsClient.List.
type ClusterVersionsEnvironment ¶
type ClusterVersionsEnvironment string
const ( ClusterVersionsEnvironmentLinux ClusterVersionsEnvironment = "Linux" ClusterVersionsEnvironmentWindows ClusterVersionsEnvironment = "Windows" )
func PossibleClusterVersionsEnvironmentValues ¶
func PossibleClusterVersionsEnvironmentValues() []ClusterVersionsEnvironment
PossibleClusterVersionsEnvironmentValues returns the possible values for the ClusterVersionsEnvironment const type.
type ClustersClient ¶
type ClustersClient struct {
// contains filtered or unexported fields
}
ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.
func NewClustersClient ¶
func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)
NewClustersClient creates a new instance of ClustersClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClustersClient) BeginCreateOrUpdate ¶
func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Service Fabric cluster resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- parameters - The cluster resource.
- options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
Example (PutAClusterWithMaximumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_max.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", armservicefabric.Cluster{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armservicefabric.ClusterProperties{ AddOnFeatures: []*armservicefabric.AddOnFeatures{ to.Ptr(armservicefabric.AddOnFeaturesRepairManager), to.Ptr(armservicefabric.AddOnFeaturesDNSService), to.Ptr(armservicefabric.AddOnFeaturesBackupRestoreService), to.Ptr(armservicefabric.AddOnFeaturesResourceMonitorService)}, ApplicationTypeVersionsCleanupPolicy: &armservicefabric.ApplicationTypeVersionsCleanupPolicy{ MaxUnusedVersionsToKeep: to.Ptr[int64](2), }, AzureActiveDirectory: &armservicefabric.AzureActiveDirectory{ ClientApplication: to.Ptr("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"), ClusterApplication: to.Ptr("5886372e-7bf4-4878-a497-8098aba608ae"), TenantID: to.Ptr("6abcc6a0-8666-43f1-87b8-172cf86a9f9c"), }, CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ CommonNames: []*armservicefabric.ServerCertificateCommonName{ { CertificateCommonName: to.Ptr("abc.com"), CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), }}, X509StoreName: to.Ptr(armservicefabric.StoreNameMy), }, ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ { CertificateCommonName: to.Ptr("abc.com"), CertificateIssuerThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), IsAdmin: to.Ptr(true), }}, ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ { CertificateThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), IsAdmin: to.Ptr(true), }}, ClusterCodeVersion: to.Ptr("7.0.470.9590"), DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), StorageAccountName: to.Ptr("diag"), TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), }, EventStoreServiceEnabled: to.Ptr(true), FabricSettings: []*armservicefabric.SettingsSectionDescription{ { Name: to.Ptr("UpgradeService"), Parameters: []*armservicefabric.SettingsParameterDescription{ { Name: to.Ptr("AppPollIntervalInSeconds"), Value: to.Ptr("60"), }}, }}, InfrastructureServiceManager: to.Ptr(true), ManagementEndpoint: to.Ptr("https://myCluster.eastus.cloudapp.azure.com:19080"), NodeTypes: []*armservicefabric.NodeTypeDescription{ { Name: to.Ptr("nt1vm"), ApplicationPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](30000), StartPort: to.Ptr[int32](20000), }, ClientConnectionEndpointPort: to.Ptr[int32](19000), DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelSilver), EphemeralPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](64000), StartPort: to.Ptr[int32](49000), }, HTTPGatewayEndpointPort: to.Ptr[int32](19007), IsPrimary: to.Ptr(true), IsStateless: to.Ptr(false), MultipleAvailabilityZones: to.Ptr(true), VMInstanceCount: to.Ptr[int32](5), }}, Notifications: []*armservicefabric.Notification{ { IsEnabled: to.Ptr(true), NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), NotificationLevel: to.Ptr(armservicefabric.NotificationLevelCritical), NotificationTargets: []*armservicefabric.NotificationTarget{ { NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), Receivers: []*string{ to.Ptr("****@microsoft.com"), to.Ptr("****@microsoft.com")}, }, { NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), Receivers: []*string{ to.Ptr("Owner"), to.Ptr("AccountAdmin")}, }}, }, { IsEnabled: to.Ptr(true), NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), NotificationLevel: to.Ptr(armservicefabric.NotificationLevelAll), NotificationTargets: []*armservicefabric.NotificationTarget{ { NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), Receivers: []*string{ to.Ptr("****@microsoft.com"), to.Ptr("****@microsoft.com")}, }, { NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), Receivers: []*string{ to.Ptr("Owner"), to.Ptr("AccountAdmin")}, }}, }}, ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelPlatinum), ReverseProxyCertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ CommonNames: []*armservicefabric.ServerCertificateCommonName{ { CertificateCommonName: to.Ptr("abc.com"), CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), }}, X509StoreName: to.Ptr(armservicefabric.StoreNameMy), }, SfZonalUpgradeMode: to.Ptr(armservicefabric.SfZonalUpgradeModeHierarchical), UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ ApplicationDeltaHealthPolicies: map[string]*armservicefabric.ApplicationDeltaHealthPolicy{ "fabric:/myApp1": { DefaultServiceTypeDeltaHealthPolicy: &armservicefabric.ServiceTypeDeltaHealthPolicy{ MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), }, ServiceTypeDeltaHealthPolicies: map[string]*armservicefabric.ServiceTypeDeltaHealthPolicy{ "myServiceType1": { MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), }, }, }, }, MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), }, ForceRestart: to.Ptr(false), HealthCheckRetryTimeout: to.Ptr("00:05:00"), HealthCheckStableDuration: to.Ptr("00:00:30"), HealthCheckWaitDuration: to.Ptr("00:00:30"), HealthPolicy: &armservicefabric.ClusterHealthPolicy{ ApplicationHealthPolicies: map[string]*armservicefabric.ApplicationHealthPolicy{ "fabric:/myApp1": { DefaultServiceTypeHealthPolicy: &armservicefabric.ServiceTypeHealthPolicy{ MaxPercentUnhealthyServices: to.Ptr[int32](0), }, ServiceTypeHealthPolicies: map[string]*armservicefabric.ServiceTypeHealthPolicy{ "myServiceType1": { MaxPercentUnhealthyServices: to.Ptr[int32](100), }, }, }, }, MaxPercentUnhealthyApplications: to.Ptr[int32](0), MaxPercentUnhealthyNodes: to.Ptr[int32](0), }, UpgradeDomainTimeout: to.Ptr("00:15:00"), UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), UpgradeTimeout: to.Ptr("01:00:00"), }, UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), UpgradePauseEndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-25T22:00:00.000Z"); return t }()), UpgradePauseStartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T22:00:00.000Z"); return t }()), UpgradeWave: to.Ptr(armservicefabric.ClusterUpgradeCadenceWave1), VMImage: to.Ptr("Windows"), VmssZonalUpgradeMode: to.Ptr(armservicefabric.VmssZonalUpgradeModeParallel), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armservicefabric.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240745\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager), // to.Ptr(armservicefabric.AddOnFeaturesDNSService), // to.Ptr(armservicefabric.AddOnFeaturesBackupRestoreService), // to.Ptr(armservicefabric.AddOnFeaturesResourceMonitorService)}, // ApplicationTypeVersionsCleanupPolicy: &armservicefabric.ApplicationTypeVersionsCleanupPolicy{ // MaxUnusedVersionsToKeep: to.Ptr[int64](2), // }, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("7.0.470.9590"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // AzureActiveDirectory: &armservicefabric.AzureActiveDirectory{ // ClientApplication: to.Ptr("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"), // ClusterApplication: to.Ptr("5886372e-7bf4-4878-a497-8098aba608ae"), // TenantID: to.Ptr("6abcc6a0-8666-43f1-87b8-172cf86a9f9c"), // }, // CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(true), // }}, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // { // CertificateThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(false), // }}, // ClusterCodeVersion: to.Ptr("7.0.470.9590"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // EventStoreServiceEnabled: to.Ptr(true), // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // InfrastructureServiceManager: to.Ptr(true), // ManagementEndpoint: to.Ptr("https://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelSilver), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // IsStateless: to.Ptr(false), // MultipleAvailabilityZones: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // Notifications: []*armservicefabric.Notification{ // { // IsEnabled: to.Ptr(true), // NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), // NotificationLevel: to.Ptr(armservicefabric.NotificationLevelCritical), // NotificationTargets: []*armservicefabric.NotificationTarget{ // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), // Receivers: []*string{ // to.Ptr("****@microsoft.com"), // to.Ptr("****@microsoft.com")}, // }, // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), // Receivers: []*string{ // to.Ptr("Owner"), // to.Ptr("AccountAdmin")}, // }}, // }, // { // IsEnabled: to.Ptr(true), // NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), // NotificationLevel: to.Ptr(armservicefabric.NotificationLevelAll), // NotificationTargets: []*armservicefabric.NotificationTarget{ // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), // Receivers: []*string{ // to.Ptr("****@microsoft.com"), // to.Ptr("****@microsoft.com")}, // }, // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), // Receivers: []*string{ // to.Ptr("Owner"), // to.Ptr("AccountAdmin")}, // }}, // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelPlatinum), // ReverseProxyCertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // SfZonalUpgradeMode: to.Ptr(armservicefabric.SfZonalUpgradeModeHierarchical), // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // ApplicationDeltaHealthPolicies: map[string]*armservicefabric.ApplicationDeltaHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationDeltaHealthPolicy{ // DefaultServiceTypeDeltaHealthPolicy: &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeDeltaHealthPolicies: map[string]*armservicefabric.ServiceTypeDeltaHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // }, // }, // }, // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(true), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // ApplicationHealthPolicies: map[string]*armservicefabric.ApplicationHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationHealthPolicy{ // DefaultServiceTypeHealthPolicy: &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeHealthPolicies: map[string]*armservicefabric.ServiceTypeHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](100), // }, // }, // }, // }, // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("00:15:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // UpgradePauseEndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-25T22:00:00.000Z"); return t}()), // UpgradePauseStartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T22:00:00.000Z"); return t}()), // UpgradeWave: to.Ptr(armservicefabric.ClusterUpgradeCadenceWave1), // VMImage: to.Ptr("Windows"), // VmssZonalUpgradeMode: to.Ptr(armservicefabric.VmssZonalUpgradeModeParallel), // }, // }
Output:
Example (PutAClusterWithMinimumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_min.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", armservicefabric.Cluster{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armservicefabric.ClusterProperties{ DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), StorageAccountName: to.Ptr("diag"), TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), }, FabricSettings: []*armservicefabric.SettingsSectionDescription{ { Name: to.Ptr("UpgradeService"), Parameters: []*armservicefabric.SettingsParameterDescription{ { Name: to.Ptr("AppPollIntervalInSeconds"), Value: to.Ptr("60"), }}, }}, ManagementEndpoint: to.Ptr("http://myCluster.eastus.cloudapp.azure.com:19080"), NodeTypes: []*armservicefabric.NodeTypeDescription{ { Name: to.Ptr("nt1vm"), ApplicationPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](30000), StartPort: to.Ptr[int32](20000), }, ClientConnectionEndpointPort: to.Ptr[int32](19000), DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), EphemeralPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](64000), StartPort: to.Ptr[int32](49000), }, HTTPGatewayEndpointPort: to.Ptr[int32](19007), IsPrimary: to.Ptr(true), VMInstanceCount: to.Ptr[int32](5), }}, ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), UpgradeMode: to.Ptr(armservicefabric.UpgradeModeAutomatic), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armservicefabric.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240743\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("7.0.470.9590"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // }, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // }, // ClusterCodeVersion: to.Ptr("7.0.470.9590"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("http://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:45:00"), // HealthCheckStableDuration: to.Ptr("00:05:00"), // HealthCheckWaitDuration: to.Ptr("00:05:00"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // MaxPercentUnhealthyApplications: to.Ptr[int32](100), // MaxPercentUnhealthyNodes: to.Ptr[int32](100), // }, // UpgradeDomainTimeout: to.Ptr("02:00:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("10675199.02:48:05.4775807"), // UpgradeTimeout: to.Ptr("12:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeAutomatic), // }, // }
Output:
func (*ClustersClient) BeginUpdate ¶
func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdateParameters, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error)
BeginUpdate - Update the configuration of a Service Fabric cluster resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- parameters - The parameters which contains the property value and property name which used to update the cluster configuration.
- options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPatchOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "resRg", "myCluster", armservicefabric.ClusterUpdateParameters{ Properties: &armservicefabric.ClusterPropertiesUpdateParameters{ EventStoreServiceEnabled: to.Ptr(true), NodeTypes: []*armservicefabric.NodeTypeDescription{ { Name: to.Ptr("nt1vm"), ApplicationPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](30000), StartPort: to.Ptr[int32](20000), }, ClientConnectionEndpointPort: to.Ptr[int32](19000), DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), EphemeralPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](64000), StartPort: to.Ptr[int32](49000), }, HTTPGatewayEndpointPort: to.Ptr[int32](19007), IsPrimary: to.Ptr(true), VMInstanceCount: to.Ptr[int32](5), }, { Name: to.Ptr("testnt1"), ApplicationPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](2000), StartPort: to.Ptr[int32](1000), }, ClientConnectionEndpointPort: to.Ptr[int32](0), DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), EphemeralPorts: &armservicefabric.EndpointRangeDescription{ EndPort: to.Ptr[int32](4000), StartPort: to.Ptr[int32](3000), }, HTTPGatewayEndpointPort: to.Ptr[int32](0), IsPrimary: to.Ptr(false), VMInstanceCount: to.Ptr[int32](3), }}, ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelBronze), UpgradeMode: to.Ptr(armservicefabric.UpgradeModeAutomatic), UpgradePauseEndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-25T22:00:00.000Z"); return t }()), UpgradePauseStartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T22:00:00.000Z"); return t }()), UpgradeWave: to.Ptr(armservicefabric.ClusterUpgradeCadence("Wave")), }, Tags: map[string]*string{ "a": to.Ptr("b"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armservicefabric.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240744\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armservicefabric.ClusterProperties{ // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // }, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // }, // ClusterCodeVersion: to.Ptr("6.1.480.9494"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // EventStoreServiceEnabled: to.Ptr(true), // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("http://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }, // { // Name: to.Ptr("testnt1"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](2000), // StartPort: to.Ptr[int32](1000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](0), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](4000), // StartPort: to.Ptr[int32](3000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](0), // IsPrimary: to.Ptr(false), // VMInstanceCount: to.Ptr[int32](3), // }}, // Notifications: []*armservicefabric.Notification{ // { // IsEnabled: to.Ptr(true), // NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), // NotificationLevel: to.Ptr(armservicefabric.NotificationLevelCritical), // NotificationTargets: []*armservicefabric.NotificationTarget{ // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), // Receivers: []*string{ // to.Ptr("****@microsoft.com"), // to.Ptr("****@microsoft.com")}, // }, // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), // Receivers: []*string{ // to.Ptr("Owner"), // to.Ptr("AccountAdmin")}, // }}, // }, // { // IsEnabled: to.Ptr(true), // NotificationCategory: to.Ptr(armservicefabric.NotificationCategoryWaveProgress), // NotificationLevel: to.Ptr(armservicefabric.NotificationLevelAll), // NotificationTargets: []*armservicefabric.NotificationTarget{ // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailUser), // Receivers: []*string{ // to.Ptr("****@microsoft.com"), // to.Ptr("****@microsoft.com")}, // }, // { // NotificationChannel: to.Ptr(armservicefabric.NotificationChannelEmailSubscription), // Receivers: []*string{ // to.Ptr("Owner"), // to.Ptr("AccountAdmin")}, // }}, // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelBronze), // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeAutomatic), // UpgradePauseEndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-25T22:00:00.000Z"); return t}()), // UpgradePauseStartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-21T22:00:00.000Z"); return t}()), // UpgradeWave: to.Ptr(armservicefabric.ClusterUpgradeCadenceWave2), // }, // }
Output:
func (*ClustersClient) Delete ¶
func (client *ClustersClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientDeleteOptions) (ClustersClientDeleteResponse, error)
Delete - Delete a Service Fabric cluster resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- options - ClustersClientDeleteOptions contains the optional parameters for the ClustersClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterDeleteOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewClustersClient().Delete(ctx, "resRg", "myCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ClustersClient) Get ¶
func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)
Get - Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterGetOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Get(ctx, "resRg", "myCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armservicefabric.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240745\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager), // to.Ptr(armservicefabric.AddOnFeaturesDNSService), // to.Ptr(armservicefabric.AddOnFeaturesBackupRestoreService), // to.Ptr(armservicefabric.AddOnFeaturesResourceMonitorService)}, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // AzureActiveDirectory: &armservicefabric.AzureActiveDirectory{ // ClientApplication: to.Ptr("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"), // ClusterApplication: to.Ptr("5886372e-7bf4-4878-a497-8098aba608ae"), // TenantID: to.Ptr("6abcc6a0-8666-43f1-87b8-172cf86a9f9c"), // }, // CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(true), // }}, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // { // CertificateThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(true), // }}, // ClusterCodeVersion: to.Ptr("6.1.480.9494"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("https://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // ReverseProxyCertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // ApplicationDeltaHealthPolicies: map[string]*armservicefabric.ApplicationDeltaHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationDeltaHealthPolicy{ // DefaultServiceTypeDeltaHealthPolicy: &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeDeltaHealthPolicies: map[string]*armservicefabric.ServiceTypeDeltaHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // }, // }, // }, // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // ApplicationHealthPolicies: map[string]*armservicefabric.ApplicationHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationHealthPolicy{ // DefaultServiceTypeHealthPolicy: &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeHealthPolicies: map[string]*armservicefabric.ServiceTypeHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](100), // }, // }, // }, // }, // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // VMImage: to.Ptr("Windows"), // }, // }
Output:
func (*ClustersClient) ListUpgradableVersions ¶
func (client *ClustersClient) ListUpgradableVersions(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListUpgradableVersionsOptions) (ClustersClientListUpgradableVersionsResponse, error)
ListUpgradableVersions - If a target is not provided, it will get the minimum and maximum versions available from the current cluster version. If a target is given, it will provide the required path to get from the current cluster version to the target version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- options - ClustersClientListUpgradableVersionsOptions contains the optional parameters for the ClustersClient.ListUpgradableVersions method.
Example (GetMinimumAndMaximumCodeVersions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsMinMax_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().ListUpgradableVersions(ctx, "resRg", "myCluster", &armservicefabric.ClustersClientListUpgradableVersionsOptions{VersionsDescription: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.UpgradableVersionPathResult = armservicefabric.UpgradableVersionPathResult{ // SupportedPath: []*string{ // to.Ptr("7.0.0.0"), // to.Ptr("7.2.0.0")}, // }
Output:
Example (GetUpgradePath) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsPath_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().ListUpgradableVersions(ctx, "resRg", "myCluster", &armservicefabric.ClustersClientListUpgradableVersionsOptions{VersionsDescription: &armservicefabric.UpgradableVersionsDescription{ TargetVersion: to.Ptr("7.2.432.9590"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.UpgradableVersionPathResult = armservicefabric.UpgradableVersionPathResult{ // SupportedPath: []*string{ // to.Ptr("6.4.664.9590"), // to.Ptr("7.0.466.9590"), // to.Ptr("7.0.470.9590"), // to.Ptr("7.2.432.9590")}, // }
Output:
func (*ClustersClient) NewListByResourceGroupPager ¶
func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets all Service Fabric cluster resources created or in the process of being created in the resource group.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListByResourceGroupOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("resRg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterListResult = armservicefabric.ClusterListResult{ // Value: []*armservicefabric.Cluster{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240745\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager), // to.Ptr(armservicefabric.AddOnFeaturesDNSService), // to.Ptr(armservicefabric.AddOnFeaturesBackupRestoreService), // to.Ptr(armservicefabric.AddOnFeaturesResourceMonitorService)}, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // AzureActiveDirectory: &armservicefabric.AzureActiveDirectory{ // ClientApplication: to.Ptr("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"), // ClusterApplication: to.Ptr("5886372e-7bf4-4878-a497-8098aba608ae"), // TenantID: to.Ptr("6abcc6a0-8666-43f1-87b8-172cf86a9f9c"), // }, // CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(true), // }}, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // { // CertificateThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(false), // }}, // ClusterCodeVersion: to.Ptr("6.1.480.9494"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("https://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // ReverseProxyCertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // ApplicationDeltaHealthPolicies: map[string]*armservicefabric.ApplicationDeltaHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationDeltaHealthPolicy{ // DefaultServiceTypeDeltaHealthPolicy: &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeDeltaHealthPolicies: map[string]*armservicefabric.ServiceTypeDeltaHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // }, // }, // }, // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // ApplicationHealthPolicies: map[string]*armservicefabric.ApplicationHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationHealthPolicy{ // DefaultServiceTypeHealthPolicy: &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeHealthPolicies: map[string]*armservicefabric.ServiceTypeHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](100), // }, // }, // }, // }, // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // VMImage: to.Ptr("Windows"), // }, // }, // { // Name: to.Ptr("myCluster2"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502164040075\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster2"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager)}, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.187.1"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentLinux), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // }, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // }, // ClusterCodeVersion: to.Ptr("6.1.187.1"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("2747e469-b24e-4039-8a0a-46151419523f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("http://myCluster2.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // VMImage: to.Ptr("Ubuntu"), // }, // }}, // } }
Output:
func (*ClustersClient) NewListPager ¶
func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
NewListPager - Gets all Service Fabric cluster resources created or in the process of being created in the subscription.
Generated from API version 2021-06-01
- options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterListResult = armservicefabric.ClusterListResult{ // Value: []*armservicefabric.Cluster{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502169240745\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager), // to.Ptr(armservicefabric.AddOnFeaturesDNSService), // to.Ptr(armservicefabric.AddOnFeaturesBackupRestoreService), // to.Ptr(armservicefabric.AddOnFeaturesResourceMonitorService)}, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.480.9494"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentWindows), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // AzureActiveDirectory: &armservicefabric.AzureActiveDirectory{ // ClientApplication: to.Ptr("d151ad89-4bce-4ae8-b3d1-1dc79679fa75"), // ClusterApplication: to.Ptr("5886372e-7bf4-4878-a497-8098aba608ae"), // TenantID: to.Ptr("6abcc6a0-8666-43f1-87b8-172cf86a9f9c"), // }, // CertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(true), // }}, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // { // CertificateThumbprint: to.Ptr("5F3660C715EBBDA31DB1FFDCF508302348DE8E7A"), // IsAdmin: to.Ptr(false), // }}, // ClusterCodeVersion: to.Ptr("6.1.480.9494"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("https://myCluster.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // ReverseProxyCertificateCommonNames: &armservicefabric.ServerCertificateCommonNames{ // CommonNames: []*armservicefabric.ServerCertificateCommonName{ // { // CertificateCommonName: to.Ptr("abc.com"), // CertificateIssuerThumbprint: to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"), // }}, // X509StoreName: to.Ptr(armservicefabric.StoreNameMy), // }, // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // ApplicationDeltaHealthPolicies: map[string]*armservicefabric.ApplicationDeltaHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationDeltaHealthPolicy{ // DefaultServiceTypeDeltaHealthPolicy: &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeDeltaHealthPolicies: map[string]*armservicefabric.ServiceTypeDeltaHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyServices: to.Ptr[int32](0), // }, // }, // }, // }, // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // ApplicationHealthPolicies: map[string]*armservicefabric.ApplicationHealthPolicy{ // "fabric:/myApp1": &armservicefabric.ApplicationHealthPolicy{ // DefaultServiceTypeHealthPolicy: &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](0), // }, // ServiceTypeHealthPolicies: map[string]*armservicefabric.ServiceTypeHealthPolicy{ // "myServiceType1": &armservicefabric.ServiceTypeHealthPolicy{ // MaxPercentUnhealthyServices: to.Ptr[int32](100), // }, // }, // }, // }, // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // VMImage: to.Ptr("Windows"), // }, // }, // { // Name: to.Ptr("myCluster2"), // Type: to.Ptr("Microsoft.ServiceFabric/clusters"), // Etag: to.Ptr("W/\"636462502164040075\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster2"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.ClusterProperties{ // AddOnFeatures: []*armservicefabric.AddOnFeatures{ // to.Ptr(armservicefabric.AddOnFeaturesRepairManager)}, // AvailableClusterVersions: []*armservicefabric.ClusterVersionDetails{ // { // CodeVersion: to.Ptr("6.1.187.1"), // Environment: to.Ptr(armservicefabric.ClusterEnvironmentLinux), // SupportExpiryUTC: to.Ptr("2018-06-15T23:59:59.9999999"), // }}, // ClientCertificateCommonNames: []*armservicefabric.ClientCertificateCommonName{ // }, // ClientCertificateThumbprints: []*armservicefabric.ClientCertificateThumbprint{ // }, // ClusterCodeVersion: to.Ptr("6.1.187.1"), // ClusterEndpoint: to.Ptr("https://eastus.servicefabric.azure.com"), // ClusterID: to.Ptr("2747e469-b24e-4039-8a0a-46151419523f"), // ClusterState: to.Ptr(armservicefabric.ClusterStateWaitingForNodes), // DiagnosticsStorageAccountConfig: &armservicefabric.DiagnosticsStorageAccountConfig{ // BlobEndpoint: to.Ptr("https://diag.blob.core.windows.net/"), // ProtectedAccountKeyName: to.Ptr("StorageAccountKey1"), // QueueEndpoint: to.Ptr("https://diag.queue.core.windows.net/"), // StorageAccountName: to.Ptr("diag"), // TableEndpoint: to.Ptr("https://diag.table.core.windows.net/"), // }, // FabricSettings: []*armservicefabric.SettingsSectionDescription{ // { // Name: to.Ptr("UpgradeService"), // Parameters: []*armservicefabric.SettingsParameterDescription{ // { // Name: to.Ptr("AppPollIntervalInSeconds"), // Value: to.Ptr("60"), // }}, // }}, // ManagementEndpoint: to.Ptr("http://myCluster2.eastus.cloudapp.azure.com:19080"), // NodeTypes: []*armservicefabric.NodeTypeDescription{ // { // Name: to.Ptr("nt1vm"), // ApplicationPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](30000), // StartPort: to.Ptr[int32](20000), // }, // ClientConnectionEndpointPort: to.Ptr[int32](19000), // DurabilityLevel: to.Ptr(armservicefabric.DurabilityLevelBronze), // EphemeralPorts: &armservicefabric.EndpointRangeDescription{ // EndPort: to.Ptr[int32](64000), // StartPort: to.Ptr[int32](49000), // }, // HTTPGatewayEndpointPort: to.Ptr[int32](19007), // IsPrimary: to.Ptr(true), // VMInstanceCount: to.Ptr[int32](5), // }}, // ProvisioningState: to.Ptr(armservicefabric.ProvisioningStateSucceeded), // ReliabilityLevel: to.Ptr(armservicefabric.ReliabilityLevelSilver), // UpgradeDescription: &armservicefabric.ClusterUpgradePolicy{ // DeltaHealthPolicy: &armservicefabric.ClusterUpgradeDeltaHealthPolicy{ // MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](0), // MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](0), // MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](0), // }, // ForceRestart: to.Ptr(false), // HealthCheckRetryTimeout: to.Ptr("00:05:00"), // HealthCheckStableDuration: to.Ptr("00:00:30"), // HealthCheckWaitDuration: to.Ptr("00:00:30"), // HealthPolicy: &armservicefabric.ClusterHealthPolicy{ // MaxPercentUnhealthyApplications: to.Ptr[int32](0), // MaxPercentUnhealthyNodes: to.Ptr[int32](0), // }, // UpgradeDomainTimeout: to.Ptr("00:15:00"), // UpgradeReplicaSetCheckTimeout: to.Ptr("00:10:00"), // UpgradeTimeout: to.Ptr("01:00:00"), // }, // UpgradeMode: to.Ptr(armservicefabric.UpgradeModeManual), // VMImage: to.Ptr("Ubuntu"), // }, // }}, // } }
Output:
type ClustersClientBeginCreateOrUpdateOptions ¶
type ClustersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
type ClustersClientBeginUpdateOptions ¶
type ClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
type ClustersClientCreateOrUpdateResponse ¶
type ClustersClientCreateOrUpdateResponse struct { // The cluster resource Cluster }
ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate.
type ClustersClientDeleteOptions ¶
type ClustersClientDeleteOptions struct { }
ClustersClientDeleteOptions contains the optional parameters for the ClustersClient.Delete method.
type ClustersClientDeleteResponse ¶
type ClustersClientDeleteResponse struct { }
ClustersClientDeleteResponse contains the response from method ClustersClient.Delete.
type ClustersClientGetOptions ¶
type ClustersClientGetOptions struct { }
ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
type ClustersClientGetResponse ¶
type ClustersClientGetResponse struct { // The cluster resource Cluster }
ClustersClientGetResponse contains the response from method ClustersClient.Get.
type ClustersClientListByResourceGroupOptions ¶
type ClustersClientListByResourceGroupOptions struct { }
ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
type ClustersClientListByResourceGroupResponse ¶
type ClustersClientListByResourceGroupResponse struct { // Cluster list results ClusterListResult }
ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.
type ClustersClientListOptions ¶
type ClustersClientListOptions struct { }
ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
type ClustersClientListResponse ¶
type ClustersClientListResponse struct { // Cluster list results ClusterListResult }
ClustersClientListResponse contains the response from method ClustersClient.NewListPager.
type ClustersClientListUpgradableVersionsOptions ¶
type ClustersClientListUpgradableVersionsOptions struct { // The upgrade path description with target version. VersionsDescription *UpgradableVersionsDescription }
ClustersClientListUpgradableVersionsOptions contains the optional parameters for the ClustersClient.ListUpgradableVersions method.
type ClustersClientListUpgradableVersionsResponse ¶
type ClustersClientListUpgradableVersionsResponse struct { // The list of intermediate cluster code versions for an upgrade or downgrade. Or minimum and maximum upgradable version if // no target was given UpgradableVersionPathResult }
ClustersClientListUpgradableVersionsResponse contains the response from method ClustersClient.ListUpgradableVersions.
type ClustersClientUpdateResponse ¶
type ClustersClientUpdateResponse struct { // The cluster resource Cluster }
ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate.
type DiagnosticsStorageAccountConfig ¶
type DiagnosticsStorageAccountConfig struct { // REQUIRED; The blob endpoint of the azure storage account. BlobEndpoint *string // REQUIRED; The protected diagnostics storage key name. ProtectedAccountKeyName *string // REQUIRED; The queue endpoint of the azure storage account. QueueEndpoint *string // REQUIRED; The Azure storage account name. StorageAccountName *string // REQUIRED; The table endpoint of the azure storage account. TableEndpoint *string // The secondary protected diagnostics storage key name. If one of the storage account keys is rotated the cluster will fallback // to using the other. ProtectedAccountKeyName2 *string }
DiagnosticsStorageAccountConfig - The storage account information for storing Service Fabric diagnostic logs.
func (DiagnosticsStorageAccountConfig) MarshalJSON ¶
func (d DiagnosticsStorageAccountConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiagnosticsStorageAccountConfig.
func (*DiagnosticsStorageAccountConfig) UnmarshalJSON ¶
func (d *DiagnosticsStorageAccountConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsStorageAccountConfig.
type DurabilityLevel ¶
type DurabilityLevel string
DurabilityLevel - The durability level of the node type. Learn about DurabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity]. * Bronze - No privileges. This is the default. * Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. * Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM skus like D15_V2, G5 etc.
const ( DurabilityLevelBronze DurabilityLevel = "Bronze" DurabilityLevelGold DurabilityLevel = "Gold" DurabilityLevelSilver DurabilityLevel = "Silver" )
func PossibleDurabilityLevelValues ¶
func PossibleDurabilityLevelValues() []DurabilityLevel
PossibleDurabilityLevelValues returns the possible values for the DurabilityLevel const type.
type EndpointRangeDescription ¶
type EndpointRangeDescription struct { // REQUIRED; End port of a range of ports EndPort *int32 // REQUIRED; Starting port of a range of ports StartPort *int32 }
EndpointRangeDescription - Port range details
func (EndpointRangeDescription) MarshalJSON ¶
func (e EndpointRangeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointRangeDescription.
func (*EndpointRangeDescription) UnmarshalJSON ¶
func (e *EndpointRangeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointRangeDescription.
type ErrorModel ¶
type ErrorModel struct { // The error details. Error *ErrorModelError }
ErrorModel - The structure of the error.
func (ErrorModel) MarshalJSON ¶
func (e ErrorModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorModel.
func (*ErrorModel) UnmarshalJSON ¶
func (e *ErrorModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorModel.
type ErrorModelError ¶
type ErrorModelError struct { // The error code. Code *string // The error message. Message *string }
ErrorModelError - The error details.
func (ErrorModelError) MarshalJSON ¶
func (e ErrorModelError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorModelError.
func (*ErrorModelError) UnmarshalJSON ¶
func (e *ErrorModelError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorModelError.
type ManagedIdentity ¶
type ManagedIdentity struct { // The type of managed identity for the resource. Type *ManagedIdentityType // The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource // ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The principal id of the managed identity. This property will only be provided for a system assigned identity. PrincipalID *string // READ-ONLY; The tenant id of the managed identity. This property will only be provided for a system assigned identity. TenantID *string }
ManagedIdentity - Describes the managed identities for an Azure resource.
func (ManagedIdentity) MarshalJSON ¶
func (m ManagedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedIdentity.
func (*ManagedIdentity) UnmarshalJSON ¶
func (m *ManagedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity.
type ManagedIdentityType ¶
type ManagedIdentityType string
ManagedIdentityType - The type of managed identity for the resource.
const ( // ManagedIdentityTypeNone - Indicates that no identity is associated with the resource. ManagedIdentityTypeNone ManagedIdentityType = "None" // ManagedIdentityTypeSystemAssigned - Indicates that system assigned identity is associated with the resource. ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned" // ManagedIdentityTypeSystemAssignedUserAssigned - Indicates that both system assigned and user assigned identity are associated // with the resource. ManagedIdentityTypeSystemAssignedUserAssigned ManagedIdentityType = "SystemAssigned, UserAssigned" // ManagedIdentityTypeUserAssigned - Indicates that user assigned identity is associated with the resource. ManagedIdentityTypeUserAssigned ManagedIdentityType = "UserAssigned" )
func PossibleManagedIdentityTypeValues ¶
func PossibleManagedIdentityTypeValues() []ManagedIdentityType
PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type.
type MoveCost ¶
type MoveCost string
MoveCost - Specifies the move cost for the service.
const ( // MoveCostHigh - Specifies the move cost of the service as High. The value is 3. MoveCostHigh MoveCost = "High" // MoveCostLow - Specifies the move cost of the service as Low. The value is 1. MoveCostLow MoveCost = "Low" // MoveCostMedium - Specifies the move cost of the service as Medium. The value is 2. MoveCostMedium MoveCost = "Medium" // MoveCostZero - Zero move cost. This value is zero. MoveCostZero MoveCost = "Zero" )
func PossibleMoveCostValues ¶
func PossibleMoveCostValues() []MoveCost
PossibleMoveCostValues returns the possible values for the MoveCost const type.
type NamedPartitionSchemeDescription ¶
type NamedPartitionSchemeDescription struct { // REQUIRED; The number of partitions. Count *int32 // REQUIRED; Array of size specified by the ‘count’ parameter, for the names of the partitions. Names []*string // REQUIRED; Specifies how the service is partitioned. PartitionScheme *PartitionScheme }
NamedPartitionSchemeDescription - Describes the named partition scheme of the service.
func (*NamedPartitionSchemeDescription) GetPartitionSchemeDescription ¶
func (n *NamedPartitionSchemeDescription) GetPartitionSchemeDescription() *PartitionSchemeDescription
GetPartitionSchemeDescription implements the PartitionSchemeDescriptionClassification interface for type NamedPartitionSchemeDescription.
func (NamedPartitionSchemeDescription) MarshalJSON ¶
func (n NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamedPartitionSchemeDescription.
func (*NamedPartitionSchemeDescription) UnmarshalJSON ¶
func (n *NamedPartitionSchemeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamedPartitionSchemeDescription.
type NodeTypeDescription ¶
type NodeTypeDescription struct { // REQUIRED; The TCP cluster management endpoint port. ClientConnectionEndpointPort *int32 // REQUIRED; The HTTP cluster management endpoint port. HTTPGatewayEndpointPort *int32 // REQUIRED; The node type on which system services will run. Only one node type should be marked as primary. Primary node // type cannot be deleted or changed for existing clusters. IsPrimary *bool // REQUIRED; The name of the node type. Name *string // REQUIRED; VMInstanceCount should be 1 to n, where n indicates the number of VM instances corresponding to this nodeType. // VMInstanceCount = 0 can be done only in these scenarios: NodeType is a secondary // nodeType. Durability = Bronze or Durability >= Bronze and InfrastructureServiceManager = true. If VMInstanceCount = 0, // implies the VMs for this nodeType will not be used for the initial cluster size // computation. VMInstanceCount *int32 // The range of ports from which cluster assigned port to Service Fabric applications. ApplicationPorts *EndpointRangeDescription // The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how // much resource a node has. Capacities map[string]*string // The durability level of the node type. Learn about DurabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity]. // * Bronze - No privileges. This is the default. // * Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. // * Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on // full node VM skus like D15_V2, G5 etc. DurabilityLevel *DurabilityLevel // The range of ephemeral ports that nodes in this node type should be configured with. EphemeralPorts *EndpointRangeDescription // Indicates if the node type can only host Stateless workloads. IsStateless *bool // Indicates if the node type is enabled to support multiple zones. MultipleAvailabilityZones *bool // The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should // run. PlacementProperties map[string]*string // The endpoint used by reverse proxy. ReverseProxyEndpointPort *int32 }
NodeTypeDescription - Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.
func (NodeTypeDescription) MarshalJSON ¶
func (n NodeTypeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NodeTypeDescription.
func (*NodeTypeDescription) UnmarshalJSON ¶
func (n *NodeTypeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NodeTypeDescription.
type Notification ¶
type Notification struct { // REQUIRED; Indicates if the notification is enabled. IsEnabled *bool // REQUIRED; The category of notification. NotificationCategory *NotificationCategory // REQUIRED; The level of notification. NotificationLevel *NotificationLevel // REQUIRED; List of targets that subscribe to the notification. NotificationTargets []*NotificationTarget }
Notification - Describes the notification channel for cluster events.
func (Notification) MarshalJSON ¶
func (n Notification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Notification.
func (*Notification) UnmarshalJSON ¶
func (n *Notification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Notification.
type NotificationCategory ¶
type NotificationCategory string
NotificationCategory - The category of notification.
const ( // NotificationCategoryWaveProgress - Notification will be regarding wave progress. NotificationCategoryWaveProgress NotificationCategory = "WaveProgress" )
func PossibleNotificationCategoryValues ¶
func PossibleNotificationCategoryValues() []NotificationCategory
PossibleNotificationCategoryValues returns the possible values for the NotificationCategory const type.
type NotificationChannel ¶
type NotificationChannel string
NotificationChannel - The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.
const ( // NotificationChannelEmailSubscription - For subscription receivers. In this case, the parameter receivers should be a list // of roles of the subscription for the cluster (eg. Owner, AccountAdmin, etc) that will receive the notifications. NotificationChannelEmailSubscription NotificationChannel = "EmailSubscription" // NotificationChannelEmailUser - For email user receivers. In this case, the parameter receivers should be a list of email // addresses that will receive the notifications. NotificationChannelEmailUser NotificationChannel = "EmailUser" )
func PossibleNotificationChannelValues ¶
func PossibleNotificationChannelValues() []NotificationChannel
PossibleNotificationChannelValues returns the possible values for the NotificationChannel const type.
type NotificationLevel ¶
type NotificationLevel string
NotificationLevel - The level of notification.
const ( // NotificationLevelAll - Receive all notifications. NotificationLevelAll NotificationLevel = "All" // NotificationLevelCritical - Receive only critical notifications. NotificationLevelCritical NotificationLevel = "Critical" )
func PossibleNotificationLevelValues ¶
func PossibleNotificationLevelValues() []NotificationLevel
PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type.
type NotificationTarget ¶
type NotificationTarget struct { // REQUIRED; The notification channel indicates the type of receivers subscribed to the notification, either user or subscription. NotificationChannel *NotificationChannel // REQUIRED; List of targets that subscribe to the notification. Receivers []*string }
NotificationTarget - Describes the notification target properties.
func (NotificationTarget) MarshalJSON ¶
func (n NotificationTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationTarget.
func (*NotificationTarget) UnmarshalJSON ¶
func (n *NotificationTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationTarget.
type OperationListResult ¶
type OperationListResult struct { // List of operations supported by the Service Fabric resource provider. Value []*OperationResult // READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string }
OperationListResult - Describes the result of the request to list Service Fabric resource provider operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationResult ¶
type OperationResult struct { // The object that represents the operation. Display *AvailableOperationDisplay // Indicates whether the operation is a data action IsDataAction *bool // The name of the operation. Name *string // The URL to use for getting the next set of results. NextLink *string // Origin result Origin *string }
OperationResult - Available operation list result
func (OperationResult) MarshalJSON ¶
func (o OperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResult.
func (*OperationResult) UnmarshalJSON ¶
func (o *OperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Get the list of available Service Fabric resource provider API operations.
Generated from API version 2021-06-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armservicefabric.OperationListResult{ // Value: []*armservicefabric.OperationResult{ // { // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), // Display: &armservicefabric.AvailableOperationDisplay{ // Description: to.Ptr("aaaaaaaaaaaaaaa"), // Operation: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), // Provider: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), // Resource: to.Ptr("aaaaaaaaaaaaaaaaaa"), // }, // IsDataAction: to.Ptr(true), // Origin: to.Ptr("aaaaaaaaaaaaaa"), // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Describes the result of the request to list Service Fabric resource provider operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PartitionScheme ¶
type PartitionScheme string
PartitionScheme - Enumerates the ways that a service can be partitioned.
const ( // PartitionSchemeInvalid - Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. // The value is zero. PartitionSchemeInvalid PartitionScheme = "Invalid" // PartitionSchemeNamed - Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription // object. The value is 3 PartitionSchemeNamed PartitionScheme = "Named" // PartitionSchemeSingleton - Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription // object, The value is 1. PartitionSchemeSingleton PartitionScheme = "Singleton" // PartitionSchemeUniformInt64Range - Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription // object. The value is 2. PartitionSchemeUniformInt64Range PartitionScheme = "UniformInt64Range" )
func PossiblePartitionSchemeValues ¶
func PossiblePartitionSchemeValues() []PartitionScheme
PossiblePartitionSchemeValues returns the possible values for the PartitionScheme const type.
type PartitionSchemeDescription ¶
type PartitionSchemeDescription struct { // REQUIRED; Specifies how the service is partitioned. PartitionScheme *PartitionScheme }
PartitionSchemeDescription - Describes how the service is partitioned.
func (*PartitionSchemeDescription) GetPartitionSchemeDescription ¶
func (p *PartitionSchemeDescription) GetPartitionSchemeDescription() *PartitionSchemeDescription
GetPartitionSchemeDescription implements the PartitionSchemeDescriptionClassification interface for type PartitionSchemeDescription.
func (PartitionSchemeDescription) MarshalJSON ¶
func (p PartitionSchemeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartitionSchemeDescription.
func (*PartitionSchemeDescription) UnmarshalJSON ¶
func (p *PartitionSchemeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartitionSchemeDescription.
type PartitionSchemeDescriptionClassification ¶
type PartitionSchemeDescriptionClassification interface { // GetPartitionSchemeDescription returns the PartitionSchemeDescription content of the underlying type. GetPartitionSchemeDescription() *PartitionSchemeDescription }
PartitionSchemeDescriptionClassification provides polymorphic access to related types. Call the interface's GetPartitionSchemeDescription() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *NamedPartitionSchemeDescription, *PartitionSchemeDescription, *SingletonPartitionSchemeDescription, *UniformInt64RangePartitionSchemeDescription
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The provisioning state of the cluster resource.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ProxyResource - The resource model definition for proxy-only resource.
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type ReliabilityLevel ¶
type ReliabilityLevel string
ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about ReliabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity]. * None - Run the System services with a target replica set count of 1. This should only be used for test clusters. * Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. * Silver - Run the System services with a target replica set count of 5. * Gold - Run the System services with a target replica set count of 7. * Platinum - Run the System services with a target replica set count of 9.
const ( ReliabilityLevelBronze ReliabilityLevel = "Bronze" ReliabilityLevelGold ReliabilityLevel = "Gold" ReliabilityLevelNone ReliabilityLevel = "None" ReliabilityLevelPlatinum ReliabilityLevel = "Platinum" ReliabilityLevelSilver ReliabilityLevel = "Silver" )
func PossibleReliabilityLevelValues ¶
func PossibleReliabilityLevelValues() []ReliabilityLevel
PossibleReliabilityLevelValues returns the possible values for the ReliabilityLevel const type.
type Resource ¶
type Resource struct { // REQUIRED; Azure resource location. Location *string // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
Resource - The resource model definition.
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type RollingUpgradeMode ¶
type RollingUpgradeMode string
RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.
const ( // RollingUpgradeModeInvalid - Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. // The value is zero. RollingUpgradeModeInvalid RollingUpgradeMode = "Invalid" // RollingUpgradeModeMonitored - The upgrade will stop after completing each upgrade domain and automatically monitor health // before proceeding. The value is 3 RollingUpgradeModeMonitored RollingUpgradeMode = "Monitored" // RollingUpgradeModeUnmonitoredAuto - The upgrade will proceed automatically without performing any health monitoring. The // value is 1 RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = "UnmonitoredAuto" // RollingUpgradeModeUnmonitoredManual - The upgrade will stop after completing each upgrade domain, giving the opportunity // to manually monitor health before proceeding. The value is 2 RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = "UnmonitoredManual" )
func PossibleRollingUpgradeModeValues ¶
func PossibleRollingUpgradeModeValues() []RollingUpgradeMode
PossibleRollingUpgradeModeValues returns the possible values for the RollingUpgradeMode const type.
type ServerCertificateCommonName ¶
type ServerCertificateCommonName struct { // REQUIRED; The common name of the server certificate. CertificateCommonName *string // REQUIRED; The issuer thumbprint of the server certificate. CertificateIssuerThumbprint *string }
ServerCertificateCommonName - Describes the server certificate details using common name.
func (ServerCertificateCommonName) MarshalJSON ¶
func (s ServerCertificateCommonName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCertificateCommonName.
func (*ServerCertificateCommonName) UnmarshalJSON ¶
func (s *ServerCertificateCommonName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerCertificateCommonName.
type ServerCertificateCommonNames ¶
type ServerCertificateCommonNames struct { // The list of server certificates referenced by common name that are used to secure the cluster. CommonNames []*ServerCertificateCommonName // The local certificate store location. X509StoreName *StoreName }
ServerCertificateCommonNames - Describes a list of server certificates referenced by common name that are used to secure the cluster.
func (ServerCertificateCommonNames) MarshalJSON ¶
func (s ServerCertificateCommonNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCertificateCommonNames.
func (*ServerCertificateCommonNames) UnmarshalJSON ¶
func (s *ServerCertificateCommonNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerCertificateCommonNames.
type ServiceCorrelationDescription ¶
type ServiceCorrelationDescription struct { // REQUIRED; The ServiceCorrelationScheme which describes the relationship between this service and the service specified // via ServiceName. Scheme *ServiceCorrelationScheme // REQUIRED; The name of the service that the correlation relationship is established with. ServiceName *string }
ServiceCorrelationDescription - Creates a particular correlation between services.
func (ServiceCorrelationDescription) MarshalJSON ¶
func (s ServiceCorrelationDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceCorrelationDescription.
func (*ServiceCorrelationDescription) UnmarshalJSON ¶
func (s *ServiceCorrelationDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCorrelationDescription.
type ServiceCorrelationScheme ¶
type ServiceCorrelationScheme string
ServiceCorrelationScheme - The service correlation scheme.
const ( // ServiceCorrelationSchemeAffinity - Indicates that this service has an affinity relationship with another service. Provided // for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The value is 1. ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = "Affinity" // ServiceCorrelationSchemeAlignedAffinity - Aligned affinity ensures that the primaries of the partitions of the affinitized // services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value // is 2. ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = "AlignedAffinity" // ServiceCorrelationSchemeInvalid - An invalid correlation scheme. Cannot be used. The value is zero. ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = "Invalid" // ServiceCorrelationSchemeNonAlignedAffinity - Non-Aligned affinity guarantees that all replicas of each service will be // placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. // The value is 3. ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity" )
func PossibleServiceCorrelationSchemeValues ¶
func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme
PossibleServiceCorrelationSchemeValues returns the possible values for the ServiceCorrelationScheme const type.
type ServiceKind ¶
type ServiceKind string
ServiceKind - The kind of service (Stateless or Stateful).
const ( // ServiceKindInvalid - Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The // value is zero. ServiceKindInvalid ServiceKind = "Invalid" // ServiceKindStateful - Uses Service Fabric to make its state or part of its state highly available and reliable. The value // is 2. ServiceKindStateful ServiceKind = "Stateful" // ServiceKindStateless - Does not use Service Fabric to make its state highly available or reliable. The value is 1. ServiceKindStateless ServiceKind = "Stateless" )
func PossibleServiceKindValues ¶
func PossibleServiceKindValues() []ServiceKind
PossibleServiceKindValues returns the possible values for the ServiceKind const type.
type ServiceLoadMetricDescription ¶
type ServiceLoadMetricDescription struct { // REQUIRED; The name of the metric. If the service chooses to report load during runtime, the load metric name should match // the name that is specified in Name exactly. Note that metric names are case sensitive. Name *string // Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. DefaultLoad *int32 // Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when // it is a Primary replica. PrimaryDefaultLoad *int32 // Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when // it is a Secondary replica. SecondaryDefaultLoad *int32 // The service load metric relative weight, compared to other metrics configured for this service, as a number. Weight *ServiceLoadMetricWeight }
ServiceLoadMetricDescription - Specifies a metric to load balance a service during runtime.
func (ServiceLoadMetricDescription) MarshalJSON ¶
func (s ServiceLoadMetricDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceLoadMetricDescription.
func (*ServiceLoadMetricDescription) UnmarshalJSON ¶
func (s *ServiceLoadMetricDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceLoadMetricDescription.
type ServiceLoadMetricWeight ¶
type ServiceLoadMetricWeight string
ServiceLoadMetricWeight - Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.
const ( // ServiceLoadMetricWeightHigh - Specifies the metric weight of the service load as High. The value is 3. ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = "High" // ServiceLoadMetricWeightLow - Specifies the metric weight of the service load as Low. The value is 1. ServiceLoadMetricWeightLow ServiceLoadMetricWeight = "Low" // ServiceLoadMetricWeightMedium - Specifies the metric weight of the service load as Medium. The value is 2. ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium" // ServiceLoadMetricWeightZero - Disables resource balancing for this metric. This value is zero. ServiceLoadMetricWeightZero ServiceLoadMetricWeight = "Zero" )
func PossibleServiceLoadMetricWeightValues ¶
func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight
PossibleServiceLoadMetricWeightValues returns the possible values for the ServiceLoadMetricWeight const type.
type ServicePlacementPolicyDescription ¶
type ServicePlacementPolicyDescription struct { // REQUIRED; The type of placement policy for a service fabric service. Following are the possible values. Type *ServicePlacementPolicyType }
ServicePlacementPolicyDescription - Describes the policy to be used for placement of a Service Fabric service.
func (*ServicePlacementPolicyDescription) GetServicePlacementPolicyDescription ¶
func (s *ServicePlacementPolicyDescription) GetServicePlacementPolicyDescription() *ServicePlacementPolicyDescription
GetServicePlacementPolicyDescription implements the ServicePlacementPolicyDescriptionClassification interface for type ServicePlacementPolicyDescription.
func (ServicePlacementPolicyDescription) MarshalJSON ¶
func (s ServicePlacementPolicyDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePlacementPolicyDescription.
func (*ServicePlacementPolicyDescription) UnmarshalJSON ¶
func (s *ServicePlacementPolicyDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePlacementPolicyDescription.
type ServicePlacementPolicyDescriptionClassification ¶
type ServicePlacementPolicyDescriptionClassification interface { // GetServicePlacementPolicyDescription returns the ServicePlacementPolicyDescription content of the underlying type. GetServicePlacementPolicyDescription() *ServicePlacementPolicyDescription }
ServicePlacementPolicyDescriptionClassification provides polymorphic access to related types. Call the interface's GetServicePlacementPolicyDescription() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ServicePlacementPolicyDescription
type ServicePlacementPolicyType ¶
type ServicePlacementPolicyType string
ServicePlacementPolicyType - The type of placement policy for a service fabric service. Following are the possible values.
const ( // ServicePlacementPolicyTypeInvalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations // have the invalid type. The value is zero. ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = "Invalid" // ServicePlacementPolicyTypeInvalidDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, // which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1. ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = "InvalidDomain" // ServicePlacementPolicyTypeNonPartiallyPlaceService - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, // which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The // value is 5. ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = "NonPartiallyPlaceService" // ServicePlacementPolicyTypePreferredPrimaryDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, // which indicates that if possible the Primary replica for the partitions of the service should be located in a particular // domain as an optimization. The value is 3. ServicePlacementPolicyTypePreferredPrimaryDomain ServicePlacementPolicyType = "PreferredPrimaryDomain" // ServicePlacementPolicyTypeRequiredDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription // indicating that the replicas of the service must be placed in a specific domain. The value is 2. ServicePlacementPolicyTypeRequiredDomain ServicePlacementPolicyType = "RequiredDomain" // ServicePlacementPolicyTypeRequiredDomainDistribution - Indicates that the ServicePlacementPolicyDescription is of type // ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two // replicas from the same partition in the same domain at any time. The value is 4. ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = "RequiredDomainDistribution" )
func PossibleServicePlacementPolicyTypeValues ¶
func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType
PossibleServicePlacementPolicyTypeValues returns the possible values for the ServicePlacementPolicyType const type.
type ServiceResource ¶
type ServiceResource struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The service resource properties. Properties ServiceResourcePropertiesClassification // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ServiceResource - The service resource.
func (ServiceResource) MarshalJSON ¶
func (s ServiceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResource.
func (*ServiceResource) UnmarshalJSON ¶
func (s *ServiceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.
type ServiceResourceList ¶
type ServiceResourceList struct { Value []*ServiceResource // READ-ONLY; URL to get the next set of service list results if there are any. NextLink *string }
ServiceResourceList - The list of service resources.
func (ServiceResourceList) MarshalJSON ¶
func (s ServiceResourceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceList.
func (*ServiceResourceList) UnmarshalJSON ¶
func (s *ServiceResourceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceList.
type ServiceResourceProperties ¶
type ServiceResourceProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // Describes how the service is partitioned. PartitionDescription PartitionSchemeDescriptionClassification // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service // name. ServiceDNSName *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // The activation Mode of the service package ServicePackageActivationMode *ArmServicePackageActivationMode // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification // The name of the service type ServiceTypeName *string // READ-ONLY; The current deployment or provisioning state, which only appears in the response ProvisioningState *string }
ServiceResourceProperties - The service resource properties.
func (*ServiceResourceProperties) GetServiceResourceProperties ¶
func (s *ServiceResourceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type ServiceResourceProperties.
func (ServiceResourceProperties) MarshalJSON ¶
func (s ServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceProperties.
func (*ServiceResourceProperties) UnmarshalJSON ¶
func (s *ServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceProperties.
type ServiceResourcePropertiesBase ¶
type ServiceResourcePropertiesBase struct { // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification }
ServiceResourcePropertiesBase - The common service resource properties.
func (ServiceResourcePropertiesBase) MarshalJSON ¶
func (s ServiceResourcePropertiesBase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourcePropertiesBase.
func (*ServiceResourcePropertiesBase) UnmarshalJSON ¶
func (s *ServiceResourcePropertiesBase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourcePropertiesBase.
type ServiceResourcePropertiesClassification ¶
type ServiceResourcePropertiesClassification interface { // GetServiceResourceProperties returns the ServiceResourceProperties content of the underlying type. GetServiceResourceProperties() *ServiceResourceProperties }
ServiceResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetServiceResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ServiceResourceProperties, *StatefulServiceProperties, *StatelessServiceProperties
type ServiceResourceUpdate ¶
type ServiceResourceUpdate struct { // It will be deprecated in New API, resource location depends on the parent resource. Location *string // The service resource properties for patch operations. Properties ServiceResourceUpdatePropertiesClassification // Azure resource tags. Tags map[string]*string // READ-ONLY; Azure resource etag. Etag *string // READ-ONLY; Azure resource identifier. ID *string // READ-ONLY; Azure resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; Azure resource type. Type *string }
ServiceResourceUpdate - The service resource for patch operations.
func (ServiceResourceUpdate) MarshalJSON ¶
func (s ServiceResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceUpdate.
func (*ServiceResourceUpdate) UnmarshalJSON ¶
func (s *ServiceResourceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceUpdate.
type ServiceResourceUpdateProperties ¶
type ServiceResourceUpdateProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification }
ServiceResourceUpdateProperties - The service resource properties for patch operations.
func (*ServiceResourceUpdateProperties) GetServiceResourceUpdateProperties ¶
func (s *ServiceResourceUpdateProperties) GetServiceResourceUpdateProperties() *ServiceResourceUpdateProperties
GetServiceResourceUpdateProperties implements the ServiceResourceUpdatePropertiesClassification interface for type ServiceResourceUpdateProperties.
func (ServiceResourceUpdateProperties) MarshalJSON ¶
func (s ServiceResourceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceUpdateProperties.
func (*ServiceResourceUpdateProperties) UnmarshalJSON ¶
func (s *ServiceResourceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceUpdateProperties.
type ServiceResourceUpdatePropertiesClassification ¶
type ServiceResourceUpdatePropertiesClassification interface { // GetServiceResourceUpdateProperties returns the ServiceResourceUpdateProperties content of the underlying type. GetServiceResourceUpdateProperties() *ServiceResourceUpdateProperties }
ServiceResourceUpdatePropertiesClassification provides polymorphic access to related types. Call the interface's GetServiceResourceUpdateProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ServiceResourceUpdateProperties, *StatefulServiceUpdateProperties, *StatelessServiceUpdateProperties
type ServiceTypeDeltaHealthPolicy ¶
type ServiceTypeDeltaHealthPolicy struct { // The maximum allowed percentage of services health degradation allowed during cluster upgrades. The delta is measured between // the state of the services at the beginning of upgrade and the state of the // services at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to // make sure the global state of the cluster is within tolerated limits. MaxPercentDeltaUnhealthyServices *int32 }
ServiceTypeDeltaHealthPolicy - Represents the delta health policy used to evaluate the health of services belonging to a service type when upgrading the cluster.
func (ServiceTypeDeltaHealthPolicy) MarshalJSON ¶
func (s ServiceTypeDeltaHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceTypeDeltaHealthPolicy.
func (*ServiceTypeDeltaHealthPolicy) UnmarshalJSON ¶
func (s *ServiceTypeDeltaHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTypeDeltaHealthPolicy.
type ServiceTypeHealthPolicy ¶
type ServiceTypeHealthPolicy struct { // The maximum percentage of services allowed to be unhealthy before your application is considered in error. MaxPercentUnhealthyServices *int32 }
ServiceTypeHealthPolicy - Represents the health policy used to evaluate the health of services belonging to a service type.
func (ServiceTypeHealthPolicy) MarshalJSON ¶
func (s ServiceTypeHealthPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceTypeHealthPolicy.
func (*ServiceTypeHealthPolicy) UnmarshalJSON ¶
func (s *ServiceTypeHealthPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTypeHealthPolicy.
type ServicesClient ¶
type ServicesClient struct {
// contains filtered or unexported fields
}
ServicesClient contains the methods for the Services group. Don't use this type directly, use NewServicesClient() instead.
func NewServicesClient ¶
func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)
NewServicesClient creates a new instance of ServicesClient with the specified values.
- subscriptionID - The customer subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServicesClient) BeginCreateOrUpdate ¶
func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Service Fabric service resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- serviceName - The name of the service resource in the format of {applicationName}~{serviceName}.
- parameters - The service resource.
- options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.
Example (PutAServiceWithMaximumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_max.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myApp", "myService", armservicefabric.ServiceResource{ Tags: map[string]*string{}, Properties: &armservicefabric.StatelessServiceProperties{ CorrelationScheme: []*armservicefabric.ServiceCorrelationDescription{ { Scheme: to.Ptr(armservicefabric.ServiceCorrelationSchemeAffinity), ServiceName: to.Ptr("fabric:/app1/app1~svc1"), }}, DefaultMoveCost: to.Ptr(armservicefabric.MoveCostMedium), PlacementConstraints: to.Ptr("NodeType==frontend"), ServiceLoadMetrics: []*armservicefabric.ServiceLoadMetricDescription{ { Name: to.Ptr("metric1"), Weight: to.Ptr(armservicefabric.ServiceLoadMetricWeightLow), }}, ServicePlacementPolicies: []armservicefabric.ServicePlacementPolicyDescriptionClassification{}, PartitionDescription: &armservicefabric.SingletonPartitionSchemeDescription{ PartitionScheme: to.Ptr(armservicefabric.PartitionSchemeSingleton), }, ServiceDNSName: to.Ptr("my.service.dns"), ServiceKind: to.Ptr(armservicefabric.ServiceKindStateless), ServicePackageActivationMode: to.Ptr(armservicefabric.ArmServicePackageActivationModeSharedProcess), ServiceTypeName: to.Ptr("myServiceType"), InstanceCount: to.Ptr[int32](5), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
Example (PutAServiceWithMinimumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_min.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", "myApp", "myService", armservicefabric.ServiceResource{ Tags: map[string]*string{}, Properties: &armservicefabric.StatelessServiceProperties{ PartitionDescription: &armservicefabric.SingletonPartitionSchemeDescription{ PartitionScheme: to.Ptr(armservicefabric.PartitionSchemeSingleton), }, ServiceKind: to.Ptr(armservicefabric.ServiceKindStateless), ServiceTypeName: to.Ptr("myServiceType"), InstanceCount: to.Ptr[int32](1), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ServicesClient) BeginDelete ¶
func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error)
BeginDelete - Delete a Service Fabric service resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- serviceName - The name of the service resource in the format of {applicationName}~{serviceName}.
- options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceDeleteOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServicesClient().BeginDelete(ctx, "resRg", "myCluster", "myApp", "myService", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ServicesClient) BeginUpdate ¶
func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, parameters ServiceResourceUpdate, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error)
BeginUpdate - Update a Service Fabric service resource with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- serviceName - The name of the service resource in the format of {applicationName}~{serviceName}.
- parameters - The service resource for patch operations.
- options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePatchOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServicesClient().BeginUpdate(ctx, "resRg", "myCluster", "myApp", "myService", armservicefabric.ServiceResourceUpdate{ Tags: map[string]*string{}, Properties: &armservicefabric.StatelessServiceUpdateProperties{ ServiceLoadMetrics: []*armservicefabric.ServiceLoadMetricDescription{ { Name: to.Ptr("metric1"), Weight: to.Ptr(armservicefabric.ServiceLoadMetricWeightLow), }}, ServiceKind: to.Ptr(armservicefabric.ServiceKindStateless), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*ServicesClient) Get ¶
func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)
Get - Get a Service Fabric service resource created or in the process of being created in the Service Fabric application resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- serviceName - The name of the service resource in the format of {applicationName}~{serviceName}.
- options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceGetOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().Get(ctx, "resRg", "myCluster", "myApp", "myService", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceResource = armservicefabric.ServiceResource{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("services"), // Etag: to.Ptr("W/\"636462502183671258\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.StatelessServiceProperties{ // DefaultMoveCost: to.Ptr(armservicefabric.MoveCostMedium), // PlacementConstraints: to.Ptr("NodeType==frontend"), // ServiceLoadMetrics: []*armservicefabric.ServiceLoadMetricDescription{ // { // Name: to.Ptr("metric1"), // Weight: to.Ptr(armservicefabric.ServiceLoadMetricWeightLow), // }}, // ServicePlacementPolicies: []armservicefabric.ServicePlacementPolicyDescriptionClassification{ // }, // PartitionDescription: &armservicefabric.SingletonPartitionSchemeDescription{ // PartitionScheme: to.Ptr(armservicefabric.PartitionSchemeSingleton), // }, // ProvisioningState: to.Ptr("Succeeded"), // ServiceKind: to.Ptr(armservicefabric.ServiceKindStateless), // ServicePackageActivationMode: to.Ptr(armservicefabric.ArmServicePackageActivationModeSharedProcess), // ServiceTypeName: to.Ptr("myServiceType"), // InstanceCount: to.Ptr[int32](5), // }, // }
Output:
func (*ServicesClient) NewListPager ¶
func (client *ServicesClient) NewListPager(resourceGroupName string, clusterName string, applicationName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse]
NewListPager - Gets all service resources created or in the process of being created in the Service Fabric application resource.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster resource.
- applicationName - The name of the application resource.
- options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b8c74fd80b415fa1ebb6fa787d454694c39e0fd5/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceListOperation_example.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabric.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServicesClient().NewListPager("resRg", "myCluster", "myApp", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServiceResourceList = armservicefabric.ServiceResourceList{ // Value: []*armservicefabric.ServiceResource{ // { // Name: to.Ptr("myCluster"), // Type: to.Ptr("services"), // Etag: to.Ptr("W/\"636462502183671257\""), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armservicefabric.StatelessServiceProperties{ // ServiceLoadMetrics: []*armservicefabric.ServiceLoadMetricDescription{ // { // Name: to.Ptr("metric1"), // Weight: to.Ptr(armservicefabric.ServiceLoadMetricWeightLow), // }}, // PartitionDescription: &armservicefabric.SingletonPartitionSchemeDescription{ // PartitionScheme: to.Ptr(armservicefabric.PartitionSchemeSingleton), // }, // ProvisioningState: to.Ptr("Succeeded"), // ServiceKind: to.Ptr(armservicefabric.ServiceKindStateless), // ServicePackageActivationMode: to.Ptr(armservicefabric.ArmServicePackageActivationModeSharedProcess), // ServiceTypeName: to.Ptr("myServiceType"), // InstanceCount: to.Ptr[int32](1), // }, // }}, // } }
Output:
type ServicesClientBeginCreateOrUpdateOptions ¶
type ServicesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.
type ServicesClientBeginDeleteOptions ¶
type ServicesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.
type ServicesClientBeginUpdateOptions ¶
type ServicesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.
type ServicesClientCreateOrUpdateResponse ¶
type ServicesClientCreateOrUpdateResponse struct { // The service resource. ServiceResource }
ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate.
type ServicesClientDeleteResponse ¶
type ServicesClientDeleteResponse struct { }
ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete.
type ServicesClientGetOptions ¶
type ServicesClientGetOptions struct { }
ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
type ServicesClientGetResponse ¶
type ServicesClientGetResponse struct { // The service resource. ServiceResource }
ServicesClientGetResponse contains the response from method ServicesClient.Get.
type ServicesClientListOptions ¶
type ServicesClientListOptions struct { }
ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
type ServicesClientListResponse ¶
type ServicesClientListResponse struct { // The list of service resources. ServiceResourceList }
ServicesClientListResponse contains the response from method ServicesClient.NewListPager.
type ServicesClientUpdateResponse ¶
type ServicesClientUpdateResponse struct { // The service resource. ServiceResource }
ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate.
type SettingsParameterDescription ¶
type SettingsParameterDescription struct { // REQUIRED; The parameter name of fabric setting. Name *string // REQUIRED; The parameter value of fabric setting. Value *string }
SettingsParameterDescription - Describes a parameter in fabric settings of the cluster.
func (SettingsParameterDescription) MarshalJSON ¶
func (s SettingsParameterDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SettingsParameterDescription.
func (*SettingsParameterDescription) UnmarshalJSON ¶
func (s *SettingsParameterDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SettingsParameterDescription.
type SettingsSectionDescription ¶
type SettingsSectionDescription struct { // REQUIRED; The section name of the fabric settings. Name *string // REQUIRED; The collection of parameters in the section. Parameters []*SettingsParameterDescription }
SettingsSectionDescription - Describes a section in the fabric settings of the cluster.
func (SettingsSectionDescription) MarshalJSON ¶
func (s SettingsSectionDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SettingsSectionDescription.
func (*SettingsSectionDescription) UnmarshalJSON ¶
func (s *SettingsSectionDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SettingsSectionDescription.
type SfZonalUpgradeMode ¶
type SfZonalUpgradeMode string
SfZonalUpgradeMode - This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already present in the cluster.
const ( // SfZonalUpgradeModeHierarchical - If this value is omitted or set to Hierarchical, VMs are grouped to reflect the zonal // distribution in up to 15 UDs. Each of the three zones has five UDs. This ensures that the zones are updated one at a time, // moving to next zone only after completing five UDs within the first zone. This update process is safer for the cluster // and the user application. SfZonalUpgradeModeHierarchical SfZonalUpgradeMode = "Hierarchical" // SfZonalUpgradeModeParallel - VMs under the node type are grouped into UDs and ignore the zone info in five UDs. This setting // causes UDs across all zones to be upgraded at the same time. This deployment mode is faster for upgrades, we don't recommend // it because it goes against the SDP guidelines, which state that the updates should be applied to one zone at a time. SfZonalUpgradeModeParallel SfZonalUpgradeMode = "Parallel" )
func PossibleSfZonalUpgradeModeValues ¶
func PossibleSfZonalUpgradeModeValues() []SfZonalUpgradeMode
PossibleSfZonalUpgradeModeValues returns the possible values for the SfZonalUpgradeMode const type.
type SingletonPartitionSchemeDescription ¶
type SingletonPartitionSchemeDescription struct { // REQUIRED; Specifies how the service is partitioned. PartitionScheme *PartitionScheme }
SingletonPartitionSchemeDescription
func (*SingletonPartitionSchemeDescription) GetPartitionSchemeDescription ¶
func (s *SingletonPartitionSchemeDescription) GetPartitionSchemeDescription() *PartitionSchemeDescription
GetPartitionSchemeDescription implements the PartitionSchemeDescriptionClassification interface for type SingletonPartitionSchemeDescription.
func (SingletonPartitionSchemeDescription) MarshalJSON ¶
func (s SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingletonPartitionSchemeDescription.
func (*SingletonPartitionSchemeDescription) UnmarshalJSON ¶
func (s *SingletonPartitionSchemeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingletonPartitionSchemeDescription.
type StatefulServiceProperties ¶
type StatefulServiceProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of // this property is true, if not it is false. HasPersistedState *bool // The minimum replica set size as a number. MinReplicaSetSize *int32 // Describes how the service is partitioned. PartitionDescription PartitionSchemeDescriptionClassification // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). QuorumLossWaitDuration *time.Time // The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s). ReplicaRestartWaitDuration *time.Time // Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service // name. ServiceDNSName *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // The activation Mode of the service package ServicePackageActivationMode *ArmServicePackageActivationMode // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification // The name of the service type ServiceTypeName *string // The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s). StandByReplicaKeepDuration *time.Time // The target replica set size as a number. TargetReplicaSetSize *int32 // READ-ONLY; The current deployment or provisioning state, which only appears in the response ProvisioningState *string }
StatefulServiceProperties - The properties of a stateful service resource.
func (*StatefulServiceProperties) GetServiceResourceProperties ¶
func (s *StatefulServiceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type StatefulServiceProperties.
func (StatefulServiceProperties) MarshalJSON ¶
func (s StatefulServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatefulServiceProperties.
func (*StatefulServiceProperties) UnmarshalJSON ¶
func (s *StatefulServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatefulServiceProperties.
type StatefulServiceUpdateProperties ¶
type StatefulServiceUpdateProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // The minimum replica set size as a number. MinReplicaSetSize *int32 // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). QuorumLossWaitDuration *time.Time // The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s). ReplicaRestartWaitDuration *time.Time // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification // The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s). StandByReplicaKeepDuration *time.Time // The target replica set size as a number. TargetReplicaSetSize *int32 }
StatefulServiceUpdateProperties - The properties of a stateful service resource for patch operations.
func (*StatefulServiceUpdateProperties) GetServiceResourceUpdateProperties ¶
func (s *StatefulServiceUpdateProperties) GetServiceResourceUpdateProperties() *ServiceResourceUpdateProperties
GetServiceResourceUpdateProperties implements the ServiceResourceUpdatePropertiesClassification interface for type StatefulServiceUpdateProperties.
func (StatefulServiceUpdateProperties) MarshalJSON ¶
func (s StatefulServiceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatefulServiceUpdateProperties.
func (*StatefulServiceUpdateProperties) UnmarshalJSON ¶
func (s *StatefulServiceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatefulServiceUpdateProperties.
type StatelessServiceProperties ¶
type StatelessServiceProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // Delay duration for RequestDrain feature to ensures that the endpoint advertised by the stateless instance is removed before // the delay starts prior to closing the instance. This delay enables existing // requests to drain gracefully before the instance actually goes down // (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). // It is represented in ISO // 8601 format (hh:mm:ss.s). InstanceCloseDelayDuration *string // The instance count. InstanceCount *int32 // Describes how the service is partitioned. PartitionDescription PartitionSchemeDescriptionClassification // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service // name. ServiceDNSName *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // The activation Mode of the service package ServicePackageActivationMode *ArmServicePackageActivationMode // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification // The name of the service type ServiceTypeName *string // READ-ONLY; The current deployment or provisioning state, which only appears in the response ProvisioningState *string }
StatelessServiceProperties - The properties of a stateless service resource.
func (*StatelessServiceProperties) GetServiceResourceProperties ¶
func (s *StatelessServiceProperties) GetServiceResourceProperties() *ServiceResourceProperties
GetServiceResourceProperties implements the ServiceResourcePropertiesClassification interface for type StatelessServiceProperties.
func (StatelessServiceProperties) MarshalJSON ¶
func (s StatelessServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatelessServiceProperties.
func (*StatelessServiceProperties) UnmarshalJSON ¶
func (s *StatelessServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatelessServiceProperties.
type StatelessServiceUpdateProperties ¶
type StatelessServiceUpdateProperties struct { // REQUIRED; The kind of service (Stateless or Stateful). ServiceKind *ServiceKind // A list that describes the correlation of the service with other services. CorrelationScheme []*ServiceCorrelationDescription // Specifies the move cost for the service. DefaultMoveCost *MoveCost // Delay duration for RequestDrain feature to ensures that the endpoint advertised by the stateless instance is removed before // the delay starts prior to closing the instance. This delay enables existing // requests to drain gracefully before the instance actually goes down // (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). // It is first interpreted as // a string representing an ISO 8601 duration. It is represented in ISO 8601 format (hh:mm:ss.s). InstanceCloseDelayDuration *string // The instance count. InstanceCount *int32 // The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting // a service to particular nodes based on the service requirements. For // example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". PlacementConstraints *string // The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetrics []*ServiceLoadMetricDescription // A list that describes the correlation of the service with other services. ServicePlacementPolicies []ServicePlacementPolicyDescriptionClassification }
StatelessServiceUpdateProperties - The properties of a stateless service resource for patch operations.
func (*StatelessServiceUpdateProperties) GetServiceResourceUpdateProperties ¶
func (s *StatelessServiceUpdateProperties) GetServiceResourceUpdateProperties() *ServiceResourceUpdateProperties
GetServiceResourceUpdateProperties implements the ServiceResourceUpdatePropertiesClassification interface for type StatelessServiceUpdateProperties.
func (StatelessServiceUpdateProperties) MarshalJSON ¶
func (s StatelessServiceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatelessServiceUpdateProperties.
func (*StatelessServiceUpdateProperties) UnmarshalJSON ¶
func (s *StatelessServiceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatelessServiceUpdateProperties.
type StoreName ¶
type StoreName string
StoreName - The local certificate store location.
const ( StoreNameAddressBook StoreName = "AddressBook" StoreNameAuthRoot StoreName = "AuthRoot" StoreNameCertificateAuthority StoreName = "CertificateAuthority" StoreNameDisallowed StoreName = "Disallowed" StoreNameMy StoreName = "My" StoreNameRoot StoreName = "Root" StoreNameTrustedPeople StoreName = "TrustedPeople" StoreNameTrustedPublisher StoreName = "TrustedPublisher" )
func PossibleStoreNameValues ¶
func PossibleStoreNameValues() []StoreName
PossibleStoreNameValues returns the possible values for the StoreName const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *string // The timestamp of resource last modification (UTC). LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *string }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type UniformInt64RangePartitionSchemeDescription ¶
type UniformInt64RangePartitionSchemeDescription struct { // REQUIRED; The number of partitions. Count *int32 // REQUIRED; String indicating the upper bound of the partition key range that should be split between the partition ‘count’ HighKey *string // REQUIRED; String indicating the lower bound of the partition key range that should be split between the partition ‘count’ LowKey *string // REQUIRED; Specifies how the service is partitioned. PartitionScheme *PartitionScheme }
UniformInt64RangePartitionSchemeDescription - Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions.
func (*UniformInt64RangePartitionSchemeDescription) GetPartitionSchemeDescription ¶
func (u *UniformInt64RangePartitionSchemeDescription) GetPartitionSchemeDescription() *PartitionSchemeDescription
GetPartitionSchemeDescription implements the PartitionSchemeDescriptionClassification interface for type UniformInt64RangePartitionSchemeDescription.
func (UniformInt64RangePartitionSchemeDescription) MarshalJSON ¶
func (u UniformInt64RangePartitionSchemeDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UniformInt64RangePartitionSchemeDescription.
func (*UniformInt64RangePartitionSchemeDescription) UnmarshalJSON ¶
func (u *UniformInt64RangePartitionSchemeDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UniformInt64RangePartitionSchemeDescription.
type UpgradableVersionPathResult ¶
type UpgradableVersionPathResult struct {
SupportedPath []*string
}
UpgradableVersionPathResult - The list of intermediate cluster code versions for an upgrade or downgrade. Or minimum and maximum upgradable version if no target was given
func (UpgradableVersionPathResult) MarshalJSON ¶
func (u UpgradableVersionPathResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpgradableVersionPathResult.
func (*UpgradableVersionPathResult) UnmarshalJSON ¶
func (u *UpgradableVersionPathResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpgradableVersionPathResult.
type UpgradableVersionsDescription ¶
type UpgradableVersionsDescription struct { // REQUIRED; The target code version. TargetVersion *string }
func (UpgradableVersionsDescription) MarshalJSON ¶
func (u UpgradableVersionsDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpgradableVersionsDescription.
func (*UpgradableVersionsDescription) UnmarshalJSON ¶
func (u *UpgradableVersionsDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpgradableVersionsDescription.
type UpgradeMode ¶
type UpgradeMode string
UpgradeMode - The upgrade mode of the cluster when new Service Fabric runtime version is available.
const ( // UpgradeModeAutomatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version, **upgradeWave** // will determine when the upgrade starts after the new version becomes available. UpgradeModeAutomatic UpgradeMode = "Automatic" // UpgradeModeManual - The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster // is upgraded by setting the **clusterCodeVersion** property in the cluster resource. UpgradeModeManual UpgradeMode = "Manual" )
func PossibleUpgradeModeValues ¶
func PossibleUpgradeModeValues() []UpgradeMode
PossibleUpgradeModeValues returns the possible values for the UpgradeMode const type.
type UserAssignedIdentity ¶
type UserAssignedIdentity struct { // READ-ONLY; The client id of user assigned identity. ClientID *string // READ-ONLY; The principal id of user assigned identity. PrincipalID *string }
func (UserAssignedIdentity) MarshalJSON ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VmssZonalUpgradeMode ¶
type VmssZonalUpgradeMode string
VmssZonalUpgradeMode - This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with multiple Availability Zones is added.
const ( // VmssZonalUpgradeModeHierarchical - VMs are grouped to reflect the zonal distribution in up to 15 UDs. Each of the three // zones has five UDs. This ensures that the zones are updated one at a time, moving to next zone only after completing five // UDs within the first zone. VmssZonalUpgradeModeHierarchical VmssZonalUpgradeMode = "Hierarchical" // VmssZonalUpgradeModeParallel - Updates will happen in all Availability Zones at once for the virtual machine scale sets. VmssZonalUpgradeModeParallel VmssZonalUpgradeMode = "Parallel" )
func PossibleVmssZonalUpgradeModeValues ¶
func PossibleVmssZonalUpgradeModeValues() []VmssZonalUpgradeMode
PossibleVmssZonalUpgradeModeValues returns the possible values for the VmssZonalUpgradeMode const type.
Source Files ¶
- applications_client.go
- applicationtypes_client.go
- applicationtypeversions_client.go
- build.go
- client_factory.go
- clusters_client.go
- clusterversions_client.go
- constants.go
- interfaces.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- polymorphic_helpers.go
- response_types.go
- services_client.go
- time_rfc3339.go