Documentation ¶
Index ¶
- type AddRemoveReplicaScalingMechanism
- type ApplicationClient
- func (client *ApplicationClient) Create(ctx context.Context, resourceGroupName string, applicationResourceName string, ...) (ApplicationClientCreateResponse, error)
- func (client *ApplicationClient) Delete(ctx context.Context, resourceGroupName string, applicationResourceName string, ...) (ApplicationClientDeleteResponse, error)
- func (client *ApplicationClient) Get(ctx context.Context, resourceGroupName string, applicationResourceName string, ...) (ApplicationClientGetResponse, error)
- func (client *ApplicationClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationClientListByResourceGroupOptions) *runtime.Pager[ApplicationClientListByResourceGroupResponse]
- func (client *ApplicationClient) NewListBySubscriptionPager(options *ApplicationClientListBySubscriptionOptions) *runtime.Pager[ApplicationClientListBySubscriptionResponse]
- type ApplicationClientCreateOptions
- type ApplicationClientCreateResponse
- type ApplicationClientDeleteOptions
- type ApplicationClientDeleteResponse
- type ApplicationClientGetOptions
- type ApplicationClientGetResponse
- type ApplicationClientListByResourceGroupOptions
- type ApplicationClientListByResourceGroupResponse
- type ApplicationClientListBySubscriptionOptions
- type ApplicationClientListBySubscriptionResponse
- type ApplicationProperties
- type ApplicationResourceDescription
- type ApplicationResourceDescriptionList
- type ApplicationResourceProperties
- type ApplicationScopedVolume
- type ApplicationScopedVolumeCreationParameters
- func (a *ApplicationScopedVolumeCreationParameters) GetApplicationScopedVolumeCreationParameters() *ApplicationScopedVolumeCreationParameters
- func (a ApplicationScopedVolumeCreationParameters) MarshalJSON() ([]byte, error)
- func (a *ApplicationScopedVolumeCreationParameters) UnmarshalJSON(data []byte) error
- type ApplicationScopedVolumeCreationParametersClassification
- type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk
- func (a *ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) GetApplicationScopedVolumeCreationParameters() *ApplicationScopedVolumeCreationParameters
- func (a ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) MarshalJSON() ([]byte, error)
- func (a *ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) UnmarshalJSON(data []byte) error
- type ApplicationScopedVolumeKind
- type AutoScalingMechanism
- type AutoScalingMechanismClassification
- type AutoScalingMechanismKind
- type AutoScalingMetric
- type AutoScalingMetricClassification
- type AutoScalingMetricKind
- type AutoScalingPolicy
- type AutoScalingResourceMetric
- type AutoScalingResourceMetricName
- type AutoScalingTrigger
- type AutoScalingTriggerClassification
- type AutoScalingTriggerKind
- type AvailableOperationDisplay
- type AverageLoadScalingTrigger
- type AzureInternalMonitoringPipelineSinkDescription
- type ClientFactory
- func (c *ClientFactory) NewApplicationClient() *ApplicationClient
- func (c *ClientFactory) NewCodePackageClient() *CodePackageClient
- func (c *ClientFactory) NewGatewayClient() *GatewayClient
- func (c *ClientFactory) NewNetworkClient() *NetworkClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewSecretClient() *SecretClient
- func (c *ClientFactory) NewSecretValueClient() *SecretValueClient
- func (c *ClientFactory) NewServiceClient() *ServiceClient
- func (c *ClientFactory) NewServiceReplicaClient() *ServiceReplicaClient
- func (c *ClientFactory) NewVolumeClient() *VolumeClient
- type CodePackageClient
- type CodePackageClientGetContainerLogsOptions
- type CodePackageClientGetContainerLogsResponse
- type ContainerCodePackageProperties
- type ContainerEvent
- type ContainerInstanceView
- type ContainerLabel
- type ContainerLogs
- type ContainerState
- type DiagnosticsDescription
- type DiagnosticsRef
- type DiagnosticsSinkKind
- type DiagnosticsSinkProperties
- type DiagnosticsSinkPropertiesClassification
- type EndpointProperties
- type EndpointRef
- type EnvironmentVariable
- type ErrorDetailsModel
- type ErrorErrorModel
- type ErrorModel
- type GatewayClient
- func (client *GatewayClient) Create(ctx context.Context, resourceGroupName string, gatewayResourceName string, ...) (GatewayClientCreateResponse, error)
- func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, gatewayResourceName string, ...) (GatewayClientDeleteResponse, error)
- func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, gatewayResourceName string, ...) (GatewayClientGetResponse, error)
- func (client *GatewayClient) NewListByResourceGroupPager(resourceGroupName string, options *GatewayClientListByResourceGroupOptions) *runtime.Pager[GatewayClientListByResourceGroupResponse]
- func (client *GatewayClient) NewListBySubscriptionPager(options *GatewayClientListBySubscriptionOptions) *runtime.Pager[GatewayClientListBySubscriptionResponse]
- type GatewayClientCreateOptions
- type GatewayClientCreateResponse
- type GatewayClientDeleteOptions
- type GatewayClientDeleteResponse
- type GatewayClientGetOptions
- type GatewayClientGetResponse
- type GatewayClientListByResourceGroupOptions
- type GatewayClientListByResourceGroupResponse
- type GatewayClientListBySubscriptionOptions
- type GatewayClientListBySubscriptionResponse
- type GatewayDestination
- type GatewayProperties
- type GatewayResourceDescription
- type GatewayResourceDescriptionList
- type GatewayResourceProperties
- type HTTPConfig
- type HTTPHostConfig
- type HTTPRouteConfig
- type HTTPRouteMatchHeader
- type HTTPRouteMatchPath
- type HTTPRouteMatchRule
- type HeaderMatchType
- type HealthState
- type ImageRegistryCredential
- type InlinedValueSecretResourceProperties
- func (i *InlinedValueSecretResourceProperties) GetSecretResourceProperties() *SecretResourceProperties
- func (i *InlinedValueSecretResourceProperties) GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase
- func (i InlinedValueSecretResourceProperties) MarshalJSON() ([]byte, error)
- func (i *InlinedValueSecretResourceProperties) UnmarshalJSON(data []byte) error
- type LocalNetworkResourceProperties
- func (l *LocalNetworkResourceProperties) GetNetworkResourceProperties() *NetworkResourceProperties
- func (l *LocalNetworkResourceProperties) GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase
- func (l LocalNetworkResourceProperties) MarshalJSON() ([]byte, error)
- func (l *LocalNetworkResourceProperties) UnmarshalJSON(data []byte) error
- type ManagedProxyResource
- type NetworkClient
- func (client *NetworkClient) Create(ctx context.Context, resourceGroupName string, networkResourceName string, ...) (NetworkClientCreateResponse, error)
- func (client *NetworkClient) Delete(ctx context.Context, resourceGroupName string, networkResourceName string, ...) (NetworkClientDeleteResponse, error)
- func (client *NetworkClient) Get(ctx context.Context, resourceGroupName string, networkResourceName string, ...) (NetworkClientGetResponse, error)
- func (client *NetworkClient) NewListByResourceGroupPager(resourceGroupName string, options *NetworkClientListByResourceGroupOptions) *runtime.Pager[NetworkClientListByResourceGroupResponse]
- func (client *NetworkClient) NewListBySubscriptionPager(options *NetworkClientListBySubscriptionOptions) *runtime.Pager[NetworkClientListBySubscriptionResponse]
- type NetworkClientCreateOptions
- type NetworkClientCreateResponse
- type NetworkClientDeleteOptions
- type NetworkClientDeleteResponse
- type NetworkClientGetOptions
- type NetworkClientGetResponse
- type NetworkClientListByResourceGroupOptions
- type NetworkClientListByResourceGroupResponse
- type NetworkClientListBySubscriptionOptions
- type NetworkClientListBySubscriptionResponse
- type NetworkKind
- type NetworkRef
- type NetworkResourceDescription
- type NetworkResourceDescriptionList
- type NetworkResourceProperties
- func (n *NetworkResourceProperties) GetNetworkResourceProperties() *NetworkResourceProperties
- func (n *NetworkResourceProperties) GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase
- func (n NetworkResourceProperties) MarshalJSON() ([]byte, error)
- func (n *NetworkResourceProperties) UnmarshalJSON(data []byte) error
- type NetworkResourcePropertiesBase
- type NetworkResourcePropertiesBaseClassification
- type NetworkResourcePropertiesClassification
- type OperatingSystemType
- type OperationListResult
- type OperationResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PathMatchType
- type ProvisionedResourceProperties
- type ProxyResource
- type ReliableCollectionsRef
- type Resource
- type ResourceLimits
- type ResourceRequests
- type ResourceRequirements
- type ResourceStatus
- type SecretClient
- func (client *SecretClient) Create(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretClientCreateResponse, error)
- func (client *SecretClient) Delete(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretClientDeleteResponse, error)
- func (client *SecretClient) Get(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretClientGetResponse, error)
- func (client *SecretClient) NewListByResourceGroupPager(resourceGroupName string, options *SecretClientListByResourceGroupOptions) *runtime.Pager[SecretClientListByResourceGroupResponse]
- func (client *SecretClient) NewListBySubscriptionPager(options *SecretClientListBySubscriptionOptions) *runtime.Pager[SecretClientListBySubscriptionResponse]
- type SecretClientCreateOptions
- type SecretClientCreateResponse
- type SecretClientDeleteOptions
- type SecretClientDeleteResponse
- type SecretClientGetOptions
- type SecretClientGetResponse
- type SecretClientListByResourceGroupOptions
- type SecretClientListByResourceGroupResponse
- type SecretClientListBySubscriptionOptions
- type SecretClientListBySubscriptionResponse
- type SecretKind
- type SecretResourceDescription
- type SecretResourceDescriptionList
- type SecretResourceProperties
- func (s *SecretResourceProperties) GetSecretResourceProperties() *SecretResourceProperties
- func (s *SecretResourceProperties) GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase
- func (s SecretResourceProperties) MarshalJSON() ([]byte, error)
- func (s *SecretResourceProperties) UnmarshalJSON(data []byte) error
- type SecretResourcePropertiesBase
- type SecretResourcePropertiesBaseClassification
- type SecretResourcePropertiesClassification
- type SecretValue
- type SecretValueClient
- func (client *SecretValueClient) Create(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretValueClientCreateResponse, error)
- func (client *SecretValueClient) Delete(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretValueClientDeleteResponse, error)
- func (client *SecretValueClient) Get(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretValueClientGetResponse, error)
- func (client *SecretValueClient) ListValue(ctx context.Context, resourceGroupName string, secretResourceName string, ...) (SecretValueClientListValueResponse, error)
- func (client *SecretValueClient) NewListPager(resourceGroupName string, secretResourceName string, ...) *runtime.Pager[SecretValueClientListResponse]
- type SecretValueClientCreateOptions
- type SecretValueClientCreateResponse
- type SecretValueClientDeleteOptions
- type SecretValueClientDeleteResponse
- type SecretValueClientGetOptions
- type SecretValueClientGetResponse
- type SecretValueClientListOptions
- type SecretValueClientListResponse
- type SecretValueClientListValueOptions
- type SecretValueClientListValueResponse
- type SecretValueProperties
- type SecretValueResourceDescription
- type SecretValueResourceDescriptionList
- type SecretValueResourceProperties
- type ServiceClient
- type ServiceClientGetOptions
- type ServiceClientGetResponse
- type ServiceClientListOptions
- type ServiceClientListResponse
- type ServiceProperties
- type ServiceReplicaClient
- func (client *ServiceReplicaClient) Get(ctx context.Context, resourceGroupName string, applicationResourceName string, ...) (ServiceReplicaClientGetResponse, error)
- func (client *ServiceReplicaClient) NewListPager(resourceGroupName string, applicationResourceName string, ...) *runtime.Pager[ServiceReplicaClientListResponse]
- type ServiceReplicaClientGetOptions
- type ServiceReplicaClientGetResponse
- type ServiceReplicaClientListOptions
- type ServiceReplicaClientListResponse
- type ServiceReplicaDescription
- type ServiceReplicaDescriptionList
- type ServiceReplicaProperties
- type ServiceResourceDescription
- type ServiceResourceDescriptionList
- type ServiceResourceProperties
- type Setting
- type SizeTypes
- type TCPConfig
- type TrackedResource
- type VolumeClient
- func (client *VolumeClient) Create(ctx context.Context, resourceGroupName string, volumeResourceName string, ...) (VolumeClientCreateResponse, error)
- func (client *VolumeClient) Delete(ctx context.Context, resourceGroupName string, volumeResourceName string, ...) (VolumeClientDeleteResponse, error)
- func (client *VolumeClient) Get(ctx context.Context, resourceGroupName string, volumeResourceName string, ...) (VolumeClientGetResponse, error)
- func (client *VolumeClient) NewListByResourceGroupPager(resourceGroupName string, options *VolumeClientListByResourceGroupOptions) *runtime.Pager[VolumeClientListByResourceGroupResponse]
- func (client *VolumeClient) NewListBySubscriptionPager(options *VolumeClientListBySubscriptionOptions) *runtime.Pager[VolumeClientListBySubscriptionResponse]
- type VolumeClientCreateOptions
- type VolumeClientCreateResponse
- type VolumeClientDeleteOptions
- type VolumeClientDeleteResponse
- type VolumeClientGetOptions
- type VolumeClientGetResponse
- type VolumeClientListByResourceGroupOptions
- type VolumeClientListByResourceGroupResponse
- type VolumeClientListBySubscriptionOptions
- type VolumeClientListBySubscriptionResponse
- type VolumeProperties
- type VolumeProvider
- type VolumeProviderParametersAzureFile
- type VolumeReference
- type VolumeResourceDescription
- type VolumeResourceDescriptionList
- type VolumeResourceProperties
Examples ¶
- ApplicationClient.Create
- ApplicationClient.Delete
- ApplicationClient.Get
- ApplicationClient.NewListByResourceGroupPager
- ApplicationClient.NewListBySubscriptionPager
- CodePackageClient.GetContainerLogs
- GatewayClient.Create
- GatewayClient.Delete
- GatewayClient.Get
- GatewayClient.NewListByResourceGroupPager
- GatewayClient.NewListBySubscriptionPager
- NetworkClient.Create
- NetworkClient.Delete
- NetworkClient.Get
- NetworkClient.NewListByResourceGroupPager
- NetworkClient.NewListBySubscriptionPager
- SecretClient.Create
- SecretClient.Delete
- SecretClient.Get
- SecretClient.NewListByResourceGroupPager
- SecretClient.NewListBySubscriptionPager
- SecretValueClient.Create
- SecretValueClient.Delete
- SecretValueClient.Get
- SecretValueClient.ListValue
- SecretValueClient.NewListPager
- ServiceClient.Get
- ServiceClient.NewListPager
- ServiceReplicaClient.Get
- ServiceReplicaClient.NewListPager
- VolumeClient.Create
- VolumeClient.Delete
- VolumeClient.Get
- VolumeClient.NewListByResourceGroupPager
- VolumeClient.NewListBySubscriptionPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRemoveReplicaScalingMechanism ¶
type AddRemoveReplicaScalingMechanism struct { // REQUIRED; The type of auto scaling mechanism. Kind *AutoScalingMechanismKind // REQUIRED; Maximum number of containers (scale up won't be performed above this number). MaxCount *int32 // REQUIRED; Minimum number of containers (scale down won't be performed below this number). MinCount *int32 // REQUIRED; Each time auto scaling is performed, this number of containers will be added or removed. ScaleIncrement *int32 }
AddRemoveReplicaScalingMechanism - Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or container groups).
func (*AddRemoveReplicaScalingMechanism) GetAutoScalingMechanism ¶ added in v0.2.0
func (a *AddRemoveReplicaScalingMechanism) GetAutoScalingMechanism() *AutoScalingMechanism
GetAutoScalingMechanism implements the AutoScalingMechanismClassification interface for type AddRemoveReplicaScalingMechanism.
func (AddRemoveReplicaScalingMechanism) MarshalJSON ¶
func (a AddRemoveReplicaScalingMechanism) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AddRemoveReplicaScalingMechanism.
func (*AddRemoveReplicaScalingMechanism) UnmarshalJSON ¶
func (a *AddRemoveReplicaScalingMechanism) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AddRemoveReplicaScalingMechanism.
type ApplicationClient ¶
type ApplicationClient struct {
// contains filtered or unexported fields
}
ApplicationClient contains the methods for the Application group. Don't use this type directly, use NewApplicationClient() instead.
func NewApplicationClient ¶
func NewApplicationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationClient, error)
NewApplicationClient creates a new instance of ApplicationClient 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 (*ApplicationClient) Create ¶
func (client *ApplicationClient) Create(ctx context.Context, resourceGroupName string, applicationResourceName string, applicationResourceDescription ApplicationResourceDescription, options *ApplicationClientCreateOptions) (ApplicationClientCreateResponse, error)
Create - Creates an application resource with the specified name, description and properties. If an application resource with the same name exists, then it is updated with the specified description and properties. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- applicationResourceDescription - Description for creating a Application resource.
- options - ApplicationClientCreateOptions contains the optional parameters for the ApplicationClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/create_update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationClient().Create(ctx, "sbz_demo", "sampleApplication", armservicefabricmesh.ApplicationResourceDescription{ Location: to.Ptr("EastUS"), Tags: map[string]*string{}, Properties: &armservicefabricmesh.ApplicationResourceProperties{ Description: to.Ptr("Service Fabric Mesh sample application."), Services: []*armservicefabricmesh.ServiceResourceDescription{ { Name: to.Ptr("helloWorldService"), Properties: &armservicefabricmesh.ServiceResourceProperties{ Description: to.Ptr("SeaBreeze Hello World Service."), ReplicaCount: to.Ptr[int32](1), CodePackages: []*armservicefabricmesh.ContainerCodePackageProperties{ { Name: to.Ptr("helloWorldCode"), Endpoints: []*armservicefabricmesh.EndpointProperties{ { Name: to.Ptr("helloWorldListener"), Port: to.Ptr[int32](80), }}, Image: to.Ptr("seabreeze/sbz-helloworld:1.0-alpine"), Resources: &armservicefabricmesh.ResourceRequirements{ Requests: &armservicefabricmesh.ResourceRequests{ CPU: to.Ptr[float64](1), MemoryInGB: to.Ptr[float64](1), }, }, }}, NetworkRefs: []*armservicefabricmesh.NetworkRef{ { Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), EndpointRefs: []*armservicefabricmesh.EndpointRef{ { Name: to.Ptr("helloWorldListener"), }}, }}, OSType: to.Ptr(armservicefabricmesh.OperatingSystemTypeLinux), }, }}, }, }, 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.ApplicationResourceDescription = armservicefabricmesh.ApplicationResourceDescription{ // Name: to.Ptr("sampleApplication"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/applications"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.ApplicationResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample application."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ServiceNames: []*string{ // to.Ptr("helloWorldService")}, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*ApplicationClient) Delete ¶
func (client *ApplicationClient) Delete(ctx context.Context, resourceGroupName string, applicationResourceName string, options *ApplicationClientDeleteOptions) (ApplicationClientDeleteResponse, error)
Delete - Deletes the application resource identified by the name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- options - ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewApplicationClient().Delete(ctx, "sbz_demo", "sampleApplication", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ApplicationClient) Get ¶
func (client *ApplicationClient) Get(ctx context.Context, resourceGroupName string, applicationResourceName string, options *ApplicationClientGetOptions) (ApplicationClientGetResponse, error)
Get - Gets the information about the application resource with the given name. The information include the description and other properties of the application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- options - ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationClient().Get(ctx, "sbz_demo", "sampleApplication", 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.ApplicationResourceDescription = armservicefabricmesh.ApplicationResourceDescription{ // Name: to.Ptr("sampleApplication"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/applications"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.ApplicationResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample application."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ServiceNames: []*string{ // to.Ptr("helloWorldService")}, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*ApplicationClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *ApplicationClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationClientListByResourceGroupOptions) *runtime.Pager[ApplicationClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets the information about all application resources in a given resource group. The information include the description and other properties of the Application.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- options - ApplicationClientListByResourceGroupOptions contains the optional parameters for the ApplicationClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/list_byResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationClient().NewListByResourceGroupPager("sbz_demo", 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.ApplicationResourceDescriptionList = armservicefabricmesh.ApplicationResourceDescriptionList{ // Value: []*armservicefabricmesh.ApplicationResourceDescription{ // { // Name: to.Ptr("sampleApplication"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/applications"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.ApplicationResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample application."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ServiceNames: []*string{ // to.Ptr("helloWorldService")}, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
func (*ApplicationClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *ApplicationClient) NewListBySubscriptionPager(options *ApplicationClientListBySubscriptionOptions) *runtime.Pager[ApplicationClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets the information about all application resources in a given resource group. The information include the description and other properties of the application.
Generated from API version 2018-09-01-preview
- options - ApplicationClientListBySubscriptionOptions contains the optional parameters for the ApplicationClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/list_bySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationClient().NewListBySubscriptionPager(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.ApplicationResourceDescriptionList = armservicefabricmesh.ApplicationResourceDescriptionList{ // Value: []*armservicefabricmesh.ApplicationResourceDescription{ // { // Name: to.Ptr("sampleApplication"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/applications"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.ApplicationResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample application."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ServiceNames: []*string{ // to.Ptr("helloWorldService")}, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type ApplicationClientCreateOptions ¶ added in v0.2.0
type ApplicationClientCreateOptions struct { }
ApplicationClientCreateOptions contains the optional parameters for the ApplicationClient.Create method.
type ApplicationClientCreateResponse ¶ added in v0.2.0
type ApplicationClientCreateResponse struct {
ApplicationResourceDescription
}
ApplicationClientCreateResponse contains the response from method ApplicationClient.Create.
type ApplicationClientDeleteOptions ¶ added in v0.2.0
type ApplicationClientDeleteOptions struct { }
ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.
type ApplicationClientDeleteResponse ¶ added in v0.2.0
type ApplicationClientDeleteResponse struct { }
ApplicationClientDeleteResponse contains the response from method ApplicationClient.Delete.
type ApplicationClientGetOptions ¶ added in v0.2.0
type ApplicationClientGetOptions struct { }
ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.
type ApplicationClientGetResponse ¶ added in v0.2.0
type ApplicationClientGetResponse struct {
ApplicationResourceDescription
}
ApplicationClientGetResponse contains the response from method ApplicationClient.Get.
type ApplicationClientListByResourceGroupOptions ¶ added in v0.2.0
type ApplicationClientListByResourceGroupOptions struct { }
ApplicationClientListByResourceGroupOptions contains the optional parameters for the ApplicationClient.NewListByResourceGroupPager method.
type ApplicationClientListByResourceGroupResponse ¶ added in v0.2.0
type ApplicationClientListByResourceGroupResponse struct {
ApplicationResourceDescriptionList
}
ApplicationClientListByResourceGroupResponse contains the response from method ApplicationClient.NewListByResourceGroupPager.
type ApplicationClientListBySubscriptionOptions ¶ added in v0.2.0
type ApplicationClientListBySubscriptionOptions struct { }
ApplicationClientListBySubscriptionOptions contains the optional parameters for the ApplicationClient.NewListBySubscriptionPager method.
type ApplicationClientListBySubscriptionResponse ¶ added in v0.2.0
type ApplicationClientListBySubscriptionResponse struct {
ApplicationResourceDescriptionList
}
ApplicationClientListBySubscriptionResponse contains the response from method ApplicationClient.NewListBySubscriptionPager.
type ApplicationProperties ¶
type ApplicationProperties struct { // Internal - used by Visual Studio to setup the debugging session on the local development environment. DebugParams *string // User readable description of the application. Description *string // Describes the diagnostics definition and usage for an application resource. Diagnostics *DiagnosticsDescription // Describes the services in the application. This property is used to create or modify services of the application. On get // only the name of the service is returned. The service description can be // obtained by querying for the service resource. Services []*ServiceResourceDescription // READ-ONLY; Describes the health state of an application resource. HealthState *HealthState // READ-ONLY; Names of the services in the application. ServiceNames []*string // READ-ONLY; Status of the application. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the application. StatusDetails *string // READ-ONLY; When the application's health state is not 'Ok', this additional details from service fabric Health Manager // for the user to know why the application is marked unhealthy. UnhealthyEvaluation *string }
ApplicationProperties - Describes properties of a application resource.
func (ApplicationProperties) MarshalJSON ¶
func (a ApplicationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.
func (*ApplicationProperties) UnmarshalJSON ¶
func (a *ApplicationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.
type ApplicationResourceDescription ¶
type ApplicationResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; This type describes properties of an application resource. Properties *ApplicationResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ApplicationResourceDescription - This type describes an application resource.
func (ApplicationResourceDescription) MarshalJSON ¶
func (a ApplicationResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceDescription.
func (*ApplicationResourceDescription) UnmarshalJSON ¶
func (a *ApplicationResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceDescription.
type ApplicationResourceDescriptionList ¶
type ApplicationResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*ApplicationResourceDescription }
ApplicationResourceDescriptionList - A pageable list of application resources.
func (ApplicationResourceDescriptionList) MarshalJSON ¶
func (a ApplicationResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceDescriptionList.
func (*ApplicationResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (a *ApplicationResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceDescriptionList.
type ApplicationResourceProperties ¶
type ApplicationResourceProperties struct { // Internal - used by Visual Studio to setup the debugging session on the local development environment. DebugParams *string // User readable description of the application. Description *string // Describes the diagnostics definition and usage for an application resource. Diagnostics *DiagnosticsDescription // Describes the services in the application. This property is used to create or modify services of the application. On get // only the name of the service is returned. The service description can be // obtained by querying for the service resource. Services []*ServiceResourceDescription // READ-ONLY; Describes the health state of an application resource. HealthState *HealthState // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Names of the services in the application. ServiceNames []*string // READ-ONLY; Status of the application. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the application. StatusDetails *string // READ-ONLY; When the application's health state is not 'Ok', this additional details from service fabric Health Manager // for the user to know why the application is marked unhealthy. UnhealthyEvaluation *string }
ApplicationResourceProperties - This type describes properties of an application resource.
func (ApplicationResourceProperties) MarshalJSON ¶ added in v0.2.0
func (a ApplicationResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationResourceProperties.
func (*ApplicationResourceProperties) UnmarshalJSON ¶ added in v0.6.0
func (a *ApplicationResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationResourceProperties.
type ApplicationScopedVolume ¶
type ApplicationScopedVolume struct { // REQUIRED; Describes parameters for creating application-scoped volumes. CreationParameters ApplicationScopedVolumeCreationParametersClassification // REQUIRED; The path within the container at which the volume should be mounted. Only valid path characters are allowed. DestinationPath *string // REQUIRED; Name of the volume being referenced. Name *string // The flag indicating whether the volume is read only. Default is 'false'. ReadOnly *bool }
ApplicationScopedVolume - Describes a volume whose lifetime is scoped to the application's lifetime.
func (ApplicationScopedVolume) MarshalJSON ¶
func (a ApplicationScopedVolume) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationScopedVolume.
func (*ApplicationScopedVolume) UnmarshalJSON ¶
func (a *ApplicationScopedVolume) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationScopedVolume.
type ApplicationScopedVolumeCreationParameters ¶
type ApplicationScopedVolumeCreationParameters struct { // REQUIRED; Specifies the application-scoped volume kind. Kind *ApplicationScopedVolumeKind // User readable description of the volume. Description *string }
ApplicationScopedVolumeCreationParameters - Describes parameters for creating application-scoped volumes.
func (*ApplicationScopedVolumeCreationParameters) GetApplicationScopedVolumeCreationParameters ¶
func (a *ApplicationScopedVolumeCreationParameters) GetApplicationScopedVolumeCreationParameters() *ApplicationScopedVolumeCreationParameters
GetApplicationScopedVolumeCreationParameters implements the ApplicationScopedVolumeCreationParametersClassification interface for type ApplicationScopedVolumeCreationParameters.
func (ApplicationScopedVolumeCreationParameters) MarshalJSON ¶ added in v0.6.0
func (a ApplicationScopedVolumeCreationParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationScopedVolumeCreationParameters.
func (*ApplicationScopedVolumeCreationParameters) UnmarshalJSON ¶
func (a *ApplicationScopedVolumeCreationParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationScopedVolumeCreationParameters.
type ApplicationScopedVolumeCreationParametersClassification ¶
type ApplicationScopedVolumeCreationParametersClassification interface { // GetApplicationScopedVolumeCreationParameters returns the ApplicationScopedVolumeCreationParameters content of the underlying type. GetApplicationScopedVolumeCreationParameters() *ApplicationScopedVolumeCreationParameters }
ApplicationScopedVolumeCreationParametersClassification provides polymorphic access to related types. Call the interface's GetApplicationScopedVolumeCreationParameters() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ApplicationScopedVolumeCreationParameters, *ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk
type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk ¶
type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk struct { // REQUIRED; Specifies the application-scoped volume kind. Kind *ApplicationScopedVolumeKind // REQUIRED; Volume size SizeDisk *SizeTypes // User readable description of the volume. Description *string }
ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - Describes parameters for creating application-scoped volumes provided by Service Fabric Volume Disks
func (*ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) GetApplicationScopedVolumeCreationParameters ¶ added in v0.2.0
func (a *ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) GetApplicationScopedVolumeCreationParameters() *ApplicationScopedVolumeCreationParameters
GetApplicationScopedVolumeCreationParameters implements the ApplicationScopedVolumeCreationParametersClassification interface for type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.
func (ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) MarshalJSON ¶
func (a ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.
func (*ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) UnmarshalJSON ¶
func (a *ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk.
type ApplicationScopedVolumeKind ¶
type ApplicationScopedVolumeKind string
ApplicationScopedVolumeKind - Specifies the application-scoped volume kind.
const ( // ApplicationScopedVolumeKindServiceFabricVolumeDisk - Provides Service Fabric High Availability Volume Disk ApplicationScopedVolumeKindServiceFabricVolumeDisk ApplicationScopedVolumeKind = "ServiceFabricVolumeDisk" )
func PossibleApplicationScopedVolumeKindValues ¶
func PossibleApplicationScopedVolumeKindValues() []ApplicationScopedVolumeKind
PossibleApplicationScopedVolumeKindValues returns the possible values for the ApplicationScopedVolumeKind const type.
type AutoScalingMechanism ¶
type AutoScalingMechanism struct { // REQUIRED; The type of auto scaling mechanism. Kind *AutoScalingMechanismKind }
AutoScalingMechanism - Describes the mechanism for performing auto scaling operation. Derived classes will describe the actual mechanism.
func (*AutoScalingMechanism) GetAutoScalingMechanism ¶
func (a *AutoScalingMechanism) GetAutoScalingMechanism() *AutoScalingMechanism
GetAutoScalingMechanism implements the AutoScalingMechanismClassification interface for type AutoScalingMechanism.
func (AutoScalingMechanism) MarshalJSON ¶ added in v0.6.0
func (a AutoScalingMechanism) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoScalingMechanism.
func (*AutoScalingMechanism) UnmarshalJSON ¶
func (a *AutoScalingMechanism) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoScalingMechanism.
type AutoScalingMechanismClassification ¶
type AutoScalingMechanismClassification interface { // GetAutoScalingMechanism returns the AutoScalingMechanism content of the underlying type. GetAutoScalingMechanism() *AutoScalingMechanism }
AutoScalingMechanismClassification provides polymorphic access to related types. Call the interface's GetAutoScalingMechanism() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AddRemoveReplicaScalingMechanism, *AutoScalingMechanism
type AutoScalingMechanismKind ¶
type AutoScalingMechanismKind string
AutoScalingMechanismKind - Enumerates the mechanisms for auto scaling.
const ( // AutoScalingMechanismKindAddRemoveReplica - Indicates that scaling should be performed by adding or removing replicas. AutoScalingMechanismKindAddRemoveReplica AutoScalingMechanismKind = "AddRemoveReplica" )
func PossibleAutoScalingMechanismKindValues ¶
func PossibleAutoScalingMechanismKindValues() []AutoScalingMechanismKind
PossibleAutoScalingMechanismKindValues returns the possible values for the AutoScalingMechanismKind const type.
type AutoScalingMetric ¶
type AutoScalingMetric struct { // REQUIRED; The type of auto scaling metric Kind *AutoScalingMetricKind }
AutoScalingMetric - Describes the metric that is used for triggering auto scaling operation. Derived classes will describe resources or metrics.
func (*AutoScalingMetric) GetAutoScalingMetric ¶
func (a *AutoScalingMetric) GetAutoScalingMetric() *AutoScalingMetric
GetAutoScalingMetric implements the AutoScalingMetricClassification interface for type AutoScalingMetric.
func (AutoScalingMetric) MarshalJSON ¶ added in v0.6.0
func (a AutoScalingMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoScalingMetric.
func (*AutoScalingMetric) UnmarshalJSON ¶
func (a *AutoScalingMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoScalingMetric.
type AutoScalingMetricClassification ¶
type AutoScalingMetricClassification interface { // GetAutoScalingMetric returns the AutoScalingMetric content of the underlying type. GetAutoScalingMetric() *AutoScalingMetric }
AutoScalingMetricClassification provides polymorphic access to related types. Call the interface's GetAutoScalingMetric() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AutoScalingMetric, *AutoScalingResourceMetric
type AutoScalingMetricKind ¶
type AutoScalingMetricKind string
AutoScalingMetricKind - Enumerates the metrics that are used for triggering auto scaling.
const ( // AutoScalingMetricKindResource - Indicates that the metric is one of resources, like cpu or memory. AutoScalingMetricKindResource AutoScalingMetricKind = "Resource" )
func PossibleAutoScalingMetricKindValues ¶
func PossibleAutoScalingMetricKindValues() []AutoScalingMetricKind
PossibleAutoScalingMetricKindValues returns the possible values for the AutoScalingMetricKind const type.
type AutoScalingPolicy ¶
type AutoScalingPolicy struct { // REQUIRED; The mechanism that is used to scale when auto scaling operation is invoked. Mechanism AutoScalingMechanismClassification // REQUIRED; The name of the auto scaling policy. Name *string // REQUIRED; Determines when auto scaling operation will be invoked. Trigger AutoScalingTriggerClassification }
AutoScalingPolicy - Describes the auto scaling policy
func (AutoScalingPolicy) MarshalJSON ¶
func (a AutoScalingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoScalingPolicy.
func (*AutoScalingPolicy) UnmarshalJSON ¶
func (a *AutoScalingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoScalingPolicy.
type AutoScalingResourceMetric ¶
type AutoScalingResourceMetric struct { // REQUIRED; The type of auto scaling metric Kind *AutoScalingMetricKind // REQUIRED; Name of the resource. Name *AutoScalingResourceMetricName }
AutoScalingResourceMetric - Describes the resource that is used for triggering auto scaling.
func (*AutoScalingResourceMetric) GetAutoScalingMetric ¶ added in v0.2.0
func (a *AutoScalingResourceMetric) GetAutoScalingMetric() *AutoScalingMetric
GetAutoScalingMetric implements the AutoScalingMetricClassification interface for type AutoScalingResourceMetric.
func (AutoScalingResourceMetric) MarshalJSON ¶
func (a AutoScalingResourceMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoScalingResourceMetric.
func (*AutoScalingResourceMetric) UnmarshalJSON ¶
func (a *AutoScalingResourceMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoScalingResourceMetric.
type AutoScalingResourceMetricName ¶
type AutoScalingResourceMetricName string
AutoScalingResourceMetricName - Enumerates the resources that are used for triggering auto scaling.
const ( // AutoScalingResourceMetricNameCPU - Indicates that the resource is CPU cores. AutoScalingResourceMetricNameCPU AutoScalingResourceMetricName = "cpu" // AutoScalingResourceMetricNameMemoryInGB - Indicates that the resource is memory in GB. AutoScalingResourceMetricNameMemoryInGB AutoScalingResourceMetricName = "memoryInGB" )
func PossibleAutoScalingResourceMetricNameValues ¶
func PossibleAutoScalingResourceMetricNameValues() []AutoScalingResourceMetricName
PossibleAutoScalingResourceMetricNameValues returns the possible values for the AutoScalingResourceMetricName const type.
type AutoScalingTrigger ¶
type AutoScalingTrigger struct { // REQUIRED; The type of auto scaling trigger Kind *AutoScalingTriggerKind }
AutoScalingTrigger - Describes the trigger for performing auto scaling operation.
func (*AutoScalingTrigger) GetAutoScalingTrigger ¶
func (a *AutoScalingTrigger) GetAutoScalingTrigger() *AutoScalingTrigger
GetAutoScalingTrigger implements the AutoScalingTriggerClassification interface for type AutoScalingTrigger.
func (AutoScalingTrigger) MarshalJSON ¶ added in v0.6.0
func (a AutoScalingTrigger) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoScalingTrigger.
func (*AutoScalingTrigger) UnmarshalJSON ¶
func (a *AutoScalingTrigger) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoScalingTrigger.
type AutoScalingTriggerClassification ¶
type AutoScalingTriggerClassification interface { // GetAutoScalingTrigger returns the AutoScalingTrigger content of the underlying type. GetAutoScalingTrigger() *AutoScalingTrigger }
AutoScalingTriggerClassification provides polymorphic access to related types. Call the interface's GetAutoScalingTrigger() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AutoScalingTrigger, *AverageLoadScalingTrigger
type AutoScalingTriggerKind ¶
type AutoScalingTriggerKind string
AutoScalingTriggerKind - Enumerates the triggers for auto scaling.
const ( // AutoScalingTriggerKindAverageLoad - Indicates that scaling should be performed based on average load of all replicas in // the service. AutoScalingTriggerKindAverageLoad AutoScalingTriggerKind = "AverageLoad" )
func PossibleAutoScalingTriggerKindValues ¶
func PossibleAutoScalingTriggerKindValues() []AutoScalingTriggerKind
PossibleAutoScalingTriggerKindValues returns the possible values for the AutoScalingTriggerKind const type.
type AvailableOperationDisplay ¶
type AvailableOperationDisplay struct { // Description of the available operation. Description *string // Name of the available operation. Operation *string // Name of the operation provider. Provider *string // Name of the resource on which the operation is available. Resource *string }
AvailableOperationDisplay - An operation available at the listed Azure resource provider.
func (AvailableOperationDisplay) MarshalJSON ¶ added in v0.6.0
func (a AvailableOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailableOperationDisplay.
func (*AvailableOperationDisplay) UnmarshalJSON ¶ added in v0.6.0
func (a *AvailableOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperationDisplay.
type AverageLoadScalingTrigger ¶
type AverageLoadScalingTrigger struct { // REQUIRED; The type of auto scaling trigger Kind *AutoScalingTriggerKind // REQUIRED; Lower load threshold (if average load is below this threshold, service will scale down). LowerLoadThreshold *float64 // REQUIRED; Description of the metric that is used for scaling. Metric AutoScalingMetricClassification // REQUIRED; Scale interval that indicates how often will this trigger be checked. ScaleIntervalInSeconds *int32 // REQUIRED; Upper load threshold (if average load is above this threshold, service will scale up). UpperLoadThreshold *float64 }
AverageLoadScalingTrigger - Describes the average load trigger used for auto scaling.
func (*AverageLoadScalingTrigger) GetAutoScalingTrigger ¶ added in v0.2.0
func (a *AverageLoadScalingTrigger) GetAutoScalingTrigger() *AutoScalingTrigger
GetAutoScalingTrigger implements the AutoScalingTriggerClassification interface for type AverageLoadScalingTrigger.
func (AverageLoadScalingTrigger) MarshalJSON ¶
func (a AverageLoadScalingTrigger) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AverageLoadScalingTrigger.
func (*AverageLoadScalingTrigger) UnmarshalJSON ¶
func (a *AverageLoadScalingTrigger) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AverageLoadScalingTrigger.
type AzureInternalMonitoringPipelineSinkDescription ¶
type AzureInternalMonitoringPipelineSinkDescription struct { // REQUIRED; The kind of DiagnosticsSink. Kind *DiagnosticsSinkKind // Azure Internal monitoring pipeline account. AccountName *string // Azure Internal monitoring pipeline autokey associated with the certificate. AutoKeyConfigURL *string // A description of the sink. Description *string // Azure Internal monitoring agent fluentd configuration. FluentdConfigURL any // Azure Internal monitoring agent configuration. MaConfigURL *string // Name of the sink. This value is referenced by DiagnosticsReferenceDescription Name *string // Azure Internal monitoring pipeline account namespace. Namespace *string }
AzureInternalMonitoringPipelineSinkDescription - Diagnostics settings for Geneva.
func (*AzureInternalMonitoringPipelineSinkDescription) GetDiagnosticsSinkProperties ¶ added in v0.2.0
func (a *AzureInternalMonitoringPipelineSinkDescription) GetDiagnosticsSinkProperties() *DiagnosticsSinkProperties
GetDiagnosticsSinkProperties implements the DiagnosticsSinkPropertiesClassification interface for type AzureInternalMonitoringPipelineSinkDescription.
func (AzureInternalMonitoringPipelineSinkDescription) MarshalJSON ¶
func (a AzureInternalMonitoringPipelineSinkDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureInternalMonitoringPipelineSinkDescription.
func (*AzureInternalMonitoringPipelineSinkDescription) UnmarshalJSON ¶
func (a *AzureInternalMonitoringPipelineSinkDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureInternalMonitoringPipelineSinkDescription.
type ClientFactory ¶ added in v0.6.0
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 ¶ added in v0.6.0
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) NewApplicationClient ¶ added in v0.6.0
func (c *ClientFactory) NewApplicationClient() *ApplicationClient
func (*ClientFactory) NewCodePackageClient ¶ added in v0.6.0
func (c *ClientFactory) NewCodePackageClient() *CodePackageClient
func (*ClientFactory) NewGatewayClient ¶ added in v0.6.0
func (c *ClientFactory) NewGatewayClient() *GatewayClient
func (*ClientFactory) NewNetworkClient ¶ added in v0.6.0
func (c *ClientFactory) NewNetworkClient() *NetworkClient
func (*ClientFactory) NewOperationsClient ¶ added in v0.6.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
func (*ClientFactory) NewSecretClient ¶ added in v0.6.0
func (c *ClientFactory) NewSecretClient() *SecretClient
func (*ClientFactory) NewSecretValueClient ¶ added in v0.6.0
func (c *ClientFactory) NewSecretValueClient() *SecretValueClient
func (*ClientFactory) NewServiceClient ¶ added in v0.6.0
func (c *ClientFactory) NewServiceClient() *ServiceClient
func (*ClientFactory) NewServiceReplicaClient ¶ added in v0.6.0
func (c *ClientFactory) NewServiceReplicaClient() *ServiceReplicaClient
func (*ClientFactory) NewVolumeClient ¶ added in v0.6.0
func (c *ClientFactory) NewVolumeClient() *VolumeClient
type CodePackageClient ¶
type CodePackageClient struct {
// contains filtered or unexported fields
}
CodePackageClient contains the methods for the CodePackage group. Don't use this type directly, use NewCodePackageClient() instead.
func NewCodePackageClient ¶
func NewCodePackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CodePackageClient, error)
NewCodePackageClient creates a new instance of CodePackageClient 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 (*CodePackageClient) GetContainerLogs ¶
func (client *CodePackageClient) GetContainerLogs(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string, replicaName string, codePackageName string, options *CodePackageClientGetContainerLogsOptions) (CodePackageClientGetContainerLogsResponse, error)
GetContainerLogs - Gets the logs for the container of the specified code package of the service replica. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- serviceResourceName - The identity of the service.
- replicaName - Service Fabric replica name.
- codePackageName - The name of code package of the service.
- options - CodePackageClientGetContainerLogsOptions contains the optional parameters for the CodePackageClient.GetContainerLogs method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/replicas/codepackages/get_logs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCodePackageClient().GetContainerLogs(ctx, "sbz_demo", "sbzDocApp", "sbzDocService", "0", "sbzDocCode", &armservicefabricmesh.CodePackageClientGetContainerLogsOptions{Tail: 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.ContainerLogs = armservicefabricmesh.ContainerLogs{ // Content: to.Ptr(" * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\n * Downloading style https://assets-cdn.github.com/assets/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css\n * Downloading style https://assets-cdn.github.com/assets/github-a698da0d53574b056d3c79ac732d4a70.css\n * Downloading style https://assets-cdn.github.com/assets/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css\n * Cached all downloads in /root/.grip/cache-4.5.2\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET / HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/github-a698da0d53574b056d3c79ac732d4a70.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/static/octicons/octicons.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6 HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/favicon.ico HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:05] \"GET /seabreeze-index.md HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:09] \"GET /seabreeze-api-application_get.md HTTP/1.1\" 200 -\n"), // } }
Output:
type CodePackageClientGetContainerLogsOptions ¶ added in v0.2.0
type CodePackageClientGetContainerLogsOptions struct { // Number of lines to show from the end of the logs. Default is 100. Tail *int32 }
CodePackageClientGetContainerLogsOptions contains the optional parameters for the CodePackageClient.GetContainerLogs method.
type CodePackageClientGetContainerLogsResponse ¶ added in v0.2.0
type CodePackageClientGetContainerLogsResponse struct {
ContainerLogs
}
CodePackageClientGetContainerLogsResponse contains the response from method CodePackageClient.GetContainerLogs.
type ContainerCodePackageProperties ¶
type ContainerCodePackageProperties struct { // REQUIRED; The Container image to use. Image *string // REQUIRED; The name of the code package. Name *string // REQUIRED; The resources required by this container. Resources *ResourceRequirements // Command array to execute within the container in exec form. Commands []*string // Reference to sinks in DiagnosticsDescription. Diagnostics *DiagnosticsRef // The endpoints exposed by this container. Endpoints []*EndpointProperties // Override for the default entry point in the container. Entrypoint *string // The environment variables to set in this container EnvironmentVariables []*EnvironmentVariable // Image registry credential. ImageRegistryCredential *ImageRegistryCredential // The labels to set in this container. Labels []*ContainerLabel // A list of ReliableCollection resources used by this particular code package. Please refer to ReliableCollectionsRef for // more details. ReliableCollectionsRefs []*ReliableCollectionsRef // The settings to set in this container. The setting file path can be fetched from environment variable "Fabric_SettingPath". // The path for Windows container is "C:\secrets". The path for Linux container // is "/var/secrets". Settings []*Setting // Volumes to be attached to the container. The lifetime of these volumes is independent of the application's lifetime. VolumeRefs []*VolumeReference // Volumes to be attached to the container. The lifetime of these volumes is scoped to the application's lifetime. Volumes []*ApplicationScopedVolume // READ-ONLY; Runtime information of a container instance. InstanceView *ContainerInstanceView }
ContainerCodePackageProperties - Describes a container and its runtime properties.
func (ContainerCodePackageProperties) MarshalJSON ¶
func (c ContainerCodePackageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerCodePackageProperties.
func (*ContainerCodePackageProperties) UnmarshalJSON ¶ added in v0.6.0
func (c *ContainerCodePackageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerCodePackageProperties.
type ContainerEvent ¶
type ContainerEvent struct { // The count of the event. Count *int32 // Date/time of the first event. FirstTimestamp *string // Date/time of the last event. LastTimestamp *string // The event message Message *string // The name of the container event. Name *string // The event type. Type *string }
ContainerEvent - A container event.
func (ContainerEvent) MarshalJSON ¶ added in v0.6.0
func (c ContainerEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerEvent.
func (*ContainerEvent) UnmarshalJSON ¶ added in v0.6.0
func (c *ContainerEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerEvent.
type ContainerInstanceView ¶
type ContainerInstanceView struct { // Current container instance state. CurrentState *ContainerState // The events of this container instance. Events []*ContainerEvent // Previous container instance state. PreviousState *ContainerState // The number of times the container has been restarted. RestartCount *int32 }
ContainerInstanceView - Runtime information of a container instance.
func (ContainerInstanceView) MarshalJSON ¶
func (c ContainerInstanceView) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerInstanceView.
func (*ContainerInstanceView) UnmarshalJSON ¶ added in v0.6.0
func (c *ContainerInstanceView) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerInstanceView.
type ContainerLabel ¶
type ContainerLabel struct { // REQUIRED; The name of the container label. Name *string // REQUIRED; The value of the container label. Value *string }
ContainerLabel - Describes a container label.
func (ContainerLabel) MarshalJSON ¶ added in v0.6.0
func (c ContainerLabel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerLabel.
func (*ContainerLabel) UnmarshalJSON ¶ added in v0.6.0
func (c *ContainerLabel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerLabel.
type ContainerLogs ¶
type ContainerLogs struct { // Container logs. Content *string }
ContainerLogs - Container logs.
func (ContainerLogs) MarshalJSON ¶ added in v0.6.0
func (c ContainerLogs) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerLogs.
func (*ContainerLogs) UnmarshalJSON ¶ added in v0.6.0
func (c *ContainerLogs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerLogs.
type ContainerState ¶
type ContainerState struct { // Human-readable status of this state. DetailStatus *string // The container exit code. ExitCode *string // Date/time when the container state finished. FinishTime *time.Time // Date/time when the container state started. StartTime *time.Time // The state of this container State *string }
ContainerState - The container state.
func (ContainerState) MarshalJSON ¶
func (c ContainerState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerState.
func (*ContainerState) UnmarshalJSON ¶
func (c *ContainerState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerState.
type DiagnosticsDescription ¶
type DiagnosticsDescription struct { // The sinks to be used if diagnostics is enabled. Sink choices can be overridden at the service and code package level. DefaultSinkRefs []*string // Status of whether or not sinks are enabled. Enabled *bool // List of supported sinks that can be referenced. Sinks []DiagnosticsSinkPropertiesClassification }
DiagnosticsDescription - Describes the diagnostics options available
func (DiagnosticsDescription) MarshalJSON ¶
func (d DiagnosticsDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiagnosticsDescription.
func (*DiagnosticsDescription) UnmarshalJSON ¶
func (d *DiagnosticsDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsDescription.
type DiagnosticsRef ¶
type DiagnosticsRef struct { // Status of whether or not sinks are enabled. Enabled *bool // List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription. SinkRefs []*string }
DiagnosticsRef - Reference to sinks in DiagnosticsDescription.
func (DiagnosticsRef) MarshalJSON ¶
func (d DiagnosticsRef) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiagnosticsRef.
func (*DiagnosticsRef) UnmarshalJSON ¶ added in v0.6.0
func (d *DiagnosticsRef) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsRef.
type DiagnosticsSinkKind ¶
type DiagnosticsSinkKind string
DiagnosticsSinkKind - The kind of DiagnosticsSink.
const ( // DiagnosticsSinkKindAzureInternalMonitoringPipeline - Diagnostics settings for Geneva. DiagnosticsSinkKindAzureInternalMonitoringPipeline DiagnosticsSinkKind = "AzureInternalMonitoringPipeline" // DiagnosticsSinkKindInvalid - Indicates an invalid sink kind. All Service Fabric enumerations have the invalid type. DiagnosticsSinkKindInvalid DiagnosticsSinkKind = "Invalid" )
func PossibleDiagnosticsSinkKindValues ¶
func PossibleDiagnosticsSinkKindValues() []DiagnosticsSinkKind
PossibleDiagnosticsSinkKindValues returns the possible values for the DiagnosticsSinkKind const type.
type DiagnosticsSinkProperties ¶
type DiagnosticsSinkProperties struct { // REQUIRED; The kind of DiagnosticsSink. Kind *DiagnosticsSinkKind // A description of the sink. Description *string // Name of the sink. This value is referenced by DiagnosticsReferenceDescription Name *string }
DiagnosticsSinkProperties - Properties of a DiagnosticsSink.
func (*DiagnosticsSinkProperties) GetDiagnosticsSinkProperties ¶
func (d *DiagnosticsSinkProperties) GetDiagnosticsSinkProperties() *DiagnosticsSinkProperties
GetDiagnosticsSinkProperties implements the DiagnosticsSinkPropertiesClassification interface for type DiagnosticsSinkProperties.
func (DiagnosticsSinkProperties) MarshalJSON ¶ added in v0.6.0
func (d DiagnosticsSinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiagnosticsSinkProperties.
func (*DiagnosticsSinkProperties) UnmarshalJSON ¶
func (d *DiagnosticsSinkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsSinkProperties.
type DiagnosticsSinkPropertiesClassification ¶
type DiagnosticsSinkPropertiesClassification interface { // GetDiagnosticsSinkProperties returns the DiagnosticsSinkProperties content of the underlying type. GetDiagnosticsSinkProperties() *DiagnosticsSinkProperties }
DiagnosticsSinkPropertiesClassification provides polymorphic access to related types. Call the interface's GetDiagnosticsSinkProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureInternalMonitoringPipelineSinkDescription, *DiagnosticsSinkProperties
type EndpointProperties ¶
type EndpointProperties struct { // REQUIRED; The name of the endpoint. Name *string // Port used by the container. Port *int32 }
EndpointProperties - Describes a container endpoint.
func (EndpointProperties) MarshalJSON ¶ added in v0.6.0
func (e EndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointProperties.
func (*EndpointProperties) UnmarshalJSON ¶ added in v0.6.0
func (e *EndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointProperties.
type EndpointRef ¶
type EndpointRef struct { // Name of the endpoint. Name *string }
EndpointRef - Describes a reference to a service endpoint.
func (EndpointRef) MarshalJSON ¶ added in v0.6.0
func (e EndpointRef) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointRef.
func (*EndpointRef) UnmarshalJSON ¶ added in v0.6.0
func (e *EndpointRef) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointRef.
type EnvironmentVariable ¶
type EnvironmentVariable struct { // The name of the environment variable. Name *string // The value of the environment variable. Value *string }
EnvironmentVariable - Describes an environment variable for the container.
func (EnvironmentVariable) MarshalJSON ¶ added in v0.6.0
func (e EnvironmentVariable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable.
func (*EnvironmentVariable) UnmarshalJSON ¶ added in v0.6.0
func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable.
type ErrorDetailsModel ¶
type ErrorDetailsModel struct { // REQUIRED Code *string // REQUIRED; Error message. Message *string }
ErrorDetailsModel - Error model details information
func (ErrorDetailsModel) MarshalJSON ¶ added in v0.6.0
func (e ErrorDetailsModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetailsModel.
func (*ErrorDetailsModel) UnmarshalJSON ¶ added in v0.6.0
func (e *ErrorDetailsModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetailsModel.
type ErrorErrorModel ¶
type ErrorErrorModel struct { // REQUIRED Code *string // List of error message details. Details []*ErrorDetailsModel InnerError *string // Error message. Message *string }
ErrorErrorModel - Error model information
func (ErrorErrorModel) MarshalJSON ¶
func (e ErrorErrorModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorErrorModel.
func (*ErrorErrorModel) UnmarshalJSON ¶ added in v0.6.0
func (e *ErrorErrorModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorErrorModel.
type ErrorModel ¶
type ErrorModel struct { // REQUIRED; Error model information Error *ErrorErrorModel }
ErrorModel - The error details.
func (ErrorModel) MarshalJSON ¶ added in v0.6.0
func (e ErrorModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorModel.
func (*ErrorModel) UnmarshalJSON ¶ added in v0.6.0
func (e *ErrorModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorModel.
type GatewayClient ¶
type GatewayClient struct {
// contains filtered or unexported fields
}
GatewayClient contains the methods for the Gateway group. Don't use this type directly, use NewGatewayClient() instead.
func NewGatewayClient ¶
func NewGatewayClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayClient, error)
NewGatewayClient creates a new instance of GatewayClient 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 (*GatewayClient) Create ¶
func (client *GatewayClient) Create(ctx context.Context, resourceGroupName string, gatewayResourceName string, gatewayResourceDescription GatewayResourceDescription, options *GatewayClientCreateOptions) (GatewayClientCreateResponse, error)
Create - Creates a gateway resource with the specified name, description and properties. If a gateway resource with the same name exists, then it is updated with the specified description and properties. Use gateway resources to create a gateway for public connectivity for services within your application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- gatewayResourceName - The identity of the gateway.
- gatewayResourceDescription - Description for creating a Gateway resource.
- options - GatewayClientCreateOptions contains the optional parameters for the GatewayClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/gateways/create_update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGatewayClient().Create(ctx, "sbz_demo", "sampleGateway", armservicefabricmesh.GatewayResourceDescription{ Location: to.Ptr("EastUS"), Tags: map[string]*string{}, Properties: &armservicefabricmesh.GatewayResourceProperties{ Description: to.Ptr("Service Fabric Mesh sample gateway."), DestinationNetwork: &armservicefabricmesh.NetworkRef{ Name: to.Ptr("helloWorldNetwork"), }, SourceNetwork: &armservicefabricmesh.NetworkRef{ Name: to.Ptr("Open"), }, TCP: []*armservicefabricmesh.TCPConfig{ { Name: to.Ptr("web"), Destination: &armservicefabricmesh.GatewayDestination{ ApplicationName: to.Ptr("helloWorldApp"), EndpointName: to.Ptr("helloWorldListener"), ServiceName: to.Ptr("helloWorldService"), }, Port: to.Ptr[int32](80), }}, HTTP: []*armservicefabricmesh.HTTPConfig{ { Name: to.Ptr("contosoWebsite"), Hosts: []*armservicefabricmesh.HTTPHostConfig{ { Name: to.Ptr("contoso.com"), Routes: []*armservicefabricmesh.HTTPRouteConfig{ { Name: to.Ptr("index"), Destination: &armservicefabricmesh.GatewayDestination{ ApplicationName: to.Ptr("httpHelloWorldApp"), EndpointName: to.Ptr("indexHttpEndpoint"), ServiceName: to.Ptr("indexService"), }, Match: &armservicefabricmesh.HTTPRouteMatchRule{ Path: &armservicefabricmesh.HTTPRouteMatchPath{ Type: to.Ptr(armservicefabricmesh.PathMatchTypePrefix), Rewrite: to.Ptr("/"), Value: to.Ptr("/index"), }, Headers: []*armservicefabricmesh.HTTPRouteMatchHeader{ { Name: to.Ptr("accept"), Type: to.Ptr(armservicefabricmesh.HeaderMatchTypeExact), Value: to.Ptr("application/json"), }}, }, }}, }}, Port: to.Ptr[int32](8081), }}, }, }, 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.GatewayResourceDescription = armservicefabricmesh.GatewayResourceDescription{ // Name: to.Ptr("sampleGateway"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/gateways"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/gateways/sampleGateway"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.GatewayResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample gateway."), // DestinationNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("helloWorldNetwork"), // }, // IPAddress: to.Ptr("192.168.1.1"), // SourceNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("Open"), // }, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // TCP: []*armservicefabricmesh.TCPConfig{ // { // Name: to.Ptr("web"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("helloWorldApp"), // EndpointName: to.Ptr("helloWorldListener"), // ServiceName: to.Ptr("helloWorldService"), // }, // Port: to.Ptr[int32](80), // }}, // HTTP: []*armservicefabricmesh.HTTPConfig{ // { // Name: to.Ptr("contosoWebsite"), // Hosts: []*armservicefabricmesh.HTTPHostConfig{ // { // Name: to.Ptr("contoso.com"), // Routes: []*armservicefabricmesh.HTTPRouteConfig{ // { // Name: to.Ptr("index"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("httpHelloWorldApp"), // EndpointName: to.Ptr("indexHttpEndpoint"), // ServiceName: to.Ptr("indexService"), // }, // Match: &armservicefabricmesh.HTTPRouteMatchRule{ // Path: &armservicefabricmesh.HTTPRouteMatchPath{ // Type: to.Ptr(armservicefabricmesh.PathMatchTypePrefix), // Rewrite: to.Ptr("/"), // Value: to.Ptr("/index"), // }, // Headers: []*armservicefabricmesh.HTTPRouteMatchHeader{ // { // Name: to.Ptr("accept"), // Type: to.Ptr(armservicefabricmesh.HeaderMatchTypeExact), // Value: to.Ptr("application/json"), // }}, // }, // }}, // }}, // Port: to.Ptr[int32](8081), // }}, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*GatewayClient) Delete ¶
func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, gatewayResourceName string, options *GatewayClientDeleteOptions) (GatewayClientDeleteResponse, error)
Delete - Deletes the gateway resource identified by the name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- gatewayResourceName - The identity of the gateway.
- options - GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/gateways/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewGatewayClient().Delete(ctx, "sbz_demo", "sampleGateway", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*GatewayClient) Get ¶
func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, gatewayResourceName string, options *GatewayClientGetOptions) (GatewayClientGetResponse, error)
Get - Gets the information about the gateway resource with the given name. The information include the description and other properties of the gateway. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- gatewayResourceName - The identity of the gateway.
- options - GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/gateways/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGatewayClient().Get(ctx, "sbz_demo", "sampleGateway", 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.GatewayResourceDescription = armservicefabricmesh.GatewayResourceDescription{ // Name: to.Ptr("sampleGateway"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/gateways"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/gateways/sampleGateway"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.GatewayResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample gateway."), // DestinationNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("helloWorldNetwork"), // }, // IPAddress: to.Ptr("192.168.1.1"), // SourceNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("Open"), // }, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // TCP: []*armservicefabricmesh.TCPConfig{ // { // Name: to.Ptr("web"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("helloWorldApp"), // EndpointName: to.Ptr("helloWorldListener"), // ServiceName: to.Ptr("helloWorldService"), // }, // Port: to.Ptr[int32](80), // }}, // HTTP: []*armservicefabricmesh.HTTPConfig{ // { // Name: to.Ptr("contosoWebsite"), // Hosts: []*armservicefabricmesh.HTTPHostConfig{ // { // Name: to.Ptr("contoso.com"), // Routes: []*armservicefabricmesh.HTTPRouteConfig{ // { // Name: to.Ptr("index"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("httpHelloWorldApp"), // EndpointName: to.Ptr("indexHttpEndpoint"), // ServiceName: to.Ptr("indexService"), // }, // Match: &armservicefabricmesh.HTTPRouteMatchRule{ // Path: &armservicefabricmesh.HTTPRouteMatchPath{ // Type: to.Ptr(armservicefabricmesh.PathMatchTypePrefix), // Rewrite: to.Ptr("/"), // Value: to.Ptr("/index"), // }, // Headers: []*armservicefabricmesh.HTTPRouteMatchHeader{ // { // Name: to.Ptr("accept"), // Type: to.Ptr(armservicefabricmesh.HeaderMatchTypeExact), // Value: to.Ptr("application/json"), // }}, // }, // }}, // }}, // Port: to.Ptr[int32](8081), // }}, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*GatewayClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *GatewayClient) NewListByResourceGroupPager(resourceGroupName string, options *GatewayClientListByResourceGroupOptions) *runtime.Pager[GatewayClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the Gateway.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- options - GatewayClientListByResourceGroupOptions contains the optional parameters for the GatewayClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/gateways/list_byResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGatewayClient().NewListByResourceGroupPager("sbz_demo", 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.GatewayResourceDescriptionList = armservicefabricmesh.GatewayResourceDescriptionList{ // Value: []*armservicefabricmesh.GatewayResourceDescription{ // { // Name: to.Ptr("sampleGateway"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/gateways"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/gateways/sampleGateway"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.GatewayResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample gateway."), // DestinationNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("helloWorldNetwork"), // }, // IPAddress: to.Ptr("192.168.1.1"), // SourceNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("Open"), // }, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // TCP: []*armservicefabricmesh.TCPConfig{ // { // Name: to.Ptr("web"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("helloWorldApp"), // EndpointName: to.Ptr("helloWorldListener"), // ServiceName: to.Ptr("helloWorldService"), // }, // Port: to.Ptr[int32](80), // }}, // HTTP: []*armservicefabricmesh.HTTPConfig{ // { // Name: to.Ptr("contosoWebsite"), // Hosts: []*armservicefabricmesh.HTTPHostConfig{ // { // Name: to.Ptr("contoso.com"), // Routes: []*armservicefabricmesh.HTTPRouteConfig{ // { // Name: to.Ptr("index"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("httpHelloWorldApp"), // EndpointName: to.Ptr("indexHttpEndpoint"), // ServiceName: to.Ptr("indexService"), // }, // Match: &armservicefabricmesh.HTTPRouteMatchRule{ // Path: &armservicefabricmesh.HTTPRouteMatchPath{ // Type: to.Ptr(armservicefabricmesh.PathMatchTypePrefix), // Rewrite: to.Ptr("/"), // Value: to.Ptr("/index"), // }, // Headers: []*armservicefabricmesh.HTTPRouteMatchHeader{ // { // Name: to.Ptr("accept"), // Type: to.Ptr(armservicefabricmesh.HeaderMatchTypeExact), // Value: to.Ptr("application/json"), // }}, // }, // }}, // }}, // Port: to.Ptr[int32](8081), // }}, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
func (*GatewayClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *GatewayClient) NewListBySubscriptionPager(options *GatewayClientListBySubscriptionOptions) *runtime.Pager[GatewayClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets the information about all gateway resources in a given resource group. The information include the description and other properties of the gateway.
Generated from API version 2018-09-01-preview
- options - GatewayClientListBySubscriptionOptions contains the optional parameters for the GatewayClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/gateways/list_bySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGatewayClient().NewListBySubscriptionPager(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.GatewayResourceDescriptionList = armservicefabricmesh.GatewayResourceDescriptionList{ // Value: []*armservicefabricmesh.GatewayResourceDescription{ // { // Name: to.Ptr("sampleGateway"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/gateways"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/gateways/sampleGateway"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.GatewayResourceProperties{ // Description: to.Ptr("Service Fabric Mesh sample gateway."), // DestinationNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("helloWorldNetwork"), // }, // IPAddress: to.Ptr("192.168.1.1"), // SourceNetwork: &armservicefabricmesh.NetworkRef{ // Name: to.Ptr("Open"), // }, // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // TCP: []*armservicefabricmesh.TCPConfig{ // { // Name: to.Ptr("web"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("helloWorldApp"), // EndpointName: to.Ptr("helloWorldListener"), // ServiceName: to.Ptr("helloWorldService"), // }, // Port: to.Ptr[int32](80), // }}, // HTTP: []*armservicefabricmesh.HTTPConfig{ // { // Name: to.Ptr("contosoWebsite"), // Hosts: []*armservicefabricmesh.HTTPHostConfig{ // { // Name: to.Ptr("contoso.com"), // Routes: []*armservicefabricmesh.HTTPRouteConfig{ // { // Name: to.Ptr("index"), // Destination: &armservicefabricmesh.GatewayDestination{ // ApplicationName: to.Ptr("httpHelloWorldApp"), // EndpointName: to.Ptr("indexHttpEndpoint"), // ServiceName: to.Ptr("indexService"), // }, // Match: &armservicefabricmesh.HTTPRouteMatchRule{ // Path: &armservicefabricmesh.HTTPRouteMatchPath{ // Type: to.Ptr(armservicefabricmesh.PathMatchTypePrefix), // Rewrite: to.Ptr("/"), // Value: to.Ptr("/index"), // }, // Headers: []*armservicefabricmesh.HTTPRouteMatchHeader{ // { // Name: to.Ptr("accept"), // Type: to.Ptr(armservicefabricmesh.HeaderMatchTypeExact), // Value: to.Ptr("application/json"), // }}, // }, // }}, // }}, // Port: to.Ptr[int32](8081), // }}, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type GatewayClientCreateOptions ¶ added in v0.2.0
type GatewayClientCreateOptions struct { }
GatewayClientCreateOptions contains the optional parameters for the GatewayClient.Create method.
type GatewayClientCreateResponse ¶ added in v0.2.0
type GatewayClientCreateResponse struct {
GatewayResourceDescription
}
GatewayClientCreateResponse contains the response from method GatewayClient.Create.
type GatewayClientDeleteOptions ¶ added in v0.2.0
type GatewayClientDeleteOptions struct { }
GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method.
type GatewayClientDeleteResponse ¶ added in v0.2.0
type GatewayClientDeleteResponse struct { }
GatewayClientDeleteResponse contains the response from method GatewayClient.Delete.
type GatewayClientGetOptions ¶ added in v0.2.0
type GatewayClientGetOptions struct { }
GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method.
type GatewayClientGetResponse ¶ added in v0.2.0
type GatewayClientGetResponse struct {
GatewayResourceDescription
}
GatewayClientGetResponse contains the response from method GatewayClient.Get.
type GatewayClientListByResourceGroupOptions ¶ added in v0.2.0
type GatewayClientListByResourceGroupOptions struct { }
GatewayClientListByResourceGroupOptions contains the optional parameters for the GatewayClient.NewListByResourceGroupPager method.
type GatewayClientListByResourceGroupResponse ¶ added in v0.2.0
type GatewayClientListByResourceGroupResponse struct {
GatewayResourceDescriptionList
}
GatewayClientListByResourceGroupResponse contains the response from method GatewayClient.NewListByResourceGroupPager.
type GatewayClientListBySubscriptionOptions ¶ added in v0.2.0
type GatewayClientListBySubscriptionOptions struct { }
GatewayClientListBySubscriptionOptions contains the optional parameters for the GatewayClient.NewListBySubscriptionPager method.
type GatewayClientListBySubscriptionResponse ¶ added in v0.2.0
type GatewayClientListBySubscriptionResponse struct {
GatewayResourceDescriptionList
}
GatewayClientListBySubscriptionResponse contains the response from method GatewayClient.NewListBySubscriptionPager.
type GatewayDestination ¶
type GatewayDestination struct { // REQUIRED; Name of the service fabric Mesh application. ApplicationName *string // REQUIRED; name of the endpoint in the service. EndpointName *string // REQUIRED; service that contains the endpoint. ServiceName *string }
GatewayDestination - Describes destination endpoint for routing traffic.
func (GatewayDestination) MarshalJSON ¶ added in v0.6.0
func (g GatewayDestination) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayDestination.
func (*GatewayDestination) UnmarshalJSON ¶ added in v0.6.0
func (g *GatewayDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayDestination.
type GatewayProperties ¶
type GatewayProperties struct { // REQUIRED; Network that the Application is using. DestinationNetwork *NetworkRef // REQUIRED; Network the gateway should listen on for requests. SourceNetwork *NetworkRef // User readable description of the gateway. Description *string // Configuration for http connectivity for this gateway. HTTP []*HTTPConfig // Configuration for tcp connectivity for this gateway. TCP []*TCPConfig // READ-ONLY; IP address of the gateway. This is populated in the response and is ignored for incoming requests. IPAddress *string // READ-ONLY; Status of the resource. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the gateway. StatusDetails *string }
GatewayProperties - Describes properties of a gateway resource.
func (GatewayProperties) MarshalJSON ¶
func (g GatewayProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayProperties.
func (*GatewayProperties) UnmarshalJSON ¶
func (g *GatewayProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayProperties.
type GatewayResourceDescription ¶
type GatewayResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; This type describes properties of a gateway resource. Properties *GatewayResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
GatewayResourceDescription - This type describes a gateway resource.
func (GatewayResourceDescription) MarshalJSON ¶
func (g GatewayResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayResourceDescription.
func (*GatewayResourceDescription) UnmarshalJSON ¶
func (g *GatewayResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceDescription.
type GatewayResourceDescriptionList ¶
type GatewayResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*GatewayResourceDescription }
GatewayResourceDescriptionList - A pageable list of gateway resources.
func (GatewayResourceDescriptionList) MarshalJSON ¶
func (g GatewayResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayResourceDescriptionList.
func (*GatewayResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (g *GatewayResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceDescriptionList.
type GatewayResourceProperties ¶
type GatewayResourceProperties struct { // REQUIRED; Network that the Application is using. DestinationNetwork *NetworkRef // REQUIRED; Network the gateway should listen on for requests. SourceNetwork *NetworkRef // User readable description of the gateway. Description *string // Configuration for http connectivity for this gateway. HTTP []*HTTPConfig // Configuration for tcp connectivity for this gateway. TCP []*TCPConfig // READ-ONLY; IP address of the gateway. This is populated in the response and is ignored for incoming requests. IPAddress *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the resource. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the gateway. StatusDetails *string }
GatewayResourceProperties - This type describes properties of a gateway resource.
func (GatewayResourceProperties) MarshalJSON ¶ added in v0.2.0
func (g GatewayResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayResourceProperties.
func (*GatewayResourceProperties) UnmarshalJSON ¶ added in v0.6.0
func (g *GatewayResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceProperties.
type HTTPConfig ¶
type HTTPConfig struct { // REQUIRED; description for routing. Hosts []*HTTPHostConfig // REQUIRED; http gateway config name. Name *string // REQUIRED; Specifies the port at which the service endpoint below needs to be exposed. Port *int32 }
HTTPConfig - Describes the http configuration for external connectivity for this network.
func (HTTPConfig) MarshalJSON ¶
func (h HTTPConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPConfig.
func (*HTTPConfig) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPConfig.
type HTTPHostConfig ¶
type HTTPHostConfig struct { // REQUIRED; http hostname config name. Name *string // REQUIRED; Route information to use for routing. Routes are processed in the order they are specified. Specify routes that // are more specific before routes that can handle general cases. Routes []*HTTPRouteConfig }
HTTPHostConfig - Describes the hostname properties for http routing.
func (HTTPHostConfig) MarshalJSON ¶
func (h HTTPHostConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPHostConfig.
func (*HTTPHostConfig) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPHostConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHostConfig.
type HTTPRouteConfig ¶
type HTTPRouteConfig struct { // REQUIRED; Describes destination endpoint for routing traffic. Destination *GatewayDestination // REQUIRED; Describes a rule for http route matching. Match *HTTPRouteMatchRule // REQUIRED; http route name. Name *string }
HTTPRouteConfig - Describes the hostname properties for http routing.
func (HTTPRouteConfig) MarshalJSON ¶ added in v0.6.0
func (h HTTPRouteConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPRouteConfig.
func (*HTTPRouteConfig) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPRouteConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRouteConfig.
type HTTPRouteMatchHeader ¶
type HTTPRouteMatchHeader struct { // REQUIRED; Name of header to match in request. Name *string // how to match header value Type *HeaderMatchType // Value of header to match in request. Value *string }
HTTPRouteMatchHeader - Describes header information for http route matching.
func (HTTPRouteMatchHeader) MarshalJSON ¶ added in v0.6.0
func (h HTTPRouteMatchHeader) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPRouteMatchHeader.
func (*HTTPRouteMatchHeader) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPRouteMatchHeader) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRouteMatchHeader.
type HTTPRouteMatchPath ¶
type HTTPRouteMatchPath struct { // REQUIRED; how to match value in the Uri Type *PathMatchType // REQUIRED; Uri path to match for request. Value *string // replacement string for matched part of the Uri. Rewrite *string }
HTTPRouteMatchPath - Path to match for routing.
func (HTTPRouteMatchPath) MarshalJSON ¶ added in v0.6.0
func (h HTTPRouteMatchPath) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPRouteMatchPath.
func (*HTTPRouteMatchPath) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPRouteMatchPath) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRouteMatchPath.
type HTTPRouteMatchRule ¶
type HTTPRouteMatchRule struct { // REQUIRED; Path to match for routing. Path *HTTPRouteMatchPath // headers and their values to match in request. Headers []*HTTPRouteMatchHeader }
HTTPRouteMatchRule - Describes a rule for http route matching.
func (HTTPRouteMatchRule) MarshalJSON ¶
func (h HTTPRouteMatchRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HTTPRouteMatchRule.
func (*HTTPRouteMatchRule) UnmarshalJSON ¶ added in v0.6.0
func (h *HTTPRouteMatchRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HTTPRouteMatchRule.
type HeaderMatchType ¶
type HeaderMatchType string
HeaderMatchType - how to match header value
const (
HeaderMatchTypeExact HeaderMatchType = "exact"
)
func PossibleHeaderMatchTypeValues ¶
func PossibleHeaderMatchTypeValues() []HeaderMatchType
PossibleHeaderMatchTypeValues returns the possible values for the HeaderMatchType const type.
type HealthState ¶
type HealthState string
HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc.
const ( // HealthStateError - Indicates the health state is at an error level. Error health state should be investigated, as they // can impact the correct functionality of the cluster. The value is 3. HealthStateError HealthState = "Error" // HealthStateInvalid - Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The value // is zero. HealthStateInvalid HealthState = "Invalid" // HealthStateOk - Indicates the health state is okay. The value is 1. HealthStateOk HealthState = "Ok" // HealthStateUnknown - Indicates an unknown health status. The value is 65535. HealthStateUnknown HealthState = "Unknown" // HealthStateWarning - Indicates the health state is at a warning level. The value is 2. HealthStateWarning HealthState = "Warning" )
func PossibleHealthStateValues ¶
func PossibleHealthStateValues() []HealthState
PossibleHealthStateValues returns the possible values for the HealthState const type.
type ImageRegistryCredential ¶
type ImageRegistryCredential struct { // REQUIRED; Docker image registry server, without protocol such as http and https. Server *string // REQUIRED; The username for the private registry. Username *string // The password for the private registry. The password is required for create or update operations, however it is not returned // in the get or list operations. Password *string }
ImageRegistryCredential - Image registry credential.
func (ImageRegistryCredential) MarshalJSON ¶ added in v0.6.0
func (i ImageRegistryCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageRegistryCredential.
func (*ImageRegistryCredential) UnmarshalJSON ¶ added in v0.6.0
func (i *ImageRegistryCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageRegistryCredential.
type InlinedValueSecretResourceProperties ¶
type InlinedValueSecretResourceProperties struct { // REQUIRED; Describes the kind of secret. Kind *SecretKind // The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the // value of this property cannot be changed. ContentType *string // User readable description of the secret. Description *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the resource. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the secret. StatusDetails *string }
InlinedValueSecretResourceProperties - Describes the properties of a secret resource whose value is provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the context of applications referencing it.
func (*InlinedValueSecretResourceProperties) GetSecretResourceProperties ¶ added in v0.2.0
func (i *InlinedValueSecretResourceProperties) GetSecretResourceProperties() *SecretResourceProperties
GetSecretResourceProperties implements the SecretResourcePropertiesClassification interface for type InlinedValueSecretResourceProperties.
func (*InlinedValueSecretResourceProperties) GetSecretResourcePropertiesBase ¶ added in v0.2.0
func (i *InlinedValueSecretResourceProperties) GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase
GetSecretResourcePropertiesBase implements the SecretResourcePropertiesBaseClassification interface for type InlinedValueSecretResourceProperties.
func (InlinedValueSecretResourceProperties) MarshalJSON ¶
func (i InlinedValueSecretResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InlinedValueSecretResourceProperties.
func (*InlinedValueSecretResourceProperties) UnmarshalJSON ¶ added in v0.2.0
func (i *InlinedValueSecretResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InlinedValueSecretResourceProperties.
type LocalNetworkResourceProperties ¶
type LocalNetworkResourceProperties struct { // REQUIRED; The type of a Service Fabric container network. Kind *NetworkKind // User readable description of the network. Description *string // Address space for the local container network. NetworkAddressPrefix *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the network. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the network. StatusDetails *string }
LocalNetworkResourceProperties - Information about a Service Fabric container network local to a single Service Fabric cluster.
func (*LocalNetworkResourceProperties) GetNetworkResourceProperties ¶ added in v0.2.0
func (l *LocalNetworkResourceProperties) GetNetworkResourceProperties() *NetworkResourceProperties
GetNetworkResourceProperties implements the NetworkResourcePropertiesClassification interface for type LocalNetworkResourceProperties.
func (*LocalNetworkResourceProperties) GetNetworkResourcePropertiesBase ¶ added in v0.2.0
func (l *LocalNetworkResourceProperties) GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase
GetNetworkResourcePropertiesBase implements the NetworkResourcePropertiesBaseClassification interface for type LocalNetworkResourceProperties.
func (LocalNetworkResourceProperties) MarshalJSON ¶
func (l LocalNetworkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalNetworkResourceProperties.
func (*LocalNetworkResourceProperties) UnmarshalJSON ¶
func (l *LocalNetworkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkResourceProperties.
type ManagedProxyResource ¶
type ManagedProxyResource struct { // The name of the resource Name *string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ManagedProxyResource - The resource model definition for Azure Resource Manager proxy resource. It will have everything other than required location and tags. This proxy resource is explicitly created or updated by including it in the parent resource.
func (ManagedProxyResource) MarshalJSON ¶ added in v0.6.0
func (m ManagedProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedProxyResource.
func (*ManagedProxyResource) UnmarshalJSON ¶ added in v0.6.0
func (m *ManagedProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedProxyResource.
type NetworkClient ¶
type NetworkClient struct {
// contains filtered or unexported fields
}
NetworkClient contains the methods for the Network group. Don't use this type directly, use NewNetworkClient() instead.
func NewNetworkClient ¶
func NewNetworkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkClient, error)
NewNetworkClient creates a new instance of NetworkClient 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 (*NetworkClient) Create ¶
func (client *NetworkClient) Create(ctx context.Context, resourceGroupName string, networkResourceName string, networkResourceDescription NetworkResourceDescription, options *NetworkClientCreateOptions) (NetworkClientCreateResponse, error)
Create - Creates a network resource with the specified name, description and properties. If a network resource with the same name exists, then it is updated with the specified description and properties. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- networkResourceName - The identity of the network.
- networkResourceDescription - Description for creating a Network resource.
- options - NetworkClientCreateOptions contains the optional parameters for the NetworkClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/networks/create_update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNetworkClient().Create(ctx, "sbz_demo", "sampleNetwork", armservicefabricmesh.NetworkResourceDescription{ Location: to.Ptr("EastUS"), Tags: map[string]*string{}, Properties: &armservicefabricmesh.LocalNetworkResourceProperties{ Kind: to.Ptr(armservicefabricmesh.NetworkKindLocal), Description: to.Ptr("Service Fabric Mesh sample network."), NetworkAddressPrefix: to.Ptr("2.0.0.0/16"), }, }, 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.NetworkResourceDescription = armservicefabricmesh.NetworkResourceDescription{ // Name: to.Ptr("sampleNetwork"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/networks"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.LocalNetworkResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.NetworkKindLocal), // Description: to.Ptr("Service Fabric Mesh sample network."), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // NetworkAddressPrefix: to.Ptr("2.0.0.0/16"), // }, // } }
Output:
func (*NetworkClient) Delete ¶
func (client *NetworkClient) Delete(ctx context.Context, resourceGroupName string, networkResourceName string, options *NetworkClientDeleteOptions) (NetworkClientDeleteResponse, error)
Delete - Deletes the network resource identified by the name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- networkResourceName - The identity of the network.
- options - NetworkClientDeleteOptions contains the optional parameters for the NetworkClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/networks/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewNetworkClient().Delete(ctx, "sbz_demo", "sampleNetwork", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*NetworkClient) Get ¶
func (client *NetworkClient) Get(ctx context.Context, resourceGroupName string, networkResourceName string, options *NetworkClientGetOptions) (NetworkClientGetResponse, error)
Get - Gets the information about the network resource with the given name. The information include the description and other properties of the network. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- networkResourceName - The identity of the network.
- options - NetworkClientGetOptions contains the optional parameters for the NetworkClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/networks/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNetworkClient().Get(ctx, "sbz_demo", "sampleNetwork", 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.NetworkResourceDescription = armservicefabricmesh.NetworkResourceDescription{ // Name: to.Ptr("sampleNetwork"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/networks"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.LocalNetworkResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.NetworkKindLocal), // Description: to.Ptr("Service Fabric Mesh sample network."), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // NetworkAddressPrefix: to.Ptr("2.0.0.0/16"), // }, // } }
Output:
func (*NetworkClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *NetworkClient) NewListByResourceGroupPager(resourceGroupName string, options *NetworkClientListByResourceGroupOptions) *runtime.Pager[NetworkClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets the information about all network resources in a given resource group. The information include the description and other properties of the Network.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- options - NetworkClientListByResourceGroupOptions contains the optional parameters for the NetworkClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/networks/list_byResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNetworkClient().NewListByResourceGroupPager("sbz_demo", 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.NetworkResourceDescriptionList = armservicefabricmesh.NetworkResourceDescriptionList{ // Value: []*armservicefabricmesh.NetworkResourceDescription{ // { // Name: to.Ptr("sampleNetwork"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/networks"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.LocalNetworkResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.NetworkKindLocal), // Description: to.Ptr("Service Fabric Mesh sample network."), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // NetworkAddressPrefix: to.Ptr("2.0.0.0/16"), // }, // }}, // } } }
Output:
func (*NetworkClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *NetworkClient) NewListBySubscriptionPager(options *NetworkClientListBySubscriptionOptions) *runtime.Pager[NetworkClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets the information about all network resources in a given resource group. The information include the description and other properties of the network.
Generated from API version 2018-09-01-preview
- options - NetworkClientListBySubscriptionOptions contains the optional parameters for the NetworkClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/networks/list_bySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNetworkClient().NewListBySubscriptionPager(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.NetworkResourceDescriptionList = armservicefabricmesh.NetworkResourceDescriptionList{ // Value: []*armservicefabricmesh.NetworkResourceDescription{ // { // Name: to.Ptr("sampleNetwork"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/networks"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.LocalNetworkResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.NetworkKindLocal), // Description: to.Ptr("Service Fabric Mesh sample network."), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // NetworkAddressPrefix: to.Ptr("2.0.0.0/16"), // }, // }}, // } } }
Output:
type NetworkClientCreateOptions ¶ added in v0.2.0
type NetworkClientCreateOptions struct { }
NetworkClientCreateOptions contains the optional parameters for the NetworkClient.Create method.
type NetworkClientCreateResponse ¶ added in v0.2.0
type NetworkClientCreateResponse struct {
NetworkResourceDescription
}
NetworkClientCreateResponse contains the response from method NetworkClient.Create.
type NetworkClientDeleteOptions ¶ added in v0.2.0
type NetworkClientDeleteOptions struct { }
NetworkClientDeleteOptions contains the optional parameters for the NetworkClient.Delete method.
type NetworkClientDeleteResponse ¶ added in v0.2.0
type NetworkClientDeleteResponse struct { }
NetworkClientDeleteResponse contains the response from method NetworkClient.Delete.
type NetworkClientGetOptions ¶ added in v0.2.0
type NetworkClientGetOptions struct { }
NetworkClientGetOptions contains the optional parameters for the NetworkClient.Get method.
type NetworkClientGetResponse ¶ added in v0.2.0
type NetworkClientGetResponse struct {
NetworkResourceDescription
}
NetworkClientGetResponse contains the response from method NetworkClient.Get.
type NetworkClientListByResourceGroupOptions ¶ added in v0.2.0
type NetworkClientListByResourceGroupOptions struct { }
NetworkClientListByResourceGroupOptions contains the optional parameters for the NetworkClient.NewListByResourceGroupPager method.
type NetworkClientListByResourceGroupResponse ¶ added in v0.2.0
type NetworkClientListByResourceGroupResponse struct {
NetworkResourceDescriptionList
}
NetworkClientListByResourceGroupResponse contains the response from method NetworkClient.NewListByResourceGroupPager.
type NetworkClientListBySubscriptionOptions ¶ added in v0.2.0
type NetworkClientListBySubscriptionOptions struct { }
NetworkClientListBySubscriptionOptions contains the optional parameters for the NetworkClient.NewListBySubscriptionPager method.
type NetworkClientListBySubscriptionResponse ¶ added in v0.2.0
type NetworkClientListBySubscriptionResponse struct {
NetworkResourceDescriptionList
}
NetworkClientListBySubscriptionResponse contains the response from method NetworkClient.NewListBySubscriptionPager.
type NetworkKind ¶
type NetworkKind string
NetworkKind - The type of a Service Fabric container network.
const ( // NetworkKindLocal - Indicates a container network local to a single Service Fabric cluster. The value is 1. NetworkKindLocal NetworkKind = "Local" )
func PossibleNetworkKindValues ¶
func PossibleNetworkKindValues() []NetworkKind
PossibleNetworkKindValues returns the possible values for the NetworkKind const type.
type NetworkRef ¶
type NetworkRef struct { // A list of endpoints that are exposed on this network. EndpointRefs []*EndpointRef // Name of the network Name *string }
NetworkRef - Describes a network reference in a service.
func (NetworkRef) MarshalJSON ¶
func (n NetworkRef) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkRef.
func (*NetworkRef) UnmarshalJSON ¶ added in v0.6.0
func (n *NetworkRef) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRef.
type NetworkResourceDescription ¶
type NetworkResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Describes properties of a network resource. Properties NetworkResourcePropertiesClassification // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
NetworkResourceDescription - This type describes a network resource.
func (NetworkResourceDescription) MarshalJSON ¶
func (n NetworkResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkResourceDescription.
func (*NetworkResourceDescription) UnmarshalJSON ¶
func (n *NetworkResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkResourceDescription.
type NetworkResourceDescriptionList ¶
type NetworkResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*NetworkResourceDescription }
NetworkResourceDescriptionList - A pageable list of network resources.
func (NetworkResourceDescriptionList) MarshalJSON ¶
func (n NetworkResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkResourceDescriptionList.
func (*NetworkResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (n *NetworkResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkResourceDescriptionList.
type NetworkResourceProperties ¶
type NetworkResourceProperties struct { // REQUIRED; The type of a Service Fabric container network. Kind *NetworkKind // User readable description of the network. Description *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the network. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the network. StatusDetails *string }
NetworkResourceProperties - Describes properties of a network resource.
func (*NetworkResourceProperties) GetNetworkResourceProperties ¶
func (n *NetworkResourceProperties) GetNetworkResourceProperties() *NetworkResourceProperties
GetNetworkResourceProperties implements the NetworkResourcePropertiesClassification interface for type NetworkResourceProperties.
func (*NetworkResourceProperties) GetNetworkResourcePropertiesBase ¶ added in v0.2.0
func (n *NetworkResourceProperties) GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase
GetNetworkResourcePropertiesBase implements the NetworkResourcePropertiesBaseClassification interface for type NetworkResourceProperties.
func (NetworkResourceProperties) MarshalJSON ¶
func (n NetworkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkResourceProperties.
func (*NetworkResourceProperties) UnmarshalJSON ¶
func (n *NetworkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkResourceProperties.
type NetworkResourcePropertiesBase ¶
type NetworkResourcePropertiesBase struct { // REQUIRED; The type of a Service Fabric container network. Kind *NetworkKind // READ-ONLY; State of the resource. ProvisioningState *string }
NetworkResourcePropertiesBase - This type describes the properties of a network resource, including its kind.
func (*NetworkResourcePropertiesBase) GetNetworkResourcePropertiesBase ¶
func (n *NetworkResourcePropertiesBase) GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase
GetNetworkResourcePropertiesBase implements the NetworkResourcePropertiesBaseClassification interface for type NetworkResourcePropertiesBase.
func (NetworkResourcePropertiesBase) MarshalJSON ¶ added in v0.6.0
func (n NetworkResourcePropertiesBase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkResourcePropertiesBase.
func (*NetworkResourcePropertiesBase) UnmarshalJSON ¶
func (n *NetworkResourcePropertiesBase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkResourcePropertiesBase.
type NetworkResourcePropertiesBaseClassification ¶
type NetworkResourcePropertiesBaseClassification interface { // GetNetworkResourcePropertiesBase returns the NetworkResourcePropertiesBase content of the underlying type. GetNetworkResourcePropertiesBase() *NetworkResourcePropertiesBase }
NetworkResourcePropertiesBaseClassification provides polymorphic access to related types. Call the interface's GetNetworkResourcePropertiesBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *LocalNetworkResourceProperties, *NetworkResourceProperties, *NetworkResourcePropertiesBase
type NetworkResourcePropertiesClassification ¶
type NetworkResourcePropertiesClassification interface { NetworkResourcePropertiesBaseClassification // GetNetworkResourceProperties returns the NetworkResourceProperties content of the underlying type. GetNetworkResourceProperties() *NetworkResourceProperties }
NetworkResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetNetworkResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *LocalNetworkResourceProperties, *NetworkResourceProperties
type OperatingSystemType ¶
type OperatingSystemType string
OperatingSystemType - The operation system required by the code in service.
const ( // OperatingSystemTypeLinux - The required operating system is Linux. OperatingSystemTypeLinux OperatingSystemType = "Linux" // OperatingSystemTypeWindows - The required operating system is Windows. OperatingSystemTypeWindows OperatingSystemType = "Windows" )
func PossibleOperatingSystemTypeValues ¶
func PossibleOperatingSystemTypeValues() []OperatingSystemType
PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type.
type OperationListResult ¶
type OperationListResult struct { // List of Service Fabric operations supported by the Microsoft.ServiceFabric 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 operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v0.6.0
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 // 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 - List of operations available at the listed Azure resource provider.
func (OperationResult) MarshalJSON ¶ added in v0.6.0
func (o OperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResult.
func (*OperationResult) UnmarshalJSON ¶ added in v0.6.0
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 ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all the available operations provided by Service Fabric SeaBreeze resource provider.
Generated from API version 2018-09-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PathMatchType ¶
type PathMatchType string
PathMatchType - how to match value in the Uri
const (
PathMatchTypePrefix PathMatchType = "prefix"
)
func PossiblePathMatchTypeValues ¶
func PossiblePathMatchTypeValues() []PathMatchType
PossiblePathMatchTypeValues returns the possible values for the PathMatchType const type.
type ProvisionedResourceProperties ¶
type ProvisionedResourceProperties struct { // READ-ONLY; State of the resource. ProvisioningState *string }
ProvisionedResourceProperties - Describes common properties of a provisioned resource.
func (ProvisionedResourceProperties) MarshalJSON ¶
func (p ProvisionedResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisionedResourceProperties.
func (*ProvisionedResourceProperties) UnmarshalJSON ¶
func (p *ProvisionedResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedResourceProperties.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ProxyResource - The resource model definition for Azure Resource Manager proxy resource. It will have everything other than required location and tags.
func (ProxyResource) MarshalJSON ¶ added in v0.6.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v0.6.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type ReliableCollectionsRef ¶
type ReliableCollectionsRef struct { // REQUIRED; Name of ReliableCollection resource. Right now it's not used and you can use any string. Name *string // False (the default) if ReliableCollections state is persisted to disk as usual. True if you do not want to persist state, // in which case replication is still enabled and you can use ReliableCollections // as distributed cache. DoNotPersistState *bool }
ReliableCollectionsRef - Specifying this parameter adds support for reliable collections
func (ReliableCollectionsRef) MarshalJSON ¶ added in v0.6.0
func (r ReliableCollectionsRef) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReliableCollectionsRef.
func (*ReliableCollectionsRef) UnmarshalJSON ¶ added in v0.6.0
func (r *ReliableCollectionsRef) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReliableCollectionsRef.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
Resource - The resource model definition for Azure Resource Manager resource.
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 ResourceLimits ¶
type ResourceLimits struct { // CPU limits in cores. At present, only full cores are supported. CPU *float64 // The memory limit in GB. MemoryInGB *float64 }
ResourceLimits - This type describes the resource limits for a given container. It describes the most amount of resources a container is allowed to use before being restarted.
func (ResourceLimits) MarshalJSON ¶ added in v0.6.0
func (r ResourceLimits) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceLimits.
func (*ResourceLimits) UnmarshalJSON ¶ added in v0.6.0
func (r *ResourceLimits) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLimits.
type ResourceRequests ¶
type ResourceRequests struct { // REQUIRED; Requested number of CPU cores. At present, only full cores are supported. CPU *float64 // REQUIRED; The memory request in GB for this container. MemoryInGB *float64 }
ResourceRequests - This type describes the requested resources for a given container. It describes the least amount of resources required for the container. A container can consume more than requested resources up to the specified limits before being restarted. Currently, the requested resources are treated as limits.
func (ResourceRequests) MarshalJSON ¶ added in v0.6.0
func (r ResourceRequests) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceRequests.
func (*ResourceRequests) UnmarshalJSON ¶ added in v0.6.0
func (r *ResourceRequests) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRequests.
type ResourceRequirements ¶
type ResourceRequirements struct { // REQUIRED; Describes the requested resources for a given container. Requests *ResourceRequests // Describes the maximum limits on the resources for a given container. Limits *ResourceLimits }
ResourceRequirements - This type describes the resource requirements for a container or a service.
func (ResourceRequirements) MarshalJSON ¶ added in v0.6.0
func (r ResourceRequirements) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceRequirements.
func (*ResourceRequirements) UnmarshalJSON ¶ added in v0.6.0
func (r *ResourceRequirements) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRequirements.
type ResourceStatus ¶
type ResourceStatus string
ResourceStatus - Status of the resource.
const ( // ResourceStatusCreating - Indicates the resource is being created. The value is 3. ResourceStatusCreating ResourceStatus = "Creating" // ResourceStatusDeleting - Indicates the resource is being deleted. The value is 4. ResourceStatusDeleting ResourceStatus = "Deleting" // ResourceStatusFailed - Indicates the resource is not functional due to persistent failures. See statusDetails property // for more details. The value is 5. ResourceStatusFailed ResourceStatus = "Failed" // ResourceStatusReady - Indicates the resource is ready. The value is 1. ResourceStatusReady ResourceStatus = "Ready" // ResourceStatusUnknown - Indicates the resource status is unknown. The value is zero. ResourceStatusUnknown ResourceStatus = "Unknown" // ResourceStatusUpgrading - Indicates the resource is upgrading. The value is 2. ResourceStatusUpgrading ResourceStatus = "Upgrading" )
func PossibleResourceStatusValues ¶
func PossibleResourceStatusValues() []ResourceStatus
PossibleResourceStatusValues returns the possible values for the ResourceStatus const type.
type SecretClient ¶
type SecretClient struct {
// contains filtered or unexported fields
}
SecretClient contains the methods for the Secret group. Don't use this type directly, use NewSecretClient() instead.
func NewSecretClient ¶
func NewSecretClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretClient, error)
NewSecretClient creates a new instance of SecretClient 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 (*SecretClient) Create ¶
func (client *SecretClient) Create(ctx context.Context, resourceGroupName string, secretResourceName string, secretResourceDescription SecretResourceDescription, options *SecretClientCreateOptions) (SecretClientCreateResponse, error)
Create - Creates a secret resource with the specified name, description and properties. If a secret resource with the same name exists, then it is updated with the specified description and properties. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- secretResourceDescription - Description for creating a secret resource.
- options - SecretClientCreateOptions contains the optional parameters for the SecretClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/create_update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSecretClient().Create(ctx, "sbz_demo", "dbConnectionString", armservicefabricmesh.SecretResourceDescription{ Location: to.Ptr("EastUS"), Tags: map[string]*string{}, Properties: &armservicefabricmesh.InlinedValueSecretResourceProperties{ Kind: to.Ptr(armservicefabricmesh.SecretKindInlinedValue), Description: to.Ptr("Mongo DB connection string for backend database!"), ContentType: to.Ptr("text/plain"), }, }, 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.SecretResourceDescription = armservicefabricmesh.SecretResourceDescription{ // Name: to.Ptr("dbConnectionString"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/secrets"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.InlinedValueSecretResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.SecretKindInlinedValue), // Description: to.Ptr("Mongo DB connection string for backend database!"), // ContentType: to.Ptr("text/plain"), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // } }
Output:
func (*SecretClient) Delete ¶
func (client *SecretClient) Delete(ctx context.Context, resourceGroupName string, secretResourceName string, options *SecretClientDeleteOptions) (SecretClientDeleteResponse, error)
Delete - Deletes the secret resource identified by the name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- options - SecretClientDeleteOptions contains the optional parameters for the SecretClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSecretClient().Delete(ctx, "sbz_demo", "dbConnectionString", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SecretClient) Get ¶
func (client *SecretClient) Get(ctx context.Context, resourceGroupName string, secretResourceName string, options *SecretClientGetOptions) (SecretClientGetResponse, error)
Get - Gets the information about the secret resource with the given name. The information include the description and other properties of the secret. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- options - SecretClientGetOptions contains the optional parameters for the SecretClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSecretClient().Get(ctx, "sbz_demo", "dbConnectionString", 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.SecretResourceDescription = armservicefabricmesh.SecretResourceDescription{ // Name: to.Ptr("dbConnectionString"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/secrets"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.InlinedValueSecretResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.SecretKindInlinedValue), // Description: to.Ptr("Mongo DB connection string for backend database!"), // ContentType: to.Ptr("text/plain"), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // } }
Output:
func (*SecretClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *SecretClient) NewListByResourceGroupPager(resourceGroupName string, options *SecretClientListByResourceGroupOptions) *runtime.Pager[SecretClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets the information about all secret resources in a given resource group. The information include the description and other properties of the Secret.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- options - SecretClientListByResourceGroupOptions contains the optional parameters for the SecretClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/list_byResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSecretClient().NewListByResourceGroupPager("sbz_demo", 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.SecretResourceDescriptionList = armservicefabricmesh.SecretResourceDescriptionList{ // Value: []*armservicefabricmesh.SecretResourceDescription{ // { // Name: to.Ptr("dbConnectionString"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/secrets"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.InlinedValueSecretResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.SecretKindInlinedValue), // Description: to.Ptr("Mongo DB connection string for backend database!"), // ContentType: to.Ptr("text/plain"), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // }}, // } } }
Output:
func (*SecretClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *SecretClient) NewListBySubscriptionPager(options *SecretClientListBySubscriptionOptions) *runtime.Pager[SecretClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets the information about all secret resources in a given resource group. The information include the description and other properties of the secret.
Generated from API version 2018-09-01-preview
- options - SecretClientListBySubscriptionOptions contains the optional parameters for the SecretClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/list_bySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSecretClient().NewListBySubscriptionPager(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.SecretResourceDescriptionList = armservicefabricmesh.SecretResourceDescriptionList{ // Value: []*armservicefabricmesh.SecretResourceDescription{ // { // Name: to.Ptr("dbConnectionString"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/secrets"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.InlinedValueSecretResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Kind: to.Ptr(armservicefabricmesh.SecretKindInlinedValue), // Description: to.Ptr("Mongo DB connection string for backend database!"), // ContentType: to.Ptr("text/plain"), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // }}, // } } }
Output:
type SecretClientCreateOptions ¶ added in v0.2.0
type SecretClientCreateOptions struct { }
SecretClientCreateOptions contains the optional parameters for the SecretClient.Create method.
type SecretClientCreateResponse ¶ added in v0.2.0
type SecretClientCreateResponse struct {
SecretResourceDescription
}
SecretClientCreateResponse contains the response from method SecretClient.Create.
type SecretClientDeleteOptions ¶ added in v0.2.0
type SecretClientDeleteOptions struct { }
SecretClientDeleteOptions contains the optional parameters for the SecretClient.Delete method.
type SecretClientDeleteResponse ¶ added in v0.2.0
type SecretClientDeleteResponse struct { }
SecretClientDeleteResponse contains the response from method SecretClient.Delete.
type SecretClientGetOptions ¶ added in v0.2.0
type SecretClientGetOptions struct { }
SecretClientGetOptions contains the optional parameters for the SecretClient.Get method.
type SecretClientGetResponse ¶ added in v0.2.0
type SecretClientGetResponse struct {
SecretResourceDescription
}
SecretClientGetResponse contains the response from method SecretClient.Get.
type SecretClientListByResourceGroupOptions ¶ added in v0.2.0
type SecretClientListByResourceGroupOptions struct { }
SecretClientListByResourceGroupOptions contains the optional parameters for the SecretClient.NewListByResourceGroupPager method.
type SecretClientListByResourceGroupResponse ¶ added in v0.2.0
type SecretClientListByResourceGroupResponse struct {
SecretResourceDescriptionList
}
SecretClientListByResourceGroupResponse contains the response from method SecretClient.NewListByResourceGroupPager.
type SecretClientListBySubscriptionOptions ¶ added in v0.2.0
type SecretClientListBySubscriptionOptions struct { }
SecretClientListBySubscriptionOptions contains the optional parameters for the SecretClient.NewListBySubscriptionPager method.
type SecretClientListBySubscriptionResponse ¶ added in v0.2.0
type SecretClientListBySubscriptionResponse struct {
SecretResourceDescriptionList
}
SecretClientListBySubscriptionResponse contains the response from method SecretClient.NewListBySubscriptionPager.
type SecretKind ¶
type SecretKind string
SecretKind - Describes the kind of secret.
const ( // SecretKindInlinedValue - A simple secret resource whose plaintext value is provided by the user. SecretKindInlinedValue SecretKind = "inlinedValue" )
func PossibleSecretKindValues ¶
func PossibleSecretKindValues() []SecretKind
PossibleSecretKindValues returns the possible values for the SecretKind const type.
type SecretResourceDescription ¶
type SecretResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Describes the properties of a secret resource. Properties SecretResourcePropertiesClassification // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
SecretResourceDescription - This type describes a secret resource.
func (SecretResourceDescription) MarshalJSON ¶
func (s SecretResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretResourceDescription.
func (*SecretResourceDescription) UnmarshalJSON ¶
func (s *SecretResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretResourceDescription.
type SecretResourceDescriptionList ¶
type SecretResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*SecretResourceDescription }
SecretResourceDescriptionList - A pageable list of secret resources.
func (SecretResourceDescriptionList) MarshalJSON ¶
func (s SecretResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretResourceDescriptionList.
func (*SecretResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (s *SecretResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretResourceDescriptionList.
type SecretResourceProperties ¶
type SecretResourceProperties struct { // REQUIRED; Describes the kind of secret. Kind *SecretKind // The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the // value of this property cannot be changed. ContentType *string // User readable description of the secret. Description *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the resource. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the secret. StatusDetails *string }
SecretResourceProperties - Describes the properties of a secret resource.
func (*SecretResourceProperties) GetSecretResourceProperties ¶
func (s *SecretResourceProperties) GetSecretResourceProperties() *SecretResourceProperties
GetSecretResourceProperties implements the SecretResourcePropertiesClassification interface for type SecretResourceProperties.
func (*SecretResourceProperties) GetSecretResourcePropertiesBase ¶ added in v0.2.0
func (s *SecretResourceProperties) GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase
GetSecretResourcePropertiesBase implements the SecretResourcePropertiesBaseClassification interface for type SecretResourceProperties.
func (SecretResourceProperties) MarshalJSON ¶
func (s SecretResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretResourceProperties.
func (*SecretResourceProperties) UnmarshalJSON ¶
func (s *SecretResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretResourceProperties.
type SecretResourcePropertiesBase ¶
type SecretResourcePropertiesBase struct { // REQUIRED; Describes the kind of secret. Kind *SecretKind // READ-ONLY; State of the resource. ProvisioningState *string }
SecretResourcePropertiesBase - This type describes the properties of a secret resource, including its kind.
func (*SecretResourcePropertiesBase) GetSecretResourcePropertiesBase ¶
func (s *SecretResourcePropertiesBase) GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase
GetSecretResourcePropertiesBase implements the SecretResourcePropertiesBaseClassification interface for type SecretResourcePropertiesBase.
func (SecretResourcePropertiesBase) MarshalJSON ¶ added in v0.6.0
func (s SecretResourcePropertiesBase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretResourcePropertiesBase.
func (*SecretResourcePropertiesBase) UnmarshalJSON ¶
func (s *SecretResourcePropertiesBase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretResourcePropertiesBase.
type SecretResourcePropertiesBaseClassification ¶
type SecretResourcePropertiesBaseClassification interface { // GetSecretResourcePropertiesBase returns the SecretResourcePropertiesBase content of the underlying type. GetSecretResourcePropertiesBase() *SecretResourcePropertiesBase }
SecretResourcePropertiesBaseClassification provides polymorphic access to related types. Call the interface's GetSecretResourcePropertiesBase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *InlinedValueSecretResourceProperties, *SecretResourceProperties, *SecretResourcePropertiesBase
type SecretResourcePropertiesClassification ¶
type SecretResourcePropertiesClassification interface { SecretResourcePropertiesBaseClassification // GetSecretResourceProperties returns the SecretResourceProperties content of the underlying type. GetSecretResourceProperties() *SecretResourceProperties }
SecretResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetSecretResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *InlinedValueSecretResourceProperties, *SecretResourceProperties
type SecretValue ¶
type SecretValue struct { // The actual value of the secret. Value *string }
SecretValue - This type represents the unencrypted value of the secret.
func (SecretValue) MarshalJSON ¶ added in v0.6.0
func (s SecretValue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretValue.
func (*SecretValue) UnmarshalJSON ¶ added in v0.6.0
func (s *SecretValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretValue.
type SecretValueClient ¶
type SecretValueClient struct {
// contains filtered or unexported fields
}
SecretValueClient contains the methods for the SecretValue group. Don't use this type directly, use NewSecretValueClient() instead.
func NewSecretValueClient ¶
func NewSecretValueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretValueClient, error)
NewSecretValueClient creates a new instance of SecretValueClient 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 (*SecretValueClient) Create ¶
func (client *SecretValueClient) Create(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string, secretValueResourceDescription SecretValueResourceDescription, options *SecretValueClientCreateOptions) (SecretValueClientCreateResponse, error)
Create - Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- secretValueResourceName - The name of the secret resource value which is typically the version identifier for the value.
- secretValueResourceDescription - Description for creating a value of a secret resource.
- options - SecretValueClientCreateOptions contains the optional parameters for the SecretValueClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/values/create.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSecretValueClient().Create(ctx, "sbz_demo", "dbConnectionString", "v1", armservicefabricmesh.SecretValueResourceDescription{ Name: to.Ptr("v1"), Properties: &armservicefabricmesh.SecretValueResourceProperties{ Value: to.Ptr("mongodb://contoso123:0Fc3IolnL12312asdfawejunASDF@asdfYXX2t8a97kghVcUzcDv98hawelufhawefafnoQRGwNj2nMPL1Y9qsIr9Srdw==@contoso123.documents.azure.com:10255/mydatabase?ssl=true"), }, }, 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.SecretValueResourceDescription = armservicefabricmesh.SecretValueResourceDescription{ // Name: to.Ptr("v1"), // Type: to.Ptr("secrets/values"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString/values/v1"), // Location: to.Ptr("EastUS"), // Properties: &armservicefabricmesh.SecretValueResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*SecretValueClient) Delete ¶
func (client *SecretValueClient) Delete(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string, options *SecretValueClientDeleteOptions) (SecretValueClientDeleteResponse, error)
Delete - Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- secretValueResourceName - The name of the secret resource value which is typically the version identifier for the value.
- options - SecretValueClientDeleteOptions contains the optional parameters for the SecretValueClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/values/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSecretValueClient().Delete(ctx, "sbz_demo", "dbConnectionString", "v1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SecretValueClient) Get ¶
func (client *SecretValueClient) Get(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string, options *SecretValueClientGetOptions) (SecretValueClientGetResponse, error)
Get - Get the information about the specified named secret value resources. The information does not include the actual value of the secret. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- secretValueResourceName - The name of the secret resource value which is typically the version identifier for the value.
- options - SecretValueClientGetOptions contains the optional parameters for the SecretValueClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/values/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSecretValueClient().Get(ctx, "sbz_demo", "dbConnectionString", "v1", 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.SecretValueResourceDescription = armservicefabricmesh.SecretValueResourceDescription{ // Name: to.Ptr("v1"), // Type: to.Ptr("secrets/values"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString/values/v1"), // Location: to.Ptr("EastUS"), // Properties: &armservicefabricmesh.SecretValueResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*SecretValueClient) ListValue ¶
func (client *SecretValueClient) ListValue(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string, options *SecretValueClientListValueOptions) (SecretValueClientListValueResponse, error)
ListValue - Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- secretValueResourceName - The name of the secret resource value which is typically the version identifier for the value.
- options - SecretValueClientListValueOptions contains the optional parameters for the SecretValueClient.ListValue method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/values/list_value.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSecretValueClient().ListValue(ctx, "sbz_demo", "dbConnectionString", "v1", 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.SecretValue = armservicefabricmesh.SecretValue{ // Value: to.Ptr("mongodb://contoso123:0Fc3IolnL12312asdfawejunASDF@asdfYXX2t8a97kghVcUzcDv98hawelufhawefafnoQRGwNj2nMPL1Y9qsIr9Srdw==@contoso123.documents.azure.com:10255/mydatabase?ssl=true"), // } }
Output:
func (*SecretValueClient) NewListPager ¶ added in v0.4.0
func (client *SecretValueClient) NewListPager(resourceGroupName string, secretResourceName string, options *SecretValueClientListOptions) *runtime.Pager[SecretValueClientListResponse]
NewListPager - Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- secretResourceName - The name of the secret resource.
- options - SecretValueClientListOptions contains the optional parameters for the SecretValueClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/secrets/values/list.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSecretValueClient().NewListPager("sbz_demo", "dbConnectionString", 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.SecretValueResourceDescriptionList = armservicefabricmesh.SecretValueResourceDescriptionList{ // Value: []*armservicefabricmesh.SecretValueResourceDescription{ // { // Name: to.Ptr("v1"), // Type: to.Ptr("secrets/values"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString/values/v1"), // Location: to.Ptr("EastUS"), // Properties: &armservicefabricmesh.SecretValueResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }, // { // Name: to.Ptr("v2"), // Type: to.Ptr("secrets/values"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/secrets/dbConnectionString/values/v2"), // Location: to.Ptr("EastUS"), // Properties: &armservicefabricmesh.SecretValueResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type SecretValueClientCreateOptions ¶ added in v0.2.0
type SecretValueClientCreateOptions struct { }
SecretValueClientCreateOptions contains the optional parameters for the SecretValueClient.Create method.
type SecretValueClientCreateResponse ¶ added in v0.2.0
type SecretValueClientCreateResponse struct {
SecretValueResourceDescription
}
SecretValueClientCreateResponse contains the response from method SecretValueClient.Create.
type SecretValueClientDeleteOptions ¶ added in v0.2.0
type SecretValueClientDeleteOptions struct { }
SecretValueClientDeleteOptions contains the optional parameters for the SecretValueClient.Delete method.
type SecretValueClientDeleteResponse ¶ added in v0.2.0
type SecretValueClientDeleteResponse struct { }
SecretValueClientDeleteResponse contains the response from method SecretValueClient.Delete.
type SecretValueClientGetOptions ¶ added in v0.2.0
type SecretValueClientGetOptions struct { }
SecretValueClientGetOptions contains the optional parameters for the SecretValueClient.Get method.
type SecretValueClientGetResponse ¶ added in v0.2.0
type SecretValueClientGetResponse struct {
SecretValueResourceDescription
}
SecretValueClientGetResponse contains the response from method SecretValueClient.Get.
type SecretValueClientListOptions ¶ added in v0.2.0
type SecretValueClientListOptions struct { }
SecretValueClientListOptions contains the optional parameters for the SecretValueClient.NewListPager method.
type SecretValueClientListResponse ¶ added in v0.2.0
type SecretValueClientListResponse struct {
SecretValueResourceDescriptionList
}
SecretValueClientListResponse contains the response from method SecretValueClient.NewListPager.
type SecretValueClientListValueOptions ¶ added in v0.2.0
type SecretValueClientListValueOptions struct { }
SecretValueClientListValueOptions contains the optional parameters for the SecretValueClient.ListValue method.
type SecretValueClientListValueResponse ¶ added in v0.2.0
type SecretValueClientListValueResponse struct {
SecretValue
}
SecretValueClientListValueResponse contains the response from method SecretValueClient.ListValue.
type SecretValueProperties ¶
type SecretValueProperties struct { // The actual value of the secret. Value *string }
SecretValueProperties - This type describes properties of secret value resource.
func (SecretValueProperties) MarshalJSON ¶
func (s SecretValueProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretValueProperties.
func (*SecretValueProperties) UnmarshalJSON ¶
func (s *SecretValueProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretValueProperties.
type SecretValueResourceDescription ¶
type SecretValueResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; This type describes properties of a secret value resource. Properties *SecretValueResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
SecretValueResourceDescription - This type describes a value of a secret resource. The name of this resource is the version identifier corresponding to this secret value.
func (SecretValueResourceDescription) MarshalJSON ¶
func (s SecretValueResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretValueResourceDescription.
func (*SecretValueResourceDescription) UnmarshalJSON ¶
func (s *SecretValueResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretValueResourceDescription.
type SecretValueResourceDescriptionList ¶
type SecretValueResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*SecretValueResourceDescription }
SecretValueResourceDescriptionList - A pageable list of values of a secret resource. The information does not include only the name of the value and not the actual unencrypted value.
func (SecretValueResourceDescriptionList) MarshalJSON ¶
func (s SecretValueResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretValueResourceDescriptionList.
func (*SecretValueResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (s *SecretValueResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretValueResourceDescriptionList.
type SecretValueResourceProperties ¶
type SecretValueResourceProperties struct { // The actual value of the secret. Value *string // READ-ONLY; State of the resource. ProvisioningState *string }
SecretValueResourceProperties - This type describes properties of a secret value resource.
func (SecretValueResourceProperties) MarshalJSON ¶ added in v0.6.0
func (s SecretValueResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretValueResourceProperties.
func (*SecretValueResourceProperties) UnmarshalJSON ¶ added in v0.6.0
func (s *SecretValueResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretValueResourceProperties.
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient contains the methods for the Service group. Don't use this type directly, use NewServiceClient() instead.
func NewServiceClient ¶
func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error)
NewServiceClient creates a new instance of ServiceClient 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 (*ServiceClient) Get ¶
func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error)
Get - Gets the information about the service resource with the given name. The information include the description and other properties of the service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- serviceResourceName - The identity of the service.
- options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceClient().Get(ctx, "sbz_demo", "sampleApplication", "helloWorldService", 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.ServiceResourceDescription = armservicefabricmesh.ServiceResourceDescription{ // Name: to.Ptr("helloWorldService"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/services"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService"), // Properties: &armservicefabricmesh.ServiceResourceProperties{ // Description: to.Ptr("SeaBreeze Hello World Service."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ReplicaCount: to.Ptr[int32](1), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // CodePackages: []*armservicefabricmesh.ContainerCodePackageProperties{ // { // Name: to.Ptr("helloWorldCode"), // Endpoints: []*armservicefabricmesh.EndpointProperties{ // { // Name: to.Ptr("helloWorldListener"), // Port: to.Ptr[int32](80), // }}, // Image: to.Ptr("seabreeze/sbz-helloworld:1.0-alpine"), // Resources: &armservicefabricmesh.ResourceRequirements{ // Requests: &armservicefabricmesh.ResourceRequests{ // CPU: to.Ptr[float64](1), // MemoryInGB: to.Ptr[float64](1), // }, // }, // }}, // NetworkRefs: []*armservicefabricmesh.NetworkRef{ // { // Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // EndpointRefs: []*armservicefabricmesh.EndpointRef{ // { // Name: to.Ptr("helloWorldListener"), // }}, // }}, // OSType: to.Ptr(armservicefabricmesh.OperatingSystemTypeLinux), // }, // } }
Output:
func (*ServiceClient) NewListPager ¶ added in v0.4.0
func (client *ServiceClient) NewListPager(resourceGroupName string, applicationResourceName string, options *ServiceClientListOptions) *runtime.Pager[ServiceClientListResponse]
NewListPager - Gets the information about all services of an application resource. The information include the description and other properties of the Service.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/list.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServiceClient().NewListPager("sbz_demo", "sampleApplication", 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.ServiceResourceDescriptionList = armservicefabricmesh.ServiceResourceDescriptionList{ // Value: []*armservicefabricmesh.ServiceResourceDescription{ // { // Name: to.Ptr("helloWorldService"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/services"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService"), // Properties: &armservicefabricmesh.ServiceResourceProperties{ // Description: to.Ptr("SeaBreeze Hello World Service."), // HealthState: to.Ptr(armservicefabricmesh.HealthStateOk), // ReplicaCount: to.Ptr[int32](1), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // CodePackages: []*armservicefabricmesh.ContainerCodePackageProperties{ // { // Name: to.Ptr("helloWorldCode"), // Endpoints: []*armservicefabricmesh.EndpointProperties{ // { // Name: to.Ptr("helloWorldListener"), // Port: to.Ptr[int32](80), // }}, // Image: to.Ptr("seabreeze/sbz-helloworld:1.0-alpine"), // Resources: &armservicefabricmesh.ResourceRequirements{ // Requests: &armservicefabricmesh.ResourceRequests{ // CPU: to.Ptr[float64](1), // MemoryInGB: to.Ptr[float64](1), // }, // }, // }}, // NetworkRefs: []*armservicefabricmesh.NetworkRef{ // { // Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // EndpointRefs: []*armservicefabricmesh.EndpointRef{ // { // Name: to.Ptr("helloWorldListener"), // }}, // }}, // OSType: to.Ptr(armservicefabricmesh.OperatingSystemTypeLinux), // }, // }}, // } } }
Output:
type ServiceClientGetOptions ¶ added in v0.2.0
type ServiceClientGetOptions struct { }
ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.
type ServiceClientGetResponse ¶ added in v0.2.0
type ServiceClientGetResponse struct {
ServiceResourceDescription
}
ServiceClientGetResponse contains the response from method ServiceClient.Get.
type ServiceClientListOptions ¶ added in v0.2.0
type ServiceClientListOptions struct { }
ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.
type ServiceClientListResponse ¶ added in v0.2.0
type ServiceClientListResponse struct {
ServiceResourceDescriptionList
}
ServiceClientListResponse contains the response from method ServiceClient.NewListPager.
type ServiceProperties ¶
type ServiceProperties struct { // Auto scaling policies AutoScalingPolicies []*AutoScalingPolicy // User readable description of the service. Description *string // The number of replicas of the service to create. Defaults to 1 if not specified. ReplicaCount *int32 // READ-ONLY; Describes the health state of an application resource. HealthState *HealthState // READ-ONLY; Status of the service. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the service. StatusDetails *string // READ-ONLY; When the service's health state is not 'Ok', this additional details from service fabric Health Manager for // the user to know why the service is marked unhealthy. UnhealthyEvaluation *string }
ServiceProperties - Describes properties of a service resource.
func (ServiceProperties) MarshalJSON ¶
func (s ServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceProperties.
func (*ServiceProperties) UnmarshalJSON ¶
func (s *ServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.
type ServiceReplicaClient ¶
type ServiceReplicaClient struct {
// contains filtered or unexported fields
}
ServiceReplicaClient contains the methods for the ServiceReplica group. Don't use this type directly, use NewServiceReplicaClient() instead.
func NewServiceReplicaClient ¶
func NewServiceReplicaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceReplicaClient, error)
NewServiceReplicaClient creates a new instance of ServiceReplicaClient 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 (*ServiceReplicaClient) Get ¶
func (client *ServiceReplicaClient) Get(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string, replicaName string, options *ServiceReplicaClientGetOptions) (ServiceReplicaClientGetResponse, error)
Get - Gets the information about the service replica with the given name. The information include the description and other properties of the service replica. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- serviceResourceName - The identity of the service.
- replicaName - Service Fabric replica name.
- options - ServiceReplicaClientGetOptions contains the optional parameters for the ServiceReplicaClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/replicas/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceReplicaClient().Get(ctx, "sbz_demo", "helloWorldApp", "helloWorldService", "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.ServiceReplicaDescription = armservicefabricmesh.ServiceReplicaDescription{ // CodePackages: []*armservicefabricmesh.ContainerCodePackageProperties{ // { // Name: to.Ptr("helloWorldCode"), // Endpoints: []*armservicefabricmesh.EndpointProperties{ // { // Name: to.Ptr("helloWorldListener"), // Port: to.Ptr[int32](80), // }}, // Image: to.Ptr("seabreeze/sbz-helloworld:1.0-alpine"), // InstanceView: &armservicefabricmesh.ContainerInstanceView{ // CurrentState: &armservicefabricmesh.ContainerState{ // ExitCode: to.Ptr("0"), // State: to.Ptr("Running"), // }, // Events: []*armservicefabricmesh.ContainerEvent{ // { // Name: to.Ptr("Created"), // Type: to.Ptr("Normal"), // Count: to.Ptr[int32](3), // FirstTimestamp: to.Ptr("2018-04-05T22:37:20.9016844"), // LastTimestamp: to.Ptr("2018-04-06T06:36:06.0887046"), // Message: to.Ptr("Container created and started."), // }, // { // Name: to.Ptr("Stopped"), // Type: to.Ptr("Normal"), // Count: to.Ptr[int32](1), // FirstTimestamp: to.Ptr("2018-04-06T06:34:00.6622454"), // LastTimestamp: to.Ptr("2018-04-06T06:34:00.6622454"), // Message: to.Ptr("Container was stopped."), // }}, // PreviousState: &armservicefabricmesh.ContainerState{ // ExitCode: to.Ptr("0"), // State: to.Ptr("NotSpecified"), // }, // RestartCount: to.Ptr[int32](1), // }, // Resources: &armservicefabricmesh.ResourceRequirements{ // Requests: &armservicefabricmesh.ResourceRequests{ // CPU: to.Ptr[float64](1), // MemoryInGB: to.Ptr[float64](1), // }, // }, // }}, // NetworkRefs: []*armservicefabricmesh.NetworkRef{ // { // Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // EndpointRefs: []*armservicefabricmesh.EndpointRef{ // { // Name: to.Ptr("helloWorldListener"), // }}, // }}, // OSType: to.Ptr(armservicefabricmesh.OperatingSystemTypeLinux), // ReplicaName: to.Ptr("0"), // } }
Output:
func (*ServiceReplicaClient) NewListPager ¶ added in v0.4.0
func (client *ServiceReplicaClient) NewListPager(resourceGroupName string, applicationResourceName string, serviceResourceName string, options *ServiceReplicaClientListOptions) *runtime.Pager[ServiceReplicaClientListResponse]
NewListPager - Gets the information about all replicas of a given service of an application. The information includes the runtime properties of the replica instance.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- applicationResourceName - The identity of the application.
- serviceResourceName - The identity of the service.
- options - ServiceReplicaClientListOptions contains the optional parameters for the ServiceReplicaClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/replicas/list.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServiceReplicaClient().NewListPager("sbz_demo", "sampleApplication", "helloWorldService", 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.ServiceReplicaDescriptionList = armservicefabricmesh.ServiceReplicaDescriptionList{ // Value: []*armservicefabricmesh.ServiceReplicaDescription{ // { // CodePackages: []*armservicefabricmesh.ContainerCodePackageProperties{ // { // Name: to.Ptr("helloWorldCode"), // Endpoints: []*armservicefabricmesh.EndpointProperties{ // { // Name: to.Ptr("helloWorldListener"), // Port: to.Ptr[int32](80), // }}, // Image: to.Ptr("seabreeze/sbz-helloworld:1.0-alpine"), // InstanceView: &armservicefabricmesh.ContainerInstanceView{ // CurrentState: &armservicefabricmesh.ContainerState{ // ExitCode: to.Ptr("0"), // State: to.Ptr("Running"), // }, // Events: []*armservicefabricmesh.ContainerEvent{ // { // Name: to.Ptr("Created"), // Type: to.Ptr("Normal"), // Count: to.Ptr[int32](3), // FirstTimestamp: to.Ptr("2018-04-05T22:37:20.9016844"), // LastTimestamp: to.Ptr("2018-04-06T06:36:06.0887046"), // Message: to.Ptr("Container created and started."), // }, // { // Name: to.Ptr("Stopped"), // Type: to.Ptr("Normal"), // Count: to.Ptr[int32](1), // FirstTimestamp: to.Ptr("2018-04-06T06:34:00.6622454"), // LastTimestamp: to.Ptr("2018-04-06T06:34:00.6622454"), // Message: to.Ptr("Container was stopped."), // }}, // PreviousState: &armservicefabricmesh.ContainerState{ // ExitCode: to.Ptr("0"), // State: to.Ptr("NotSpecified"), // }, // RestartCount: to.Ptr[int32](1), // }, // Resources: &armservicefabricmesh.ResourceRequirements{ // Requests: &armservicefabricmesh.ResourceRequests{ // CPU: to.Ptr[float64](1), // MemoryInGB: to.Ptr[float64](1), // }, // }, // }}, // NetworkRefs: []*armservicefabricmesh.NetworkRef{ // { // Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork"), // EndpointRefs: []*armservicefabricmesh.EndpointRef{ // { // Name: to.Ptr("helloWorldListener"), // }}, // }}, // OSType: to.Ptr(armservicefabricmesh.OperatingSystemTypeLinux), // ReplicaName: to.Ptr("0"), // }}, // } } }
Output:
type ServiceReplicaClientGetOptions ¶ added in v0.2.0
type ServiceReplicaClientGetOptions struct { }
ServiceReplicaClientGetOptions contains the optional parameters for the ServiceReplicaClient.Get method.
type ServiceReplicaClientGetResponse ¶ added in v0.2.0
type ServiceReplicaClientGetResponse struct {
ServiceReplicaDescription
}
ServiceReplicaClientGetResponse contains the response from method ServiceReplicaClient.Get.
type ServiceReplicaClientListOptions ¶ added in v0.2.0
type ServiceReplicaClientListOptions struct { }
ServiceReplicaClientListOptions contains the optional parameters for the ServiceReplicaClient.NewListPager method.
type ServiceReplicaClientListResponse ¶ added in v0.2.0
type ServiceReplicaClientListResponse struct {
ServiceReplicaDescriptionList
}
ServiceReplicaClientListResponse contains the response from method ServiceReplicaClient.NewListPager.
type ServiceReplicaDescription ¶
type ServiceReplicaDescription struct { // REQUIRED; Describes the set of code packages that forms the service. A code package describes the container and the properties // for running it. All the code packages are started together on the same host and // share the same context (network, process etc.). CodePackages []*ContainerCodePackageProperties // REQUIRED; The operation system required by the code in service. OSType *OperatingSystemType // REQUIRED; Name of the replica. ReplicaName *string // Reference to sinks in DiagnosticsDescription. Diagnostics *DiagnosticsRef // The names of the private networks that this service needs to be part of. NetworkRefs []*NetworkRef }
ServiceReplicaDescription - Describes a replica of a service resource.
func (ServiceReplicaDescription) MarshalJSON ¶
func (s ServiceReplicaDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceReplicaDescription.
func (*ServiceReplicaDescription) UnmarshalJSON ¶
func (s *ServiceReplicaDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceReplicaDescription.
type ServiceReplicaDescriptionList ¶
type ServiceReplicaDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*ServiceReplicaDescription }
ServiceReplicaDescriptionList - A pageable list of service replicas.
func (ServiceReplicaDescriptionList) MarshalJSON ¶
func (s ServiceReplicaDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceReplicaDescriptionList.
func (*ServiceReplicaDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (s *ServiceReplicaDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceReplicaDescriptionList.
type ServiceReplicaProperties ¶
type ServiceReplicaProperties struct { // REQUIRED; Describes the set of code packages that forms the service. A code package describes the container and the properties // for running it. All the code packages are started together on the same host and // share the same context (network, process etc.). CodePackages []*ContainerCodePackageProperties // REQUIRED; The operation system required by the code in service. OSType *OperatingSystemType // Reference to sinks in DiagnosticsDescription. Diagnostics *DiagnosticsRef // The names of the private networks that this service needs to be part of. NetworkRefs []*NetworkRef }
ServiceReplicaProperties - Describes the properties of a service replica.
func (ServiceReplicaProperties) MarshalJSON ¶
func (s ServiceReplicaProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceReplicaProperties.
func (*ServiceReplicaProperties) UnmarshalJSON ¶
func (s *ServiceReplicaProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceReplicaProperties.
type ServiceResourceDescription ¶
type ServiceResourceDescription struct { // REQUIRED; This type describes properties of a service resource. Properties *ServiceResourceProperties // The name of the resource Name *string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ServiceResourceDescription - This type describes a service resource.
func (ServiceResourceDescription) MarshalJSON ¶ added in v0.6.0
func (s ServiceResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceDescription.
func (*ServiceResourceDescription) UnmarshalJSON ¶ added in v0.6.0
func (s *ServiceResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceDescription.
type ServiceResourceDescriptionList ¶
type ServiceResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*ServiceResourceDescription }
ServiceResourceDescriptionList - A pageable list of service resources.
func (ServiceResourceDescriptionList) MarshalJSON ¶
func (s ServiceResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceDescriptionList.
func (*ServiceResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (s *ServiceResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceDescriptionList.
type ServiceResourceProperties ¶
type ServiceResourceProperties struct { // REQUIRED; Describes the set of code packages that forms the service. A code package describes the container and the properties // for running it. All the code packages are started together on the same host and // share the same context (network, process etc.). CodePackages []*ContainerCodePackageProperties // REQUIRED; The operation system required by the code in service. OSType *OperatingSystemType // Auto scaling policies AutoScalingPolicies []*AutoScalingPolicy // User readable description of the service. Description *string // Reference to sinks in DiagnosticsDescription. Diagnostics *DiagnosticsRef // The names of the private networks that this service needs to be part of. NetworkRefs []*NetworkRef // The number of replicas of the service to create. Defaults to 1 if not specified. ReplicaCount *int32 // READ-ONLY; Describes the health state of an application resource. HealthState *HealthState // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the service. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the service. StatusDetails *string // READ-ONLY; When the service's health state is not 'Ok', this additional details from service fabric Health Manager for // the user to know why the service is marked unhealthy. UnhealthyEvaluation *string }
ServiceResourceProperties - This type describes properties of a service resource.
func (ServiceResourceProperties) MarshalJSON ¶ added in v0.2.0
func (s ServiceResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceResourceProperties.
func (*ServiceResourceProperties) UnmarshalJSON ¶ added in v0.6.0
func (s *ServiceResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceProperties.
type Setting ¶
type Setting struct { // The name of the setting. Name *string // The value of the setting. Value *string }
Setting - Describes a setting for the container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\secrets". The path for Linux container is "/var/secrets".
func (Setting) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type Setting.
func (*Setting) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Setting.
type SizeTypes ¶
type SizeTypes string
SizeTypes - Volume size
func PossibleSizeTypesValues ¶
func PossibleSizeTypesValues() []SizeTypes
PossibleSizeTypesValues returns the possible values for the SizeTypes const type.
type TCPConfig ¶
type TCPConfig struct { // REQUIRED; Describes destination endpoint for routing traffic. Destination *GatewayDestination // REQUIRED; tcp gateway config name. Name *string // REQUIRED; Specifies the port at which the service endpoint below needs to be exposed. Port *int32 }
TCPConfig - Describes the tcp configuration for external connectivity for this network.
func (TCPConfig) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type TCPConfig.
func (*TCPConfig) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type TCPConfig.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
TrackedResource - The resource model definition for Azure Resource Manager tracked top-level resource.
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type VolumeClient ¶
type VolumeClient struct {
// contains filtered or unexported fields
}
VolumeClient contains the methods for the Volume group. Don't use this type directly, use NewVolumeClient() instead.
func NewVolumeClient ¶
func NewVolumeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeClient, error)
NewVolumeClient creates a new instance of VolumeClient 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 (*VolumeClient) Create ¶
func (client *VolumeClient) Create(ctx context.Context, resourceGroupName string, volumeResourceName string, volumeResourceDescription VolumeResourceDescription, options *VolumeClientCreateOptions) (VolumeClientCreateResponse, error)
Create - Creates a volume resource with the specified name, description and properties. If a volume resource with the same name exists, then it is updated with the specified description and properties. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- volumeResourceName - The identity of the volume.
- volumeResourceDescription - Description for creating a Volume resource.
- options - VolumeClientCreateOptions contains the optional parameters for the VolumeClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/volumes/create_update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVolumeClient().Create(ctx, "sbz_demo", "sampleVolume", armservicefabricmesh.VolumeResourceDescription{ Location: to.Ptr("EastUS"), Tags: map[string]*string{}, Properties: &armservicefabricmesh.VolumeResourceProperties{ Description: to.Ptr("Service Fabric Mesh sample volume."), AzureFileParameters: &armservicefabricmesh.VolumeProviderParametersAzureFile{ AccountKey: to.Ptr("provide-account-key-here"), AccountName: to.Ptr("sbzdemoaccount"), ShareName: to.Ptr("sharel"), }, Provider: to.Ptr(armservicefabricmesh.VolumeProviderSFAzureFile), }, }, 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.VolumeResourceDescription = armservicefabricmesh.VolumeResourceDescription{ // Name: to.Ptr("sampleVolume"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/volumes"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sampleVolume"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.VolumeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Description: to.Ptr("Service Fabric Mesh sample volume."), // AzureFileParameters: &armservicefabricmesh.VolumeProviderParametersAzureFile{ // AccountName: to.Ptr("sbzdemoaccount"), // ShareName: to.Ptr("sharel"), // }, // Provider: to.Ptr(armservicefabricmesh.VolumeProviderSFAzureFile), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // } }
Output:
func (*VolumeClient) Delete ¶
func (client *VolumeClient) Delete(ctx context.Context, resourceGroupName string, volumeResourceName string, options *VolumeClientDeleteOptions) (VolumeClientDeleteResponse, error)
Delete - Deletes the volume resource identified by the name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- volumeResourceName - The identity of the volume.
- options - VolumeClientDeleteOptions contains the optional parameters for the VolumeClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/volumes/delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewVolumeClient().Delete(ctx, "sbz_demo", "sampleVolume", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*VolumeClient) Get ¶
func (client *VolumeClient) Get(ctx context.Context, resourceGroupName string, volumeResourceName string, options *VolumeClientGetOptions) (VolumeClientGetResponse, error)
Get - Gets the information about the volume resource with the given name. The information include the description and other properties of the volume. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- volumeResourceName - The identity of the volume.
- options - VolumeClientGetOptions contains the optional parameters for the VolumeClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/volumes/get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVolumeClient().Get(ctx, "sbz_demo", "sampleVolume", 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.VolumeResourceDescription = armservicefabricmesh.VolumeResourceDescription{ // Name: to.Ptr("sampleVolume"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/volumes"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sampleVolume"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.VolumeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Description: to.Ptr("Service Fabric Mesh sample volume."), // AzureFileParameters: &armservicefabricmesh.VolumeProviderParametersAzureFile{ // AccountName: to.Ptr("sbzdemoaccount"), // ShareName: to.Ptr("sharel"), // }, // Provider: to.Ptr(armservicefabricmesh.VolumeProviderSFAzureFile), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // } }
Output:
func (*VolumeClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *VolumeClient) NewListByResourceGroupPager(resourceGroupName string, options *VolumeClientListByResourceGroupOptions) *runtime.Pager[VolumeClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets the information about all volume resources in a given resource group. The information include the description and other properties of the Volume.
Generated from API version 2018-09-01-preview
- resourceGroupName - Azure resource group name
- options - VolumeClientListByResourceGroupOptions contains the optional parameters for the VolumeClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/volumes/list_byResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVolumeClient().NewListByResourceGroupPager("sbz_demo", 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.VolumeResourceDescriptionList = armservicefabricmesh.VolumeResourceDescriptionList{ // Value: []*armservicefabricmesh.VolumeResourceDescription{ // { // Name: to.Ptr("sampleVolume"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/volumes"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sampleVolume"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.VolumeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Description: to.Ptr("Service Fabric Mesh sample volume."), // AzureFileParameters: &armservicefabricmesh.VolumeProviderParametersAzureFile{ // AccountName: to.Ptr("sbzdemoaccount"), // ShareName: to.Ptr("sharel"), // }, // Provider: to.Ptr(armservicefabricmesh.VolumeProviderSFAzureFile), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // }}, // } } }
Output:
func (*VolumeClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *VolumeClient) NewListBySubscriptionPager(options *VolumeClientListBySubscriptionOptions) *runtime.Pager[VolumeClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets the information about all volume resources in a given resource group. The information include the description and other properties of the volume.
Generated from API version 2018-09-01-preview
- options - VolumeClientListBySubscriptionOptions contains the optional parameters for the VolumeClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/servicefabricmesh/resource-manager/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/volumes/list_bySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicefabricmesh/armservicefabricmesh" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armservicefabricmesh.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVolumeClient().NewListBySubscriptionPager(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.VolumeResourceDescriptionList = armservicefabricmesh.VolumeResourceDescriptionList{ // Value: []*armservicefabricmesh.VolumeResourceDescription{ // { // Name: to.Ptr("sampleVolume"), // Type: to.Ptr("Microsoft.ServiceFabricMesh/volumes"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/volumes/sampleVolume"), // Location: to.Ptr("EastUS"), // Tags: map[string]*string{ // }, // Properties: &armservicefabricmesh.VolumeResourceProperties{ // ProvisioningState: to.Ptr("Succeeded"), // Description: to.Ptr("Service Fabric Mesh sample volume."), // AzureFileParameters: &armservicefabricmesh.VolumeProviderParametersAzureFile{ // AccountName: to.Ptr("sbzdemoaccount"), // ShareName: to.Ptr("sharel"), // }, // Provider: to.Ptr(armservicefabricmesh.VolumeProviderSFAzureFile), // Status: to.Ptr(armservicefabricmesh.ResourceStatusReady), // }, // }}, // } } }
Output:
type VolumeClientCreateOptions ¶ added in v0.2.0
type VolumeClientCreateOptions struct { }
VolumeClientCreateOptions contains the optional parameters for the VolumeClient.Create method.
type VolumeClientCreateResponse ¶ added in v0.2.0
type VolumeClientCreateResponse struct {
VolumeResourceDescription
}
VolumeClientCreateResponse contains the response from method VolumeClient.Create.
type VolumeClientDeleteOptions ¶ added in v0.2.0
type VolumeClientDeleteOptions struct { }
VolumeClientDeleteOptions contains the optional parameters for the VolumeClient.Delete method.
type VolumeClientDeleteResponse ¶ added in v0.2.0
type VolumeClientDeleteResponse struct { }
VolumeClientDeleteResponse contains the response from method VolumeClient.Delete.
type VolumeClientGetOptions ¶ added in v0.2.0
type VolumeClientGetOptions struct { }
VolumeClientGetOptions contains the optional parameters for the VolumeClient.Get method.
type VolumeClientGetResponse ¶ added in v0.2.0
type VolumeClientGetResponse struct {
VolumeResourceDescription
}
VolumeClientGetResponse contains the response from method VolumeClient.Get.
type VolumeClientListByResourceGroupOptions ¶ added in v0.2.0
type VolumeClientListByResourceGroupOptions struct { }
VolumeClientListByResourceGroupOptions contains the optional parameters for the VolumeClient.NewListByResourceGroupPager method.
type VolumeClientListByResourceGroupResponse ¶ added in v0.2.0
type VolumeClientListByResourceGroupResponse struct {
VolumeResourceDescriptionList
}
VolumeClientListByResourceGroupResponse contains the response from method VolumeClient.NewListByResourceGroupPager.
type VolumeClientListBySubscriptionOptions ¶ added in v0.2.0
type VolumeClientListBySubscriptionOptions struct { }
VolumeClientListBySubscriptionOptions contains the optional parameters for the VolumeClient.NewListBySubscriptionPager method.
type VolumeClientListBySubscriptionResponse ¶ added in v0.2.0
type VolumeClientListBySubscriptionResponse struct {
VolumeResourceDescriptionList
}
VolumeClientListBySubscriptionResponse contains the response from method VolumeClient.NewListBySubscriptionPager.
type VolumeProperties ¶
type VolumeProperties struct { // REQUIRED; Provider of the volume. Provider *VolumeProvider // This type describes a volume provided by an Azure Files file share. AzureFileParameters *VolumeProviderParametersAzureFile // User readable description of the volume. Description *string // READ-ONLY; Status of the volume. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the volume. StatusDetails *string }
VolumeProperties - Describes properties of a volume resource.
func (VolumeProperties) MarshalJSON ¶
func (v VolumeProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeProperties.
func (*VolumeProperties) UnmarshalJSON ¶
func (v *VolumeProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeProperties.
type VolumeProvider ¶
type VolumeProvider string
VolumeProvider - Describes the provider of the volume resource.
const ( // VolumeProviderSFAzureFile - Provides volumes that are backed by Azure Files. VolumeProviderSFAzureFile VolumeProvider = "SFAzureFile" )
func PossibleVolumeProviderValues ¶
func PossibleVolumeProviderValues() []VolumeProvider
PossibleVolumeProviderValues returns the possible values for the VolumeProvider const type.
type VolumeProviderParametersAzureFile ¶
type VolumeProviderParametersAzureFile struct { // REQUIRED; Name of the Azure storage account for the File Share. AccountName *string ShareName *string // Access key of the Azure storage account for the File Share. AccountKey *string }
VolumeProviderParametersAzureFile - This type describes a volume provided by an Azure Files file share.
func (VolumeProviderParametersAzureFile) MarshalJSON ¶ added in v0.6.0
func (v VolumeProviderParametersAzureFile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeProviderParametersAzureFile.
func (*VolumeProviderParametersAzureFile) UnmarshalJSON ¶ added in v0.6.0
func (v *VolumeProviderParametersAzureFile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeProviderParametersAzureFile.
type VolumeReference ¶
type VolumeReference struct { // REQUIRED; The path within the container at which the volume should be mounted. Only valid path characters are allowed. DestinationPath *string // REQUIRED; Name of the volume being referenced. Name *string // The flag indicating whether the volume is read only. Default is 'false'. ReadOnly *bool }
VolumeReference - Describes a reference to a volume resource.
func (VolumeReference) MarshalJSON ¶
func (v VolumeReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeReference.
func (*VolumeReference) UnmarshalJSON ¶
func (v *VolumeReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeReference.
type VolumeResourceDescription ¶
type VolumeResourceDescription struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; This type describes properties of a volume resource. Properties *VolumeResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified identifier for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
VolumeResourceDescription - This type describes a volume resource.
func (VolumeResourceDescription) MarshalJSON ¶
func (v VolumeResourceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeResourceDescription.
func (*VolumeResourceDescription) UnmarshalJSON ¶
func (v *VolumeResourceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeResourceDescription.
type VolumeResourceDescriptionList ¶
type VolumeResourceDescriptionList struct { // URI to fetch the next page of the list. NextLink *string // One page of the list. Value []*VolumeResourceDescription }
VolumeResourceDescriptionList - A pageable list of volume resources.
func (VolumeResourceDescriptionList) MarshalJSON ¶
func (v VolumeResourceDescriptionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeResourceDescriptionList.
func (*VolumeResourceDescriptionList) UnmarshalJSON ¶ added in v0.6.0
func (v *VolumeResourceDescriptionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeResourceDescriptionList.
type VolumeResourceProperties ¶
type VolumeResourceProperties struct { // REQUIRED; Provider of the volume. Provider *VolumeProvider // This type describes a volume provided by an Azure Files file share. AzureFileParameters *VolumeProviderParametersAzureFile // User readable description of the volume. Description *string // READ-ONLY; State of the resource. ProvisioningState *string // READ-ONLY; Status of the volume. Status *ResourceStatus // READ-ONLY; Gives additional information about the current status of the volume. StatusDetails *string }
VolumeResourceProperties - This type describes properties of a volume resource.
func (VolumeResourceProperties) MarshalJSON ¶ added in v0.6.0
func (v VolumeResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VolumeResourceProperties.
func (*VolumeResourceProperties) UnmarshalJSON ¶ added in v0.6.0
func (v *VolumeResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VolumeResourceProperties.
Source Files ¶
- application_client.go
- build.go
- client_factory.go
- codepackage_client.go
- constants.go
- gateway_client.go
- models.go
- models_serde.go
- network_client.go
- operations_client.go
- polymorphic_helpers.go
- response_types.go
- secret_client.go
- secretvalue_client.go
- service_client.go
- servicereplica_client.go
- time_rfc3339.go
- volume_client.go