armstoragesync

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 1

README

Azure Storage Sync Module for Go

PkgGoDev

The armstoragesync module provides operations for working with Azure Storage Sync.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Storage Sync module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Storage Sync. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Storage Sync module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armstoragesync.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armstoragesync.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewServicesClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Storage Sync label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError added in v0.2.0

type APIError struct {
	// Error code of the given entry.
	Code *string

	// Error details of the given entry.
	Details *ErrorDetails

	// Inner error details of the given entry.
	Innererror *InnerErrorDetails

	// Error message of the given entry.
	Message *string

	// Target of the given error entry.
	Target *string
}

APIError - Error type

func (APIError) MarshalJSON added in v1.1.0

func (a APIError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIError.

func (*APIError) UnmarshalJSON added in v1.1.0

func (a *APIError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIError.

type BackupRequest

type BackupRequest struct {
	// Azure File Share.
	AzureFileShare *string
}

BackupRequest - Backup request

func (BackupRequest) MarshalJSON added in v1.1.0

func (b BackupRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupRequest.

func (*BackupRequest) UnmarshalJSON added in v1.1.0

func (b *BackupRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequest.

type ChangeDetectionMode

type ChangeDetectionMode string

ChangeDetectionMode - Change Detection Mode. Applies to a directory specified in directoryPath parameter.

const (
	ChangeDetectionModeDefault   ChangeDetectionMode = "Default"
	ChangeDetectionModeRecursive ChangeDetectionMode = "Recursive"
)

func PossibleChangeDetectionModeValues

func PossibleChangeDetectionModeValues() []ChangeDetectionMode

PossibleChangeDetectionModeValues returns the possible values for the ChangeDetectionMode const type.

type CheckNameAvailabilityParameters

type CheckNameAvailabilityParameters struct {
	// REQUIRED; The name to check for availability
	Name *string

	// CONSTANT; The resource type. Must be set to Microsoft.StorageSync/storageSyncServices
	// Field has constant value "Microsoft.StorageSync/storageSyncServices", any specified value is ignored.
	Type *string
}

CheckNameAvailabilityParameters - Parameters for a check name availability request.

func (CheckNameAvailabilityParameters) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters.

func (*CheckNameAvailabilityParameters) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameters.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// READ-ONLY; Gets an error message explaining the Reason value in more detail.
	Message *string

	// READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available.
	// If false, the name has already been taken or invalid and cannot be used.
	NameAvailable *bool

	// READ-ONLY; Gets the reason that a Storage Sync Service name could not be used. The Reason element is only returned if NameAvailable
	// is false.
	Reason *NameAvailabilityReason
}

CheckNameAvailabilityResult - The CheckNameAvailability operation response.

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory added in v1.1.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 v1.1.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 ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewCloudEndpointsClient added in v1.1.0

func (c *ClientFactory) NewCloudEndpointsClient() *CloudEndpointsClient

NewCloudEndpointsClient creates a new instance of CloudEndpointsClient.

func (*ClientFactory) NewMicrosoftStorageSyncClient added in v1.1.0

func (c *ClientFactory) NewMicrosoftStorageSyncClient() *MicrosoftStorageSyncClient

NewMicrosoftStorageSyncClient creates a new instance of MicrosoftStorageSyncClient.

func (*ClientFactory) NewOperationStatusClient added in v1.1.0

func (c *ClientFactory) NewOperationStatusClient() *OperationStatusClient

NewOperationStatusClient creates a new instance of OperationStatusClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewRegisteredServersClient added in v1.1.0

func (c *ClientFactory) NewRegisteredServersClient() *RegisteredServersClient

NewRegisteredServersClient creates a new instance of RegisteredServersClient.

func (*ClientFactory) NewServerEndpointsClient added in v1.1.0

func (c *ClientFactory) NewServerEndpointsClient() *ServerEndpointsClient

NewServerEndpointsClient creates a new instance of ServerEndpointsClient.

func (*ClientFactory) NewServicesClient added in v1.1.0

func (c *ClientFactory) NewServicesClient() *ServicesClient

NewServicesClient creates a new instance of ServicesClient.

func (*ClientFactory) NewSyncGroupsClient added in v1.1.0

func (c *ClientFactory) NewSyncGroupsClient() *SyncGroupsClient

NewSyncGroupsClient creates a new instance of SyncGroupsClient.

func (*ClientFactory) NewWorkflowsClient added in v1.1.0

func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient

NewWorkflowsClient creates a new instance of WorkflowsClient.

type CloudEndpoint

type CloudEndpoint struct {
	// Cloud Endpoint properties.
	Properties *CloudEndpointProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CloudEndpoint - Cloud Endpoint object.

func (CloudEndpoint) MarshalJSON

func (c CloudEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpoint.

func (*CloudEndpoint) UnmarshalJSON added in v1.1.0

func (c *CloudEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpoint.

type CloudEndpointArray

type CloudEndpointArray struct {
	// Collection of CloudEndpoint.
	Value []*CloudEndpoint
}

CloudEndpointArray - Array of CloudEndpoint

func (CloudEndpointArray) MarshalJSON

func (c CloudEndpointArray) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointArray.

func (*CloudEndpointArray) UnmarshalJSON added in v1.1.0

func (c *CloudEndpointArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointArray.

type CloudEndpointChangeEnumerationActivity

type CloudEndpointChangeEnumerationActivity struct {
	// READ-ONLY; Progress percentage for processing deletes. This is done separately from the rest of the enumeration run
	DeletesProgressPercent *int32

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Estimate of time remaining for the enumeration run
	MinutesRemaining *int32

	// READ-ONLY; Change enumeration operation state
	OperationState *CloudEndpointChangeEnumerationActivityState

	// READ-ONLY; Count of directories processed
	ProcessedDirectoriesCount *int64

	// READ-ONLY; Count of files processed
	ProcessedFilesCount *int64

	// READ-ONLY; Progress percentage for change enumeration run, excluding processing of deletes
	ProgressPercent *int32

	// READ-ONLY; Timestamp when change enumeration started
	StartedTimestamp *time.Time

	// READ-ONLY; When non-zero, indicates an issue that is delaying change enumeration
	StatusCode *int32

	// READ-ONLY; Change enumeration total counts state
	TotalCountsState *CloudEndpointChangeEnumerationTotalCountsState

	// READ-ONLY; Total count of directories enumerated
	TotalDirectoriesCount *int64

	// READ-ONLY; Total count of files enumerated
	TotalFilesCount *int64

	// READ-ONLY; Total enumerated size in bytes
	TotalSizeBytes *int64
}

CloudEndpointChangeEnumerationActivity - Cloud endpoint change enumeration activity object

func (CloudEndpointChangeEnumerationActivity) MarshalJSON

func (c CloudEndpointChangeEnumerationActivity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointChangeEnumerationActivity.

func (*CloudEndpointChangeEnumerationActivity) UnmarshalJSON

func (c *CloudEndpointChangeEnumerationActivity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointChangeEnumerationActivity.

type CloudEndpointChangeEnumerationActivityState

type CloudEndpointChangeEnumerationActivityState string

CloudEndpointChangeEnumerationActivityState - State of change enumeration activity

const (
	CloudEndpointChangeEnumerationActivityStateEnumerationInProgress        CloudEndpointChangeEnumerationActivityState = "EnumerationInProgress"
	CloudEndpointChangeEnumerationActivityStateInitialEnumerationInProgress CloudEndpointChangeEnumerationActivityState = "InitialEnumerationInProgress"
)

func PossibleCloudEndpointChangeEnumerationActivityStateValues

func PossibleCloudEndpointChangeEnumerationActivityStateValues() []CloudEndpointChangeEnumerationActivityState

PossibleCloudEndpointChangeEnumerationActivityStateValues returns the possible values for the CloudEndpointChangeEnumerationActivityState const type.

type CloudEndpointChangeEnumerationStatus

type CloudEndpointChangeEnumerationStatus struct {
	// READ-ONLY; Change enumeration activity
	Activity *CloudEndpointChangeEnumerationActivity

	// READ-ONLY; Status of last completed change enumeration
	LastEnumerationStatus *CloudEndpointLastChangeEnumerationStatus

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time
}

CloudEndpointChangeEnumerationStatus - Cloud endpoint change enumeration status object

func (CloudEndpointChangeEnumerationStatus) MarshalJSON

func (c CloudEndpointChangeEnumerationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointChangeEnumerationStatus.

func (*CloudEndpointChangeEnumerationStatus) UnmarshalJSON

func (c *CloudEndpointChangeEnumerationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointChangeEnumerationStatus.

type CloudEndpointChangeEnumerationTotalCountsState

type CloudEndpointChangeEnumerationTotalCountsState string

CloudEndpointChangeEnumerationTotalCountsState - State of the total counts of change enumeration activity

const (
	CloudEndpointChangeEnumerationTotalCountsStateCalculating CloudEndpointChangeEnumerationTotalCountsState = "Calculating"
	CloudEndpointChangeEnumerationTotalCountsStateFinal       CloudEndpointChangeEnumerationTotalCountsState = "Final"
)

func PossibleCloudEndpointChangeEnumerationTotalCountsStateValues

func PossibleCloudEndpointChangeEnumerationTotalCountsStateValues() []CloudEndpointChangeEnumerationTotalCountsState

PossibleCloudEndpointChangeEnumerationTotalCountsStateValues returns the possible values for the CloudEndpointChangeEnumerationTotalCountsState const type.

type CloudEndpointCreateParameters

type CloudEndpointCreateParameters struct {
	// The parameters used to create the cloud endpoint.
	Properties *CloudEndpointCreateParametersProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CloudEndpointCreateParameters - The parameters used when creating a cloud endpoint.

func (CloudEndpointCreateParameters) MarshalJSON

func (c CloudEndpointCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointCreateParameters.

func (*CloudEndpointCreateParameters) UnmarshalJSON added in v1.1.0

func (c *CloudEndpointCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointCreateParameters.

type CloudEndpointCreateParametersProperties

type CloudEndpointCreateParametersProperties struct {
	// Azure file share name
	AzureFileShareName *string

	// Friendly Name
	FriendlyName *string

	// Storage Account Resource Id
	StorageAccountResourceID *string

	// Storage Account Tenant Id
	StorageAccountTenantID *string
}

CloudEndpointCreateParametersProperties - CloudEndpoint Properties object.

func (CloudEndpointCreateParametersProperties) MarshalJSON added in v1.1.0

func (c CloudEndpointCreateParametersProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointCreateParametersProperties.

func (*CloudEndpointCreateParametersProperties) UnmarshalJSON added in v1.1.0

func (c *CloudEndpointCreateParametersProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointCreateParametersProperties.

type CloudEndpointLastChangeEnumerationStatus

type CloudEndpointLastChangeEnumerationStatus struct {
	// READ-ONLY; Timestamp when change enumeration completed
	CompletedTimestamp *time.Time

	// READ-ONLY; Count of directories in the namespace
	NamespaceDirectoriesCount *int64

	// READ-ONLY; Count of files in the namespace
	NamespaceFilesCount *int64

	// READ-ONLY; Namespace size in bytes
	NamespaceSizeBytes *int64

	// READ-ONLY; Timestamp of when change enumeration is expected to run again
	NextRunTimestamp *time.Time

	// READ-ONLY; Timestamp when change enumeration started
	StartedTimestamp *time.Time
}

CloudEndpointLastChangeEnumerationStatus - Cloud endpoint change enumeration status object

func (CloudEndpointLastChangeEnumerationStatus) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type CloudEndpointLastChangeEnumerationStatus.

func (*CloudEndpointLastChangeEnumerationStatus) UnmarshalJSON

func (c *CloudEndpointLastChangeEnumerationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointLastChangeEnumerationStatus.

type CloudEndpointProperties

type CloudEndpointProperties struct {
	// Azure file share name
	AzureFileShareName *string

	// Friendly Name
	FriendlyName *string

	// Resource Last Operation Name
	LastOperationName *string

	// CloudEndpoint lastWorkflowId
	LastWorkflowID *string

	// Partnership Id
	PartnershipID *string

	// CloudEndpoint Provisioning State
	ProvisioningState *string

	// Storage Account Resource Id
	StorageAccountResourceID *string

	// Storage Account Tenant Id
	StorageAccountTenantID *string

	// READ-ONLY; Backup Enabled
	BackupEnabled *string

	// READ-ONLY; Cloud endpoint change enumeration status
	ChangeEnumerationStatus *CloudEndpointChangeEnumerationStatus
}

CloudEndpointProperties - CloudEndpoint Properties object.

func (CloudEndpointProperties) MarshalJSON added in v1.1.0

func (c CloudEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudEndpointProperties.

func (*CloudEndpointProperties) UnmarshalJSON added in v1.1.0

func (c *CloudEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudEndpointProperties.

type CloudEndpointsClient

type CloudEndpointsClient struct {
	// contains filtered or unexported fields
}

CloudEndpointsClient contains the methods for the CloudEndpoints group. Don't use this type directly, use NewCloudEndpointsClient() instead.

func NewCloudEndpointsClient

func NewCloudEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudEndpointsClient, error)

NewCloudEndpointsClient creates a new instance of CloudEndpointsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CloudEndpointsClient) BeginCreate

func (client *CloudEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters CloudEndpointCreateParameters, options *CloudEndpointsClientBeginCreateOptions) (*runtime.Poller[CloudEndpointsClientCreateResponse], error)

BeginCreate - Create a new CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Body of Cloud Endpoint resource.
  • options - CloudEndpointsClientBeginCreateOptions contains the optional parameters for the CloudEndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginCreate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.CloudEndpointCreateParameters{
		Properties: &armstoragesync.CloudEndpointCreateParametersProperties{
			AzureFileShareName:       to.Ptr("cvcloud-afscv-0719-058-a94a1354-a1fd-4e9a-9a50-919fad8c4ba4"),
			FriendlyName:             to.Ptr("ankushbsubscriptionmgmtmab"),
			StorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/tminienv59svc/providers/Microsoft.Storage/storageAccounts/tminienv59storage"),
			StorageAccountTenantID:   to.Ptr("\"72f988bf-86f1-41af-91ab-2d7cd011db47\""),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CloudEndpoint = armstoragesync.CloudEndpoint{
	// 	Name: to.Ptr("SampleCloudEndpoint_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/cloudEndpoints"),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/cloudEndpoints/SampleCloudEndpoint_1"),
	// 	Properties: &armstoragesync.CloudEndpointProperties{
	// 		AzureFileShareName: to.Ptr("cvcloud-afscv-0719-058-a94a1354-a1fd-4e9a-9a50-919fad8c4ba4"),
	// 		BackupEnabled: to.Ptr("false"),
	// 		FriendlyName: to.Ptr("ankushbsubscriptionmgmtmab"),
	// 		LastOperationName: to.Ptr("ICreateCloudEndpointWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/GATest/workflows/24ba0c4a-348e-419b-8f7a-091d0d9f07a4"),
	// 		PartnershipID: to.Ptr("1|U0VSVkVSQVNTWU5DQ0xJRU5USEZTVjJ8RjhDODcwQTItMkFGNi00NDUyLTgzMDgtRjJCQTZEQjI3RkEwfEdFTkVSSUN8NTJCOERBMkYtNjFFMC00QTFGLThEREUtMzM2OTExRjM2N0ZC"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		StorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/tminienv59svc/providers/Microsoft.Storage/storageAccounts/tminienv59storage"),
	// 		StorageAccountTenantID: to.Ptr("\"72f988bf-86f1-41af-91ab-2d7cd011db47\""),
	// 	},
	// }
}
Output:

func (*CloudEndpointsClient) BeginDelete

func (client *CloudEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, options *CloudEndpointsClientBeginDeleteOptions) (*runtime.Poller[CloudEndpointsClientDeleteResponse], error)

BeginDelete - Delete a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • options - CloudEndpointsClientBeginDeleteOptions contains the optional parameters for the CloudEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginDelete(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CloudEndpointsClient) BeginPostBackup

func (client *CloudEndpointsClient) BeginPostBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters BackupRequest, options *CloudEndpointsClientBeginPostBackupOptions) (*runtime.Poller[CloudEndpointsClientPostBackupResponse], error)

BeginPostBackup - Post Backup a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Body of Backup request.
  • options - CloudEndpointsClientBeginPostBackupOptions contains the optional parameters for the CloudEndpointsClient.BeginPostBackup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PostBackup.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginPostBackup(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.BackupRequest{
		AzureFileShare: to.Ptr("https://sampleserver.file.core.test-cint.azure-test.net/sampleFileShare"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PostBackupResponse = armstoragesync.PostBackupResponse{
	// 	BackupMetadata: &armstoragesync.PostBackupResponseProperties{
	// 		CloudEndpointName: to.Ptr("subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/cloudEndpoints/SampleCloudEndpoint_1"),
	// 	},
	// }
}
Output:

func (*CloudEndpointsClient) BeginPostRestore

func (client *CloudEndpointsClient) BeginPostRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters PostRestoreRequest, options *CloudEndpointsClientBeginPostRestoreOptions) (*runtime.Poller[CloudEndpointsClientPostRestoreResponse], error)

BeginPostRestore - Post Restore a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Body of Cloud Endpoint object.
  • options - CloudEndpointsClientBeginPostRestoreOptions contains the optional parameters for the CloudEndpointsClient.BeginPostRestore method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PostRestore.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginPostRestore(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.PostRestoreRequest{
		AzureFileShareURI: to.Ptr("https://hfsazbackupdevintncus2.file.core.test-cint.azure-test.net/sampleFileShare"),
		RestoreFileSpec: []*armstoragesync.RestoreFileSpec{
			{
				Path:  to.Ptr("text1.txt"),
				Isdir: to.Ptr(false),
			},
			{
				Path:  to.Ptr("MyDir"),
				Isdir: to.Ptr(true),
			},
			{
				Path:  to.Ptr("MyDir/SubDir"),
				Isdir: to.Ptr(false),
			},
			{
				Path:  to.Ptr("MyDir/SubDir/File1.pdf"),
				Isdir: to.Ptr(false),
			}},
		SourceAzureFileShareURI: to.Ptr("https://hfsazbackupdevintncus2.file.core.test-cint.azure-test.net/sampleFileShare"),
		Status:                  to.Ptr("Succeeded"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CloudEndpointsClient) BeginPreBackup

func (client *CloudEndpointsClient) BeginPreBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters BackupRequest, options *CloudEndpointsClientBeginPreBackupOptions) (*runtime.Poller[CloudEndpointsClientPreBackupResponse], error)

BeginPreBackup - Pre Backup a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Body of Backup request.
  • options - CloudEndpointsClientBeginPreBackupOptions contains the optional parameters for the CloudEndpointsClient.BeginPreBackup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PreBackup.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginPreBackup(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.BackupRequest{
		AzureFileShare: to.Ptr("https://sampleserver.file.core.test-cint.azure-test.net/sampleFileShare"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CloudEndpointsClient) BeginPreRestore

func (client *CloudEndpointsClient) BeginPreRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters PreRestoreRequest, options *CloudEndpointsClientBeginPreRestoreOptions) (*runtime.Poller[CloudEndpointsClientPreRestoreResponse], error)

BeginPreRestore - Pre Restore a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Body of Cloud Endpoint object.
  • options - CloudEndpointsClientBeginPreRestoreOptions contains the optional parameters for the CloudEndpointsClient.BeginPreRestore method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PreRestore.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginPreRestore(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.PreRestoreRequest{
		AzureFileShareURI: to.Ptr("https://hfsazbackupdevintncus2.file.core.test-cint.azure-test.net/sampleFileShare"),
		RestoreFileSpec: []*armstoragesync.RestoreFileSpec{
			{
				Path:  to.Ptr("text1.txt"),
				Isdir: to.Ptr(false),
			},
			{
				Path:  to.Ptr("MyDir"),
				Isdir: to.Ptr(true),
			},
			{
				Path:  to.Ptr("MyDir/SubDir"),
				Isdir: to.Ptr(false),
			},
			{
				Path:  to.Ptr("MyDir/SubDir/File1.pdf"),
				Isdir: to.Ptr(false),
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CloudEndpointsClient) BeginTriggerChangeDetection

func (client *CloudEndpointsClient) BeginTriggerChangeDetection(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters TriggerChangeDetectionParameters, options *CloudEndpointsClientBeginTriggerChangeDetectionOptions) (*runtime.Poller[CloudEndpointsClientTriggerChangeDetectionResponse], error)

BeginTriggerChangeDetection - Triggers detection of changes performed on Azure File share connected to the specified Azure File Sync Cloud Endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • parameters - Trigger Change Detection Action parameters.
  • options - CloudEndpointsClientBeginTriggerChangeDetectionOptions contains the optional parameters for the CloudEndpointsClient.BeginTriggerChangeDetection method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_TriggerChangeDetection.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCloudEndpointsClient().BeginTriggerChangeDetection(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", armstoragesync.TriggerChangeDetectionParameters{
		ChangeDetectionMode: to.Ptr(armstoragesync.ChangeDetectionModeRecursive),
		DirectoryPath:       to.Ptr("NewDirectory"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CloudEndpointsClient) Get

func (client *CloudEndpointsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, options *CloudEndpointsClientGetOptions) (CloudEndpointsClientGetResponse, error)

Get - Get a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • options - CloudEndpointsClientGetOptions contains the optional parameters for the CloudEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCloudEndpointsClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", 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.CloudEndpoint = armstoragesync.CloudEndpoint{
	// 	Name: to.Ptr("SampleCloudEndpoint_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/cloudEndpoints"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SyncGroup_Restore_08-08_Test112/cloudEndpoints/CEP_Restore_08-08_Test112"),
	// 	Properties: &armstoragesync.CloudEndpointProperties{
	// 		AzureFileShareName: to.Ptr(""),
	// 		ChangeEnumerationStatus: &armstoragesync.CloudEndpointChangeEnumerationStatus{
	// 			Activity: &armstoragesync.CloudEndpointChangeEnumerationActivity{
	// 				DeletesProgressPercent: to.Ptr[int32](12),
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 				MinutesRemaining: to.Ptr[int32](589),
	// 				OperationState: to.Ptr(armstoragesync.CloudEndpointChangeEnumerationActivityStateEnumerationInProgress),
	// 				ProcessedDirectoriesCount: to.Ptr[int64](364),
	// 				ProcessedFilesCount: to.Ptr[int64](6948),
	// 				ProgressPercent: to.Ptr[int32](67),
	// 				StartedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 				StatusCode: to.Ptr[int32](0),
	// 				TotalCountsState: to.Ptr(armstoragesync.CloudEndpointChangeEnumerationTotalCountsStateFinal),
	// 				TotalDirectoriesCount: to.Ptr[int64](694),
	// 				TotalFilesCount: to.Ptr[int64](12834),
	// 				TotalSizeBytes: to.Ptr[int64](5782301239408),
	// 			},
	// 			LastEnumerationStatus: &armstoragesync.CloudEndpointLastChangeEnumerationStatus{
	// 				CompletedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 				NamespaceDirectoriesCount: to.Ptr[int64](28),
	// 				NamespaceFilesCount: to.Ptr[int64](3489),
	// 				NamespaceSizeBytes: to.Ptr[int64](3248804),
	// 				NextRunTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 				StartedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 			},
	// 			LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
	// 		},
	// 		FriendlyName: to.Ptr("SampleAzureFileShareName_1"),
	// 		LastOperationName: to.Ptr("ICreateCloudEndpointWorkflow"),
	// 		LastWorkflowID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/workflows/a377fdd5-949a-40ab-9629-06cd0e9852f9"),
	// 		PartnershipID: to.Ptr("1|U0VSVkVSQVNTWU5DQ0xJRU5USEZTVjJ8MTkxNjYwQ0QtNkExQS00RjhDLTk3ODctQTZCRUQyMDZBMUREfEdFTkVSSUN8M0EwNDgyODMtMzM4Ri00MDAyLUE5REQtQTUwRkRBRENCMzky"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		StorageAccountResourceID: to.Ptr(""),
	// 		StorageAccountTenantID: to.Ptr("\"a4d1b191-c1af-4cef-a14b-f670e0beea52\""),
	// 	},
	// }
}
Output:

func (*CloudEndpointsClient) NewListBySyncGroupPager added in v0.4.0

func (client *CloudEndpointsClient) NewListBySyncGroupPager(resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *CloudEndpointsClientListBySyncGroupOptions) *runtime.Pager[CloudEndpointsClientListBySyncGroupResponse]

NewListBySyncGroupPager - Get a CloudEndpoint List.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • options - CloudEndpointsClientListBySyncGroupOptions contains the optional parameters for the CloudEndpointsClient.NewListBySyncGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_ListBySyncGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCloudEndpointsClient().NewListBySyncGroupPager("SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", 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.CloudEndpointArray = armstoragesync.CloudEndpointArray{
		// 	Value: []*armstoragesync.CloudEndpoint{
		// 		{
		// 			Name: to.Ptr("CEP_Restore_08-08_Test112"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/cloudEndpoints"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SyncGroup_Restore_08-08_Test112/cloudEndpoints/CEP_Restore_08-08_Test112"),
		// 			Properties: &armstoragesync.CloudEndpointProperties{
		// 				AzureFileShareName: to.Ptr(""),
		// 				ChangeEnumerationStatus: &armstoragesync.CloudEndpointChangeEnumerationStatus{
		// 					Activity: &armstoragesync.CloudEndpointChangeEnumerationActivity{
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 						MinutesRemaining: to.Ptr[int32](589),
		// 						OperationState: to.Ptr(armstoragesync.CloudEndpointChangeEnumerationActivityState("Delayed")),
		// 						ProcessedDirectoriesCount: to.Ptr[int64](364),
		// 						ProcessedFilesCount: to.Ptr[int64](6948),
		// 						ProgressPercent: to.Ptr[int32](67),
		// 						StartedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 						StatusCode: to.Ptr[int32](-1),
		// 						TotalCountsState: to.Ptr(armstoragesync.CloudEndpointChangeEnumerationTotalCountsStateCalculating),
		// 						TotalDirectoriesCount: to.Ptr[int64](694),
		// 						TotalFilesCount: to.Ptr[int64](12834),
		// 						TotalSizeBytes: to.Ptr[int64](5782301239408),
		// 					},
		// 					LastEnumerationStatus: &armstoragesync.CloudEndpointLastChangeEnumerationStatus{
		// 						CompletedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 						NamespaceDirectoriesCount: to.Ptr[int64](28),
		// 						NamespaceFilesCount: to.Ptr[int64](3489),
		// 						NamespaceSizeBytes: to.Ptr[int64](3248804),
		// 						NextRunTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 						StartedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 					},
		// 					LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:14:59.096Z"); return t}()),
		// 				},
		// 				FriendlyName: to.Ptr("SampleAzureFileShareName_1"),
		// 				LastOperationName: to.Ptr("ICreateCloudEndpointWorkflow"),
		// 				LastWorkflowID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/workflows/a377fdd5-949a-40ab-9629-06cd0e9852f9"),
		// 				PartnershipID: to.Ptr("1|U0VSVkVSQVNTWU5DQ0xJRU5Udfsdfdsfs8MTkxNjYwQ0QtNkExQS00RjhDLTk3ODctQTZCRUQyMDZBMUREfEdFTkVSSUN8M0EwNDgyODMtMzM4Ri00MDAyLUE5REQtQTUwRkRBRENCMzky"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				StorageAccountResourceID: to.Ptr(""),
		// 				StorageAccountTenantID: to.Ptr("\"a4d1b191-c1af-4cef-a14b-f670e0beea52\""),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*CloudEndpointsClient) Restoreheartbeat

func (client *CloudEndpointsClient) Restoreheartbeat(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, options *CloudEndpointsClientRestoreheartbeatOptions) (CloudEndpointsClientRestoreheartbeatResponse, error)

Restoreheartbeat - Restore Heartbeat a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • cloudEndpointName - Name of Cloud Endpoint object.
  • options - CloudEndpointsClientRestoreheartbeatOptions contains the optional parameters for the CloudEndpointsClient.Restoreheartbeat method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_RestoreHeatbeat.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewCloudEndpointsClient().Restoreheartbeat(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleCloudEndpoint_1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type CloudEndpointsClientBeginCreateOptions added in v0.2.0

type CloudEndpointsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginCreateOptions contains the optional parameters for the CloudEndpointsClient.BeginCreate method.

type CloudEndpointsClientBeginDeleteOptions added in v0.2.0

type CloudEndpointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginDeleteOptions contains the optional parameters for the CloudEndpointsClient.BeginDelete method.

type CloudEndpointsClientBeginPostBackupOptions added in v0.2.0

type CloudEndpointsClientBeginPostBackupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginPostBackupOptions contains the optional parameters for the CloudEndpointsClient.BeginPostBackup method.

type CloudEndpointsClientBeginPostRestoreOptions added in v0.2.0

type CloudEndpointsClientBeginPostRestoreOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginPostRestoreOptions contains the optional parameters for the CloudEndpointsClient.BeginPostRestore method.

type CloudEndpointsClientBeginPreBackupOptions added in v0.2.0

type CloudEndpointsClientBeginPreBackupOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginPreBackupOptions contains the optional parameters for the CloudEndpointsClient.BeginPreBackup method.

type CloudEndpointsClientBeginPreRestoreOptions added in v0.2.0

type CloudEndpointsClientBeginPreRestoreOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginPreRestoreOptions contains the optional parameters for the CloudEndpointsClient.BeginPreRestore method.

type CloudEndpointsClientBeginTriggerChangeDetectionOptions added in v0.2.0

type CloudEndpointsClientBeginTriggerChangeDetectionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CloudEndpointsClientBeginTriggerChangeDetectionOptions contains the optional parameters for the CloudEndpointsClient.BeginTriggerChangeDetection method.

type CloudEndpointsClientCreateResponse added in v0.2.0

type CloudEndpointsClientCreateResponse struct {
	// Cloud Endpoint object.
	CloudEndpoint
}

CloudEndpointsClientCreateResponse contains the response from method CloudEndpointsClient.BeginCreate.

type CloudEndpointsClientDeleteResponse added in v0.2.0

type CloudEndpointsClientDeleteResponse struct {
}

CloudEndpointsClientDeleteResponse contains the response from method CloudEndpointsClient.BeginDelete.

type CloudEndpointsClientGetOptions added in v0.2.0

type CloudEndpointsClientGetOptions struct {
}

CloudEndpointsClientGetOptions contains the optional parameters for the CloudEndpointsClient.Get method.

type CloudEndpointsClientGetResponse added in v0.2.0

type CloudEndpointsClientGetResponse struct {
	// Cloud Endpoint object.
	CloudEndpoint

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

CloudEndpointsClientGetResponse contains the response from method CloudEndpointsClient.Get.

type CloudEndpointsClientListBySyncGroupOptions added in v0.2.0

type CloudEndpointsClientListBySyncGroupOptions struct {
}

CloudEndpointsClientListBySyncGroupOptions contains the optional parameters for the CloudEndpointsClient.NewListBySyncGroupPager method.

type CloudEndpointsClientListBySyncGroupResponse added in v0.2.0

type CloudEndpointsClientListBySyncGroupResponse struct {
	// Array of CloudEndpoint
	CloudEndpointArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

CloudEndpointsClientListBySyncGroupResponse contains the response from method CloudEndpointsClient.NewListBySyncGroupPager.

type CloudEndpointsClientPostBackupResponse added in v0.2.0

type CloudEndpointsClientPostBackupResponse struct {
	// Post Backup Response
	PostBackupResponse
}

CloudEndpointsClientPostBackupResponse contains the response from method CloudEndpointsClient.BeginPostBackup.

type CloudEndpointsClientPostRestoreResponse added in v0.2.0

type CloudEndpointsClientPostRestoreResponse struct {
}

CloudEndpointsClientPostRestoreResponse contains the response from method CloudEndpointsClient.BeginPostRestore.

type CloudEndpointsClientPreBackupResponse added in v0.2.0

type CloudEndpointsClientPreBackupResponse struct {
}

CloudEndpointsClientPreBackupResponse contains the response from method CloudEndpointsClient.BeginPreBackup.

type CloudEndpointsClientPreRestoreResponse added in v0.2.0

type CloudEndpointsClientPreRestoreResponse struct {
}

CloudEndpointsClientPreRestoreResponse contains the response from method CloudEndpointsClient.BeginPreRestore.

type CloudEndpointsClientRestoreheartbeatOptions added in v0.2.0

type CloudEndpointsClientRestoreheartbeatOptions struct {
}

CloudEndpointsClientRestoreheartbeatOptions contains the optional parameters for the CloudEndpointsClient.Restoreheartbeat method.

type CloudEndpointsClientRestoreheartbeatResponse added in v0.2.0

type CloudEndpointsClientRestoreheartbeatResponse struct {
	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

CloudEndpointsClientRestoreheartbeatResponse contains the response from method CloudEndpointsClient.Restoreheartbeat.

type CloudEndpointsClientTriggerChangeDetectionResponse added in v0.2.0

type CloudEndpointsClientTriggerChangeDetectionResponse struct {
}

CloudEndpointsClientTriggerChangeDetectionResponse contains the response from method CloudEndpointsClient.BeginTriggerChangeDetection.

type CloudTieringCachePerformance

type CloudTieringCachePerformance struct {
	// READ-ONLY; Count of bytes that were served from the local server
	CacheHitBytes *int64

	// READ-ONLY; Percentage of total bytes (hit + miss) that were served from the local server
	CacheHitBytesPercent *int32

	// READ-ONLY; Count of bytes that were served from the cloud
	CacheMissBytes *int64

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time
}

CloudTieringCachePerformance - Server endpoint cloud tiering status object.

func (CloudTieringCachePerformance) MarshalJSON

func (c CloudTieringCachePerformance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudTieringCachePerformance.

func (*CloudTieringCachePerformance) UnmarshalJSON

func (c *CloudTieringCachePerformance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudTieringCachePerformance.

type CloudTieringDatePolicyStatus

type CloudTieringDatePolicyStatus struct {
	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Most recent access time of tiered files
	TieredFilesMostRecentAccessTimestamp *time.Time
}

CloudTieringDatePolicyStatus - Status of the date policy

func (CloudTieringDatePolicyStatus) MarshalJSON

func (c CloudTieringDatePolicyStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudTieringDatePolicyStatus.

func (*CloudTieringDatePolicyStatus) UnmarshalJSON

func (c *CloudTieringDatePolicyStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudTieringDatePolicyStatus.

type CloudTieringFilesNotTiering

type CloudTieringFilesNotTiering struct {
	// READ-ONLY; Array of tiering errors
	Errors []*FilesNotTieringError

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Last cloud tiering result (HResult)
	TotalFileCount *int64
}

CloudTieringFilesNotTiering - Server endpoint cloud tiering status object.

func (CloudTieringFilesNotTiering) MarshalJSON

func (c CloudTieringFilesNotTiering) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudTieringFilesNotTiering.

func (*CloudTieringFilesNotTiering) UnmarshalJSON

func (c *CloudTieringFilesNotTiering) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudTieringFilesNotTiering.

type CloudTieringSpaceSavings

type CloudTieringSpaceSavings struct {
	// READ-ONLY; Cached content size on the server
	CachedSizeBytes *int64

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Count of bytes saved on the server
	SpaceSavingsBytes *int64

	// READ-ONLY; Percentage of cached size over total size
	SpaceSavingsPercent *int32

	// READ-ONLY; Total size of content in the azure file share
	TotalSizeCloudBytes *int64

	// READ-ONLY; Volume size
	VolumeSizeBytes *int64
}

CloudTieringSpaceSavings - Server endpoint cloud tiering status object.

func (CloudTieringSpaceSavings) MarshalJSON

func (c CloudTieringSpaceSavings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudTieringSpaceSavings.

func (*CloudTieringSpaceSavings) UnmarshalJSON

func (c *CloudTieringSpaceSavings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudTieringSpaceSavings.

type CloudTieringVolumeFreeSpacePolicyStatus

type CloudTieringVolumeFreeSpacePolicyStatus struct {
	// READ-ONLY; Current volume free space percentage.
	CurrentVolumeFreeSpacePercent *int32

	// READ-ONLY; In the case where multiple server endpoints are present in a volume, an effective free space policy is applied.
	EffectiveVolumeFreeSpacePolicy *int32

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time
}

CloudTieringVolumeFreeSpacePolicyStatus - Status of the volume free space policy

func (CloudTieringVolumeFreeSpacePolicyStatus) MarshalJSON

func (c CloudTieringVolumeFreeSpacePolicyStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudTieringVolumeFreeSpacePolicyStatus.

func (*CloudTieringVolumeFreeSpacePolicyStatus) UnmarshalJSON

func (c *CloudTieringVolumeFreeSpacePolicyStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudTieringVolumeFreeSpacePolicyStatus.

type CreatedByType added in v0.3.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v0.3.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Error added in v0.2.0

type Error struct {
	// Error details of the given entry.
	Error *APIError

	// Error details of the given entry.
	Innererror *APIError
}

Error type

func (Error) MarshalJSON added in v1.1.0

func (e Error) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON added in v1.1.0

func (e *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type ErrorDetails added in v0.2.0

type ErrorDetails struct {
	// Error code of the given entry.
	Code *string

	// Exception type of the given entry.
	ExceptionType *string

	// HTTP error code of the given entry.
	HTTPErrorCode *string

	// HTTP method of the given entry.
	HTTPMethod *string

	// Hashed message of the given entry.
	HashedMessage *string

	// Error message of the given entry.
	Message *string

	// Request URI of the given entry.
	RequestURI *string

	// Target of the given entry.
	Target *string
}

ErrorDetails - Error Details object.

func (ErrorDetails) MarshalJSON added in v1.1.0

func (e ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetails.

func (*ErrorDetails) UnmarshalJSON added in v1.1.0

func (e *ErrorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails.

type FeatureStatus

type FeatureStatus string

FeatureStatus - Type of the Feature Status

const (
	FeatureStatusOff FeatureStatus = "off"
	FeatureStatusOn  FeatureStatus = "on"
)

func PossibleFeatureStatusValues

func PossibleFeatureStatusValues() []FeatureStatus

PossibleFeatureStatusValues returns the possible values for the FeatureStatus const type.

type FilesNotTieringError

type FilesNotTieringError struct {
	// READ-ONLY; Error code (HResult)
	ErrorCode *int32

	// READ-ONLY; Count of files with this error
	FileCount *int64
}

FilesNotTieringError - Files not tiering error object

func (FilesNotTieringError) MarshalJSON added in v1.1.0

func (f FilesNotTieringError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilesNotTieringError.

func (*FilesNotTieringError) UnmarshalJSON added in v1.1.0

func (f *FilesNotTieringError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilesNotTieringError.

type IncomingTrafficPolicy

type IncomingTrafficPolicy string

IncomingTrafficPolicy - Type of the Incoming Traffic Policy

const (
	IncomingTrafficPolicyAllowAllTraffic          IncomingTrafficPolicy = "AllowAllTraffic"
	IncomingTrafficPolicyAllowVirtualNetworksOnly IncomingTrafficPolicy = "AllowVirtualNetworksOnly"
)

func PossibleIncomingTrafficPolicyValues

func PossibleIncomingTrafficPolicyValues() []IncomingTrafficPolicy

PossibleIncomingTrafficPolicyValues returns the possible values for the IncomingTrafficPolicy const type.

type InitialDownloadPolicy

type InitialDownloadPolicy string

InitialDownloadPolicy - Policy for how namespace and files are recalled during FastDr

const (
	InitialDownloadPolicyAvoidTieredFiles           InitialDownloadPolicy = "AvoidTieredFiles"
	InitialDownloadPolicyNamespaceOnly              InitialDownloadPolicy = "NamespaceOnly"
	InitialDownloadPolicyNamespaceThenModifiedFiles InitialDownloadPolicy = "NamespaceThenModifiedFiles"
)

func PossibleInitialDownloadPolicyValues

func PossibleInitialDownloadPolicyValues() []InitialDownloadPolicy

PossibleInitialDownloadPolicyValues returns the possible values for the InitialDownloadPolicy const type.

type InitialUploadPolicy

type InitialUploadPolicy string

InitialUploadPolicy - Policy for how the initial upload sync session is performed.

const (
	InitialUploadPolicyMerge               InitialUploadPolicy = "Merge"
	InitialUploadPolicyServerAuthoritative InitialUploadPolicy = "ServerAuthoritative"
)

func PossibleInitialUploadPolicyValues

func PossibleInitialUploadPolicyValues() []InitialUploadPolicy

PossibleInitialUploadPolicyValues returns the possible values for the InitialUploadPolicy const type.

type InnerErrorDetails added in v0.2.0

type InnerErrorDetails struct {
	// Call stack of the error.
	CallStack *string

	// Exception of the inner error.
	InnerException *string

	// Call stack of the inner error.
	InnerExceptionCallStack *string

	// Error message of the error.
	Message *string
}

InnerErrorDetails - Error Details object.

func (InnerErrorDetails) MarshalJSON added in v1.1.0

func (i InnerErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InnerErrorDetails.

func (*InnerErrorDetails) UnmarshalJSON added in v1.1.0

func (i *InnerErrorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InnerErrorDetails.

type LocalCacheMode

type LocalCacheMode string

LocalCacheMode - Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access.

const (
	LocalCacheModeDownloadNewAndModifiedFiles LocalCacheMode = "DownloadNewAndModifiedFiles"
	LocalCacheModeUpdateLocallyCachedFiles    LocalCacheMode = "UpdateLocallyCachedFiles"
)

func PossibleLocalCacheModeValues

func PossibleLocalCacheModeValues() []LocalCacheMode

PossibleLocalCacheModeValues returns the possible values for the LocalCacheMode const type.

type LocationOperationStatus

type LocationOperationStatus struct {
	// READ-ONLY; End time of the operation
	EndTime *time.Time

	// READ-ONLY; Error details.
	Error *APIError

	// READ-ONLY; Operation resource Id
	ID *string

	// READ-ONLY; Operation Id
	Name *string

	// READ-ONLY; Percent complete.
	PercentComplete *int32

	// READ-ONLY; Start time of the operation
	StartTime *time.Time

	// READ-ONLY; Operation status
	Status *string
}

LocationOperationStatus - Operation status object

func (LocationOperationStatus) MarshalJSON

func (l LocationOperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LocationOperationStatus.

func (*LocationOperationStatus) UnmarshalJSON

func (l *LocationOperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LocationOperationStatus.

type MicrosoftStorageSyncClient

type MicrosoftStorageSyncClient struct {
	// contains filtered or unexported fields
}

MicrosoftStorageSyncClient contains the methods for the MicrosoftStorageSync group. Don't use this type directly, use NewMicrosoftStorageSyncClient() instead.

func NewMicrosoftStorageSyncClient

func NewMicrosoftStorageSyncClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MicrosoftStorageSyncClient, error)

NewMicrosoftStorageSyncClient creates a new instance of MicrosoftStorageSyncClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MicrosoftStorageSyncClient) LocationOperationStatus

LocationOperationStatus - Get Operation status If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • locationName - The desired region to obtain information from.
  • operationID - operation Id
  • options - MicrosoftStorageSyncClientLocationOperationStatusOptions contains the optional parameters for the MicrosoftStorageSyncClient.LocationOperationStatus method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/LocationOperationStatus_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMicrosoftStorageSyncClient().LocationOperationStatus(ctx, "westus", "eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui=", 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.LocationOperationStatus = armstoragesync.LocationOperationStatus{
	// 	Name: to.Ptr("eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui="),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-14T19:59:30.805Z"); return t}()),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/providers/microsoft.storagesync/locations/westus/operations/eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui="),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-14T19:59:24.624Z"); return t}()),
	// 	Status: to.Ptr("Succeeded"),
	// }
}
Output:

type MicrosoftStorageSyncClientLocationOperationStatusOptions added in v0.2.0

type MicrosoftStorageSyncClientLocationOperationStatusOptions struct {
}

MicrosoftStorageSyncClientLocationOperationStatusOptions contains the optional parameters for the MicrosoftStorageSyncClient.LocationOperationStatus method.

type MicrosoftStorageSyncClientLocationOperationStatusResponse added in v0.2.0

type MicrosoftStorageSyncClientLocationOperationStatusResponse struct {
	// Operation status object
	LocationOperationStatus

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

MicrosoftStorageSyncClientLocationOperationStatusResponse contains the response from method MicrosoftStorageSyncClient.LocationOperationStatus.

type NameAvailabilityReason

type NameAvailabilityReason string

NameAvailabilityReason - Gets the reason that a Storage Sync Service name could not be used. The Reason element is only returned if NameAvailable is false.

const (
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
	NameAvailabilityReasonInvalid       NameAvailabilityReason = "Invalid"
)

func PossibleNameAvailabilityReasonValues

func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason

PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type.

type OperationDirection

type OperationDirection string

OperationDirection - Type of the Operation Direction

const (
	OperationDirectionCancel OperationDirection = "cancel"
	OperationDirectionDo     OperationDirection = "do"
	OperationDirectionUndo   OperationDirection = "undo"
)

func PossibleOperationDirectionValues

func PossibleOperationDirectionValues() []OperationDirection

PossibleOperationDirectionValues returns the possible values for the OperationDirection const type.

type OperationDisplayInfo

type OperationDisplayInfo struct {
	// The description of the operation.
	Description *string

	// The action that users can perform, based on their permission level.
	Operation *string

	// Service provider: Microsoft StorageSync.
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

OperationDisplayInfo - The operation supported by storage sync.

func (OperationDisplayInfo) MarshalJSON added in v1.1.0

func (o OperationDisplayInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplayInfo.

func (*OperationDisplayInfo) UnmarshalJSON added in v1.1.0

func (o *OperationDisplayInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayInfo.

type OperationDisplayResource

type OperationDisplayResource struct {
	// Operation Display Resource Description.
	Description *string

	// Operation Display Resource Operation.
	Operation *string

	// Operation Display Resource Provider.
	Provider *string

	// Operation Display Resource.
	Resource *string
}

OperationDisplayResource - Operation Display Resource object.

func (OperationDisplayResource) MarshalJSON added in v1.1.0

func (o OperationDisplayResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplayResource.

func (*OperationDisplayResource) UnmarshalJSON added in v1.1.0

func (o *OperationDisplayResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayResource.

type OperationEntity

type OperationEntity struct {
	// The operation supported by storage sync.
	Display *OperationDisplayInfo

	// Operation name: {provider}/{resource}/{operation}.
	Name *string

	// The origin.
	Origin *string

	// Properties of the operations resource.
	Properties *OperationProperties
}

OperationEntity - The operation supported by storage sync.

func (OperationEntity) MarshalJSON added in v1.1.0

func (o OperationEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationEntity.

func (*OperationEntity) UnmarshalJSON added in v1.1.0

func (o *OperationEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntity.

type OperationEntityListResult

type OperationEntityListResult struct {
	// The link used to get the next page of operations.
	NextLink *string

	// The list of operations.
	Value []*OperationEntity
}

OperationEntityListResult - The list of storage sync operations.

func (OperationEntityListResult) MarshalJSON

func (o OperationEntityListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationEntityListResult.

func (*OperationEntityListResult) UnmarshalJSON added in v1.1.0

func (o *OperationEntityListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityListResult.

type OperationProperties

type OperationProperties struct {
	// Service specification for the operations resource.
	ServiceSpecification *OperationResourceServiceSpecification
}

OperationProperties - Properties of the operations resource.

func (OperationProperties) MarshalJSON added in v1.1.0

func (o OperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

func (o *OperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

type OperationResourceMetricSpecification

type OperationResourceMetricSpecification struct {
	// Aggregation type for the metric.
	AggregationType *string

	// Dimensions for the metric specification.
	Dimensions []*OperationResourceMetricSpecificationDimension

	// Display description for the metric.
	DisplayDescription *string

	// Display name for the metric.
	DisplayName *string

	// Fill gaps in the metric with zero.
	FillGapWithZero *bool

	// Name of the metric.
	Name *string

	// Supported aggregation types for the metric.
	SupportedAggregationTypes []*string

	// Unit for the metric.
	Unit *string
}

OperationResourceMetricSpecification - Operation Display Resource object.

func (OperationResourceMetricSpecification) MarshalJSON

func (o OperationResourceMetricSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationResourceMetricSpecification.

func (*OperationResourceMetricSpecification) UnmarshalJSON added in v1.1.0

func (o *OperationResourceMetricSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResourceMetricSpecification.

type OperationResourceMetricSpecificationDimension

type OperationResourceMetricSpecificationDimension struct {
	// Display name of the dimensions.
	DisplayName *string

	// Name of the dimension.
	Name *string

	// Indicates metric should be exported for Shoebox.
	ToBeExportedForShoebox *bool
}

OperationResourceMetricSpecificationDimension object.

func (OperationResourceMetricSpecificationDimension) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type OperationResourceMetricSpecificationDimension.

func (*OperationResourceMetricSpecificationDimension) UnmarshalJSON added in v1.1.0

func (o *OperationResourceMetricSpecificationDimension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResourceMetricSpecificationDimension.

type OperationResourceServiceSpecification

type OperationResourceServiceSpecification struct {
	// List of metric specifications.
	MetricSpecifications []*OperationResourceMetricSpecification
}

OperationResourceServiceSpecification - Service specification.

func (OperationResourceServiceSpecification) MarshalJSON

func (o OperationResourceServiceSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationResourceServiceSpecification.

func (*OperationResourceServiceSpecification) UnmarshalJSON added in v1.1.0

func (o *OperationResourceServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResourceServiceSpecification.

type OperationStatus

type OperationStatus struct {
	// READ-ONLY; End time of the operation
	EndTime *time.Time

	// READ-ONLY; Error details.
	Error *APIError

	// READ-ONLY; Operation Id
	Name *string

	// READ-ONLY; Start time of the operation
	StartTime *time.Time

	// READ-ONLY; Operation status
	Status *string
}

OperationStatus - Operation status object

func (OperationStatus) MarshalJSON

func (o OperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationStatus.

func (*OperationStatus) UnmarshalJSON

func (o *OperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus.

type OperationStatusClient

type OperationStatusClient struct {
	// contains filtered or unexported fields
}

OperationStatusClient contains the methods for the OperationStatus group. Don't use this type directly, use NewOperationStatusClient() instead.

func NewOperationStatusClient

func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusClient, error)

NewOperationStatusClient creates a new instance of OperationStatusClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationStatusClient) Get

func (client *OperationStatusClient) Get(ctx context.Context, resourceGroupName string, locationName string, workflowID string, operationID string, options *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error)

Get - Get Operation status If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • locationName - The desired region to obtain information from.
  • workflowID - workflow Id
  • operationID - operation Id
  • options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/OperationStatus_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperationStatusClient().Get(ctx, "SampleResourceGroup_1", "westus", "828219ea-083e-48b5-89ea-8fd9991b2e75", "14b50e24-f68d-4b29-a882-38be9dfb8bd1", 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.OperationStatus = armstoragesync.OperationStatus{
	// 	Name: to.Ptr("14b50e24-f68d-4b29-a882-38be9dfb8bd1"),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-09T23:53:23.373Z"); return t}()),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-09T23:53:21.732Z"); return t}()),
	// 	Status: to.Ptr("Succeeded"),
	// }
}
Output:

type OperationStatusClientGetOptions added in v0.2.0

type OperationStatusClientGetOptions struct {
}

OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method.

type OperationStatusClientGetResponse added in v0.2.0

type OperationStatusClientGetResponse struct {
	// Operation status object
	OperationStatus

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

OperationStatusClientGetResponse contains the response from method OperationStatusClient.Get.

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

NewListPager - Lists all of the available Storage Sync Rest API operations.

Generated from API version 2020-09-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/Operations_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationEntityListResult = armstoragesync.OperationEntityListResult{
		// 	Value: []*armstoragesync.OperationEntity{
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/register/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Registers the subscription for the Storage Sync Provider"),
		// 				Operation: to.Ptr("Registers the Storage Sync Provider"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Provider"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/unregister/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Unregisters the subscription for the Storage Sync Provider"),
		// 				Operation: to.Ptr("Unregisters the Storage Sync Provider"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Provider"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/operations/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets a list of the Supported Operations"),
		// 				Operation: to.Ptr("Gets the Supported Operations"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Supported Operations"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Storage Sync Services"),
		// 				Operation: to.Ptr("Read Storage Sync Services"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Services"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Storage Sync Services"),
		// 				Operation: to.Ptr("Create or Update Storage Sync Services"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Services"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Storage Sync Services"),
		// 				Operation: to.Ptr("Delete Storage Sync Services"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Services"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the available metrics for Storage Sync Services"),
		// 				Operation: to.Ptr("Read Storage Sync Services metric definitions"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Storage Sync Metrics"),
		// 			},
		// 			Origin: to.Ptr("System"),
		// 			Properties: &armstoragesync.OperationProperties{
		// 				ServiceSpecification: &armstoragesync.OperationResourceServiceSpecification{
		// 					MetricSpecifications: []*armstoragesync.OperationResourceMetricSpecification{
		// 						{
		// 							Name: to.Ptr("ServerSyncSessionResult"),
		// 							AggregationType: to.Ptr("Average"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Metric that logs a value of 1 each time the Server Endpoint successfully completes a Sync Session with the Cloud Endpoint"),
		// 							DisplayName: to.Ptr("Sync Session Result"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncSyncSessionAppliedFilesCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of Files synced"),
		// 							DisplayName: to.Ptr("Files Synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncSyncSessionPerItemErrorsCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of files failed to sync"),
		// 							DisplayName: to.Ptr("Files not syncing"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncBatchTransferredFileBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Total file size transferred for Sync Sessions"),
		// 							DisplayName: to.Ptr("Bytes synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncServerHeartbeat"),
		// 							AggregationType: to.Ptr("Maximum"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Metric that logs a value of 1 each time the resigtered server successfully records a heartbeat with the Cloud Endpoint"),
		// 							DisplayName: to.Ptr("Server Online Status"),
		// 							FillGapWithZero: to.Ptr(true),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncRecallIOTotalSizeBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Total size of data recalled by the server"),
		// 							DisplayName: to.Ptr("Cloud tiering recall"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncRecalledTotalNetworkBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Size of data recalled"),
		// 							DisplayName: to.Ptr("Cloud tiering recall size"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncRecallThroughputBytesPerSecond"),
		// 							AggregationType: to.Ptr("Average"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Size of data recall throughput"),
		// 							DisplayName: to.Ptr("Cloud tiering recall throughput"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("BytesPerSecond"),
		// 						},
		// 						{
		// 							Name: to.Ptr("StorageSyncRecalledNetworkBytesByApplication"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ApplicationName"),
		// 									DisplayName: to.Ptr("Application Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Size of data recalled by application"),
		// 							DisplayName: to.Ptr("Cloud tiering recall size by application"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 					}},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateLinkResources/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Private Link Resources"),
		// 				Operation: to.Ptr("Read Private Link Resources"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Link Resources"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnections/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Private Endpoint Connections"),
		// 				Operation: to.Ptr("Read Private Endpoint Connections"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint Connections"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnections/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Private Endpoint Connections"),
		// 				Operation: to.Ptr("Create or Update Private Endpoint Connections"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint Connections"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnections/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Private Endpoint Connections"),
		// 				Operation: to.Ptr("Delete Private Endpoint Connections"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint Connections"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnectionProxies/validate/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Validate any Private Endpoint ConnectionProxies"),
		// 				Operation: to.Ptr("Validate Private Endpoint ConnectionProxies"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint ConnectionProxies"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnectionProxies/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Private Endpoint ConnectionProxies"),
		// 				Operation: to.Ptr("Read Private Endpoint ConnectionProxies"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint ConnectionProxies"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnectionProxies/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Private Endpoint ConnectionProxies"),
		// 				Operation: to.Ptr("Create or Update Private Endpoint ConnectionProxies"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint ConnectionProxies"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/privateEndpointConnectionProxies/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Private Endpoint ConnectionProxies"),
		// 				Operation: to.Ptr("Delete Private Endpoint ConnectionProxies"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Private Endpoint ConnectionProxies"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Sync Groups"),
		// 				Operation: to.Ptr("Read Sync Groups"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Sync Groups"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Sync Groups"),
		// 				Operation: to.Ptr("Create or Update Sync Groups"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Sync Groups"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Sync Groups"),
		// 				Operation: to.Ptr("Delete Sync Groups"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Sync Groups"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the available metrics for Sync Groups"),
		// 				Operation: to.Ptr("Read Sync Groups metric definitions"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Sync Group Metrics"),
		// 			},
		// 			Origin: to.Ptr("System"),
		// 			Properties: &armstoragesync.OperationProperties{
		// 				ServiceSpecification: &armstoragesync.OperationResourceServiceSpecification{
		// 					MetricSpecifications: []*armstoragesync.OperationResourceMetricSpecification{
		// 						{
		// 							Name: to.Ptr("SyncGroupSyncSessionAppliedFilesCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of Files synced"),
		// 							DisplayName: to.Ptr("Files Synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("SyncGroupSyncSessionPerItemErrorsCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of files failed to sync"),
		// 							DisplayName: to.Ptr("Files not syncing"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("SyncGroupBatchTransferredFileBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("SyncGroupName"),
		// 									DisplayName: to.Ptr("Sync Group Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Total file size transferred for Sync Sessions"),
		// 							DisplayName: to.Ptr("Bytes synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 					}},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Cloud Endpoints"),
		// 				Operation: to.Ptr("Read Cloud Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Cloud Endpoints"),
		// 				Operation: to.Ptr("Create or Update Cloud Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Cloud Endpoints"),
		// 				Operation: to.Ptr("Delete Cloud Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/prebackup/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action before backup"),
		// 				Operation: to.Ptr("prebackup"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/postbackup/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action after backup"),
		// 				Operation: to.Ptr("postbackup"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/prerestore/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action before restore"),
		// 				Operation: to.Ptr("prerestore"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/postrestore/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action after restore"),
		// 				Operation: to.Ptr("postrestore"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/restoreheartbeat/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Restore heartbeat"),
		// 				Operation: to.Ptr("restoreheartbeat"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/operationresults/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the status of an asynchronous backup/restore operation"),
		// 				Operation: to.Ptr("Read cloudEndpoints/operationresults"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/cloudEndpoints/triggerChangeDetection/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action to trigger detection of changes on a cloud endpoint's file share"),
		// 				Operation: to.Ptr("triggerChangeDetection"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Cloud Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Server Endpoints"),
		// 				Operation: to.Ptr("Read Server Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Server Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Server Endpoints"),
		// 				Operation: to.Ptr("Create or Update Server Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Server Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Server Endpoints"),
		// 				Operation: to.Ptr("Delete Server Endpoints"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Server Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints/recallAction/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Call this action to recall files to a server"),
		// 				Operation: to.Ptr("recallAction"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Server Endpoints"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the available metrics for Server Endpoints"),
		// 				Operation: to.Ptr("Read Server Endpoints metric definitions"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Server Endpoint Metrics"),
		// 			},
		// 			Origin: to.Ptr("System"),
		// 			Properties: &armstoragesync.OperationProperties{
		// 				ServiceSpecification: &armstoragesync.OperationResourceServiceSpecification{
		// 					MetricSpecifications: []*armstoragesync.OperationResourceMetricSpecification{
		// 						{
		// 							Name: to.Ptr("ServerEndpointSyncSessionAppliedFilesCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of Files synced"),
		// 							DisplayName: to.Ptr("Files Synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("ServerEndpointSyncSessionPerItemErrorsCount"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Count of files failed to sync"),
		// 							DisplayName: to.Ptr("Files not syncing"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("ServerEndpointBatchTransferredFileBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerEndpointName"),
		// 									DisplayName: to.Ptr("Server Endpoint Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("SyncDirection"),
		// 									DisplayName: to.Ptr("Sync Direction"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Total file size transferred for Sync Sessions"),
		// 							DisplayName: to.Ptr("Bytes synced"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 					}},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/registeredServers/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read any Registered Server"),
		// 				Operation: to.Ptr("Read Registered Server"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Registered Server"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/registeredServers/write"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Create or Update any Registered Server"),
		// 				Operation: to.Ptr("Create or Update Registered Server"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Registered Server"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/registeredServers/delete"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Delete any Registered Server"),
		// 				Operation: to.Ptr("Delete Registered Server"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Registered Server"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/registeredServers/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the available metrics for Registered Server"),
		// 				Operation: to.Ptr("Read Registered Server metric definitions"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Registered Server Metrics"),
		// 			},
		// 			Origin: to.Ptr("System"),
		// 			Properties: &armstoragesync.OperationProperties{
		// 				ServiceSpecification: &armstoragesync.OperationResourceServiceSpecification{
		// 					MetricSpecifications: []*armstoragesync.OperationResourceMetricSpecification{
		// 						{
		// 							Name: to.Ptr("ServerHeartbeat"),
		// 							AggregationType: to.Ptr("Maximum"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerResourceId"),
		// 									DisplayName: to.Ptr("Registered Server Id"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Metric that logs a value of 1 each time the resigtered server successfully records a heartbeat with the Cloud Endpoint"),
		// 							DisplayName: to.Ptr("Server Online Status"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Count"),
		// 						},
		// 						{
		// 							Name: to.Ptr("ServerRecallIOTotalSizeBytes"),
		// 							AggregationType: to.Ptr("Total"),
		// 							Dimensions: []*armstoragesync.OperationResourceMetricSpecificationDimension{
		// 								{
		// 									Name: to.Ptr("ServerResourceId"),
		// 									DisplayName: to.Ptr("Registered Server Id"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 								},
		// 								{
		// 									Name: to.Ptr("ServerName"),
		// 									DisplayName: to.Ptr("Server Name"),
		// 									ToBeExportedForShoebox: to.Ptr(true),
		// 							}},
		// 							DisplayDescription: to.Ptr("Total size of data recalled by the server"),
		// 							DisplayName: to.Ptr("Cloud tiering recall"),
		// 							FillGapWithZero: to.Ptr(false),
		// 							Unit: to.Ptr("Bytes"),
		// 					}},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/workflows/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Read Workflows"),
		// 				Operation: to.Ptr("Read Workflows"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Workflow"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/workflows/operationresults/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the status of an asynchronous operation"),
		// 				Operation: to.Ptr("Read workflows/operationresults"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Workflow"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/storageSyncServices/workflows/operations/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the status of an asynchronous operation"),
		// 				Operation: to.Ptr("Read workflows/operations"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Workflow"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/locations/checkNameAvailability/action"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Checks that storage sync service name is valid and is not in use."),
		// 				Operation: to.Ptr("Check Name Availability"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Name Availability"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/locations/workflows/operations/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the status of an asynchronous operation"),
		// 				Operation: to.Ptr("Read locations/workflows/operations"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("Workflow"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/locations/operationresults/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the result for an asynchronous operation"),
		// 				Operation: to.Ptr("Read locations/operationresults"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("operationresults"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.storagesync/locations/operations/read"),
		// 			Display: &armstoragesync.OperationDisplayInfo{
		// 				Description: to.Ptr("Gets the status for an azure asynchronous operation"),
		// 				Operation: to.Ptr("Read locations/operations"),
		// 				Provider: to.Ptr("microsoft.storagesync"),
		// 				Resource: to.Ptr("operations"),
		// 			},
		// 			Origin: to.Ptr("User"),
		// 	}},
		// }
	}
}
Output:

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 {
	// The list of storage sync operations.
	OperationEntityListResult

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PostBackupResponse

type PostBackupResponse struct {
	// Post Backup Response Properties
	BackupMetadata *PostBackupResponseProperties
}

PostBackupResponse - Post Backup Response

func (PostBackupResponse) MarshalJSON added in v1.1.0

func (p PostBackupResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PostBackupResponse.

func (*PostBackupResponse) UnmarshalJSON added in v1.1.0

func (p *PostBackupResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PostBackupResponse.

type PostBackupResponseProperties

type PostBackupResponseProperties struct {
	// READ-ONLY; cloud endpoint Name.
	CloudEndpointName *string
}

PostBackupResponseProperties - Post Backup Response Properties object.

func (PostBackupResponseProperties) MarshalJSON added in v1.1.0

func (p PostBackupResponseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PostBackupResponseProperties.

func (*PostBackupResponseProperties) UnmarshalJSON added in v1.1.0

func (p *PostBackupResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PostBackupResponseProperties.

type PostRestoreRequest

type PostRestoreRequest struct {
	// Post Restore Azure file share uri.
	AzureFileShareURI *string

	// Post Restore Azure failed file list.
	FailedFileList *string

	// Post Restore partition.
	Partition *string

	// Post Restore replica group.
	ReplicaGroup *string

	// Post Restore request id.
	RequestID *string

	// Post Restore restore file spec array.
	RestoreFileSpec []*RestoreFileSpec

	// Post Restore Azure source azure file share uri.
	SourceAzureFileShareURI *string

	// Post Restore Azure status.
	Status *string
}

PostRestoreRequest - Post Restore Request

func (PostRestoreRequest) MarshalJSON

func (p PostRestoreRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PostRestoreRequest.

func (*PostRestoreRequest) UnmarshalJSON added in v1.1.0

func (p *PostRestoreRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PostRestoreRequest.

type PreRestoreRequest

type PreRestoreRequest struct {
	// Pre Restore Azure file share uri.
	AzureFileShareURI *string

	// Pre Restore backup metadata property bag.
	BackupMetadataPropertyBag *string

	// Pre Restore partition.
	Partition *string

	// Pre Restore pause wait for sync drain time period in seconds.
	PauseWaitForSyncDrainTimePeriodInSeconds *int32

	// Pre Restore replica group.
	ReplicaGroup *string

	// Pre Restore request id.
	RequestID *string

	// Pre Restore restore file spec array.
	RestoreFileSpec []*RestoreFileSpec

	// Pre Restore Azure source azure file share uri.
	SourceAzureFileShareURI *string

	// Pre Restore Azure status.
	Status *string
}

PreRestoreRequest - Pre Restore request object.

func (PreRestoreRequest) MarshalJSON

func (p PreRestoreRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreRestoreRequest.

func (*PreRestoreRequest) UnmarshalJSON added in v1.1.0

func (p *PreRestoreRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreRestoreRequest.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.1.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginCreate

func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateResponse], error)

BeginCreate - Update the state of specified private endpoint connection associated with the storage sync service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - The name of the storage sync service name within the specified resource group.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • properties - The private endpoint connection properties.
  • options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreate(ctx, "res7687", "sss2527", "{privateEndpointConnectionName}", armstoragesync.PrivateEndpointConnection{
		Properties: &armstoragesync.PrivateEndpointConnectionProperties{
			PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
				Description: to.Ptr("Auto-Approved"),
				Status:      to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armstoragesync.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.StorageSync/storageSyncServices/sss2527/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	Properties: &armstoragesync.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armstoragesync.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armstoragesync.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes the specified private endpoint connection associated with the storage sync service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - The name of the storage sync service name within the specified resource group.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "res6977", "sss2527", "{privateEndpointConnectionName}", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets the specified private endpoint connection associated with the storage sync service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - The name of the storage sync service name within the specified resource group.
  • privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "res6977", "sss2527", "{privateEndpointConnectionName}", 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.PrivateEndpointConnection = armstoragesync.PrivateEndpointConnection{
	// 	Name: to.Ptr("{privateEndpointConnectionName}"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.StorageSync/storageSyncServices/sss2527/privateEndpointConnections/{privateEndpointConnectionName}"),
	// 	Properties: &armstoragesync.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armstoragesync.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armstoragesync.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) NewListByStorageSyncServicePager added in v0.4.0

NewListByStorageSyncServicePager - Get a PrivateEndpointConnection List.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - PrivateEndpointConnectionsClientListByStorageSyncServiceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByStorageSyncServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_ListByStorageSyncService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByStorageSyncServicePager("res6977", "sss2527", 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.PrivateEndpointConnectionListResult = armstoragesync.PrivateEndpointConnectionListResult{
		// 	Value: []*armstoragesync.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("{privateEndpointConnectionName}"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.StorageSync/storageSyncServices/sss2527/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 			Properties: &armstoragesync.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armstoragesync.PrivateEndpoint{
		// 					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
		// 					Description: to.Ptr("Auto-Approved"),
		// 					Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved),
		// 				},
		// 				ProvisioningState: to.Ptr(armstoragesync.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("{privateEndpointConnectionName}"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.StorageSync/storageSyncServices/sss2527/privateEndpointConnections/{privateEndpointConnectionName}"),
		// 			Properties: &armstoragesync.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armstoragesync.PrivateEndpoint{
		// 					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
		// 					Description: to.Ptr("Auto-Approved"),
		// 					Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved),
		// 				},
		// 				ProvisioningState: to.Ptr(armstoragesync.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateResponse added in v0.2.0

type PrivateEndpointConnectionsClientCreateResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.2.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.2.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListByStorageSyncServiceOptions added in v0.2.0

type PrivateEndpointConnectionsClientListByStorageSyncServiceOptions struct {
}

PrivateEndpointConnectionsClientListByStorageSyncServiceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByStorageSyncServicePager method.

type PrivateEndpointConnectionsClientListByStorageSyncServiceResponse added in v0.2.0

type PrivateEndpointConnectionsClientListByStorageSyncServiceResponse struct {
	// List of private endpoint connection associated with the specified storage account
	PrivateEndpointConnectionListResult

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

PrivateEndpointConnectionsClientListByStorageSyncServiceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByStorageSyncServicePager.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) ListByStorageSyncService

ListByStorageSyncService - Gets the private link resources that need to be created for a storage sync service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - The name of the storage sync service name within the specified resource group.
  • options - PrivateLinkResourcesClientListByStorageSyncServiceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageSyncService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateLinkResources_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().ListByStorageSyncService(ctx, "res6977", "sss2527", 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.PrivateLinkResourceListResult = armstoragesync.PrivateLinkResourceListResult{
	// 	Value: []*armstoragesync.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("afs"),
	// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/privateLinkResources"),
	// 			ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.StorageSync/storageSyncServices/sss2527/privateLinkResources/afs"),
	// 			Properties: &armstoragesync.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("afs"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("management"),
	// 					to.Ptr("sync.primary"),
	// 					to.Ptr("sync.secondary")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.afs.azure.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientListByStorageSyncServiceOptions added in v0.2.0

type PrivateLinkResourcesClientListByStorageSyncServiceOptions struct {
}

PrivateLinkResourcesClientListByStorageSyncServiceOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageSyncService method.

type PrivateLinkResourcesClientListByStorageSyncServiceResponse added in v0.2.0

type PrivateLinkResourcesClientListByStorageSyncServiceResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListByStorageSyncServiceResponse contains the response from method PrivateLinkResourcesClient.ListByStorageSyncService.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.1.0

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProgressType

type ProgressType string

ProgressType - Type of the ProgressType

const (
	ProgressTypeDownload   ProgressType = "download"
	ProgressTypeInitialize ProgressType = "initialize"
	ProgressTypeNone       ProgressType = "none"
	ProgressTypeRecall     ProgressType = "recall"
	ProgressTypeUpload     ProgressType = "upload"
)

func PossibleProgressTypeValues

func PossibleProgressTypeValues() []ProgressType

PossibleProgressTypeValues returns the possible values for the ProgressType const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type Reason

type Reason string

Reason - State of Azure Subscription

const (
	ReasonDeleted      Reason = "Deleted"
	ReasonRegistered   Reason = "Registered"
	ReasonSuspended    Reason = "Suspended"
	ReasonUnregistered Reason = "Unregistered"
	ReasonWarned       Reason = "Warned"
)

func PossibleReasonValues

func PossibleReasonValues() []Reason

PossibleReasonValues returns the possible values for the Reason const type.

type RecallActionParameters

type RecallActionParameters struct {
	// Pattern of the files.
	Pattern *string

	// Recall path.
	RecallPath *string
}

RecallActionParameters - The parameters used when calling recall action on server endpoint.

func (RecallActionParameters) MarshalJSON added in v1.1.0

func (r RecallActionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecallActionParameters.

func (*RecallActionParameters) UnmarshalJSON added in v1.1.0

func (r *RecallActionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecallActionParameters.

type RegisteredServer

type RegisteredServer struct {
	// RegisteredServer properties.
	Properties *RegisteredServerProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

RegisteredServer - Registered Server resource.

func (RegisteredServer) MarshalJSON

func (r RegisteredServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegisteredServer.

func (*RegisteredServer) UnmarshalJSON added in v1.1.0

func (r *RegisteredServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredServer.

type RegisteredServerAgentVersionStatus

type RegisteredServerAgentVersionStatus string

RegisteredServerAgentVersionStatus - Type of the registered server agent version status

const (
	RegisteredServerAgentVersionStatusBlocked    RegisteredServerAgentVersionStatus = "Blocked"
	RegisteredServerAgentVersionStatusExpired    RegisteredServerAgentVersionStatus = "Expired"
	RegisteredServerAgentVersionStatusNearExpiry RegisteredServerAgentVersionStatus = "NearExpiry"
	RegisteredServerAgentVersionStatusOk         RegisteredServerAgentVersionStatus = "Ok"
)

func PossibleRegisteredServerAgentVersionStatusValues

func PossibleRegisteredServerAgentVersionStatusValues() []RegisteredServerAgentVersionStatus

PossibleRegisteredServerAgentVersionStatusValues returns the possible values for the RegisteredServerAgentVersionStatus const type.

type RegisteredServerArray

type RegisteredServerArray struct {
	// Collection of Registered Server.
	Value []*RegisteredServer
}

RegisteredServerArray - Array of RegisteredServer

func (RegisteredServerArray) MarshalJSON

func (r RegisteredServerArray) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegisteredServerArray.

func (*RegisteredServerArray) UnmarshalJSON added in v1.1.0

func (r *RegisteredServerArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredServerArray.

type RegisteredServerCreateParameters

type RegisteredServerCreateParameters struct {
	// The parameters used to create the registered server.
	Properties *RegisteredServerCreateParametersProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

RegisteredServerCreateParameters - The parameters used when creating a registered server.

func (RegisteredServerCreateParameters) MarshalJSON

func (r RegisteredServerCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegisteredServerCreateParameters.

func (*RegisteredServerCreateParameters) UnmarshalJSON added in v1.1.0

func (r *RegisteredServerCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredServerCreateParameters.

type RegisteredServerCreateParametersProperties

type RegisteredServerCreateParametersProperties struct {
	// Registered Server Agent Version
	AgentVersion *string

	// Registered Server clusterId
	ClusterID *string

	// Registered Server clusterName
	ClusterName *string

	// Friendly Name
	FriendlyName *string

	// Registered Server last heart beat
	LastHeartBeat *string

	// Registered Server Certificate
	ServerCertificate *string

	// Registered Server serverId
	ServerID *string

	// Registered Server OS Version
	ServerOSVersion *string

	// Registered Server serverRole
	ServerRole *string
}

RegisteredServerCreateParametersProperties - RegisteredServer Create Properties object.

func (RegisteredServerCreateParametersProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type RegisteredServerCreateParametersProperties.

func (*RegisteredServerCreateParametersProperties) UnmarshalJSON added in v1.1.0

func (r *RegisteredServerCreateParametersProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredServerCreateParametersProperties.

type RegisteredServerProperties

type RegisteredServerProperties struct {
	// Registered Server Agent Version
	AgentVersion *string

	// Registered Server clusterId
	ClusterID *string

	// Registered Server clusterName
	ClusterName *string

	// Resource discoveryEndpointUri
	DiscoveryEndpointURI *string

	// Friendly Name
	FriendlyName *string

	// Registered Server last heart beat
	LastHeartBeat *string

	// Resource Last Operation Name
	LastOperationName *string

	// Registered Server lastWorkflowId
	LastWorkflowID *string

	// Management Endpoint Uri
	ManagementEndpointURI *string

	// Monitoring Configuration
	MonitoringConfiguration *string

	// Telemetry Endpoint Uri
	MonitoringEndpointURI *string

	// Registered Server Provisioning State
	ProvisioningState *string

	// Resource Location
	ResourceLocation *string

	// Registered Server Certificate
	ServerCertificate *string

	// Registered Server serverId
	ServerID *string

	// Registered Server Management Error Code
	ServerManagementErrorCode *int32

	// Registered Server OS Version
	ServerOSVersion *string

	// Registered Server serverRole
	ServerRole *string

	// Service Location
	ServiceLocation *string

	// Registered Server storageSyncServiceUid
	StorageSyncServiceUID *string

	// READ-ONLY; Registered Server Agent Version Expiration Date
	AgentVersionExpirationDate *time.Time

	// READ-ONLY; Registered Server Agent Version Status
	AgentVersionStatus *RegisteredServerAgentVersionStatus

	// READ-ONLY; Server name
	ServerName *string
}

RegisteredServerProperties - RegisteredServer Properties object.

func (RegisteredServerProperties) MarshalJSON

func (r RegisteredServerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegisteredServerProperties.

func (*RegisteredServerProperties) UnmarshalJSON

func (r *RegisteredServerProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredServerProperties.

type RegisteredServersClient

type RegisteredServersClient struct {
	// contains filtered or unexported fields
}

RegisteredServersClient contains the methods for the RegisteredServers group. Don't use this type directly, use NewRegisteredServersClient() instead.

func NewRegisteredServersClient

func NewRegisteredServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegisteredServersClient, error)

NewRegisteredServersClient creates a new instance of RegisteredServersClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RegisteredServersClient) BeginCreate

func (client *RegisteredServersClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, parameters RegisteredServerCreateParameters, options *RegisteredServersClientBeginCreateOptions) (*runtime.Poller[RegisteredServersClientCreateResponse], error)

BeginCreate - Add a new registered server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • serverID - GUID identifying the on-premises server.
  • parameters - Body of Registered Server object.
  • options - RegisteredServersClientBeginCreateOptions contains the optional parameters for the RegisteredServersClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegisteredServersClient().BeginCreate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "080d4133-bdb5-40a0-96a0-71a6057bfe9a", armstoragesync.RegisteredServerCreateParameters{
		Properties: &armstoragesync.RegisteredServerCreateParametersProperties{
			AgentVersion:      to.Ptr("1.0.277.0"),
			FriendlyName:      to.Ptr("afscv-2304-139"),
			ServerCertificate: to.Ptr("MIIDFjCCAf6gAwIBAgIQQS+DS8uhc4VNzUkTw7wbRjANBgkqhkiG9w0BAQ0FADAzMTEwLwYDVQQDEyhhbmt1c2hiLXByb2QzLnJlZG1vbmQuY29ycC5taWNyb3NvZnQuY29tMB4XDTE3MDgwMzE3MDQyNFoXDTE4MDgwNDE3MDQyNFowMzExMC8GA1UEAxMoYW5rdXNoYi1wcm9kMy5yZWRtb25kLmNvcnAubWljcm9zb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALDRvV4gmsIy6jGDPiHsXmvgVP749NNP7DopdlbHaNhjFmYINHl0uWylyaZmgJrROt2mnxN/zEyJtGnqYHlzUr4xvGq/qV5pqgdB9tag/sw9i22gfe9PRZ0FmSOZnXMbLYgLiDFqLtut5gHcOuWMj03YnkfoBEKlFBxWbagvW2yxz/Sxi9OVSJOKCaXra0RpcIHrO/KFl6ho2eE1/7Ykmfa8hZvSdoPd5gHdLiQcMB/pxq+mWp1fI6c8vFZoDu7Atn+NXTzYPKUxKzaisF12TsaKpohUsJpbB3Wocb0F5frn614D2pg14ERB5otjAMWw1m65csQWPI6dP8KIYe0+QPkCAwEAAaMmMCQwIgYDVR0lAQH/BBgwFgYIKwYBBQUHAwIGCisGAQQBgjcKAwwwDQYJKoZIhvcNAQENBQADggEBAA4RhVIBkw34M1RwakJgHvtjsOFxF1tVQA941NtLokx1l2Z8+GFQkcG4xpZSt+UN6wLerdCbnNhtkCErWUDeaT0jxk4g71Ofex7iM04crT4iHJr8mi96/XnhnkTUs+GDk12VgdeeNEczMZz+8Mxw9dJ5NCnYgTwO0SzGlclRsDvjzkLo8rh2ZG6n/jKrEyNXXo+hOqhupij0QbRP2Tvexdfw201kgN1jdZify8XzJ8Oi0bTS0KpJf2pNPOlooK2bjMUei9ANtEdXwwfVZGWvVh6tJjdv6k14wWWJ1L7zhA1IIVb1J+sQUzJji5iX0DrezjTz1Fg+gAzITaA/WsuujlM="),
			ServerID:          to.Ptr("080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
			ServerOSVersion:   to.Ptr("10.0.14393.0"),
			ServerRole:        to.Ptr("Standalone"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RegisteredServer = armstoragesync.RegisteredServer{
	// 	Name: to.Ptr("ankushb-prod3.redmond.corp.microsoft.com"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/registeredServers"),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/530a0384-50ac-456d-8240-9d6621404151"),
	// 	Properties: &armstoragesync.RegisteredServerProperties{
	// 		AgentVersion: to.Ptr("3.1.5.0"),
	// 		AgentVersionExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T21:50:40.584Z"); return t}()),
	// 		AgentVersionStatus: to.Ptr(armstoragesync.RegisteredServerAgentVersionStatusOk),
	// 		ClusterID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		ClusterName: to.Ptr(""),
	// 		DiscoveryEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443"),
	// 		FriendlyName: to.Ptr("afscv-2304-139"),
	// 		LastHeartBeat: to.Ptr("2018-06-11T21:50:40.5840543Z"),
	// 		LastOperationName: to.Ptr("ICreateRegisteredServerWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/CV_FileStore_F1D485AA/workflows/4eecfbcf-9537-4b61-8fee-aaa3ace11c44"),
	// 		ManagementEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
	// 		MonitoringEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ResourceLocation: to.Ptr("westus"),
	// 		ServerID: to.Ptr("3635ca8b-5cc8-4a5c-bd43-c2de5ad8dc64"),
	// 		ServerManagementErrorCode: to.Ptr[int32](0),
	// 		ServerName: to.Ptr("afscv-2304-139"),
	// 		ServerOSVersion: to.Ptr("10.0.14393.0"),
	// 		ServerRole: to.Ptr("Standalone"),
	// 		ServiceLocation: to.Ptr("westus"),
	// 		StorageSyncServiceUID: to.Ptr("4aa14534-1c61-483b-b6a6-9630a76f109a"),
	// 	},
	// }
}
Output:

func (*RegisteredServersClient) BeginDelete

func (client *RegisteredServersClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, options *RegisteredServersClientBeginDeleteOptions) (*runtime.Poller[RegisteredServersClientDeleteResponse], error)

BeginDelete - Delete the given registered server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • serverID - GUID identifying the on-premises server.
  • options - RegisteredServersClientBeginDeleteOptions contains the optional parameters for the RegisteredServersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegisteredServersClient().BeginDelete(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "41166691-ab03-43e9-ab3e-0330eda162ac", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RegisteredServersClient) BeginTriggerRollover

func (client *RegisteredServersClient) BeginTriggerRollover(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, parameters TriggerRolloverRequest, options *RegisteredServersClientBeginTriggerRolloverOptions) (*runtime.Poller[RegisteredServersClientTriggerRolloverResponse], error)

BeginTriggerRollover - Triggers Server certificate rollover. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • serverID - Server Id
  • parameters - Body of Trigger Rollover request.
  • options - RegisteredServersClientBeginTriggerRolloverOptions contains the optional parameters for the RegisteredServersClient.BeginTriggerRollover method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_TriggerRollover.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRegisteredServersClient().BeginTriggerRollover(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "d166ca76-dad2-49df-b409-12345642d730", armstoragesync.TriggerRolloverRequest{
		ServerCertificate: to.Ptr("\"MIIDFjCCAf6gAwIBAgIQQS+DS8uhc4VNzUkTw7wbRjANBgkqhkiG9w0BAQ0FADAzMTEwLwYDVQQDEyhhbmt1c2hiLXByb2QzLnJlZG1vbmQuY29ycC5taWNyb3NvZnQuY29tMB4XDTE3MDgwMzE3MDQyNFoXDTE4MDgwNDE3MDQyNFowMzExMC8GA1UEAxMoYW5rdXNoYi1wcm9kMy5yZWRtb25kLmNvcnAubWljcm9zb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALDRvV4gmsIy6jGDPiHsXmvgVP749NNP7DopdlbHaNhjFmYINHl0uWylyaZmgJrROt2mnxN/zEyJtGnqYHlzUr4xvGq/qV5pqgdB9tag/sw9i22gfe9PRZ0FmSOZnXMbLYgLiDFqLtut5gHcOuWMj03YnkfoBEKlFBxWbagvW2yxz/Sxi9OVSJOKCaXra0RpcIHrO/KFl6ho2eE1/7Ykmfa8hZvSdoPd5gHdLiQcMB/pxq+mWp1fI6c8vFZoDu7Atn+NXTzYPKUxKzaisF12TsaKpohUsJpbB3Wocb0F5frn614D2pg14ERB5otjAMWw1m65csQWPI6dP8KIYe0+QPkCAwEAAaMmMCQwIgYDVR0lAQH/BBgwFgYIKwYBBQUHAwIGCisGAQQBgjcKAwwwDQYJKoZIhvcNAQENBQADggEBAA4RhVIBkw34M1RwakJgHvtjsOFxF1tVQA941NtLokx1l2Z8+GFQkcG4xpZSt+UN6wLerdCbnNhtkCErWUDeaT0jxk4g71Ofex7iM04crT4iHJr8mi96/XnhnkTUs+GDk12VgdeeNEczMZz+8Mxw9dJ5NCnYgTwO0SzGlclRsDvjzkLo8rh2ZG6n/jKrEyNXXo+hOqhupij0QbRP2Tvexdfw201kgN1jdZify8XzJ8Oi0bTS0KpJf2pNPOlooK2bjMUei9ANtEdXwwfVZGWvVh6tJjdv6k14wWWJ1L7zhA1IIVb1J+sQUzJji5iX0DrezjTz1Fg+gAzITaA/WsuujlM=\""),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RegisteredServersClient) Get

func (client *RegisteredServersClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, options *RegisteredServersClientGetOptions) (RegisteredServersClientGetResponse, error)

Get - Get a given registered server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • serverID - GUID identifying the on-premises server.
  • options - RegisteredServersClientGetOptions contains the optional parameters for the RegisteredServersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRegisteredServersClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "080d4133-bdb5-40a0-96a0-71a6057bfe9a", 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.RegisteredServer = armstoragesync.RegisteredServer{
	// 	Name: to.Ptr("SampleRegisteredServer_1.redmond.corp.microsoft.com"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/registeredServers"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
	// 	Properties: &armstoragesync.RegisteredServerProperties{
	// 		AgentVersion: to.Ptr("3.1.5.0"),
	// 		AgentVersionExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T21:50:40.584Z"); return t}()),
	// 		AgentVersionStatus: to.Ptr(armstoragesync.RegisteredServerAgentVersionStatusOk),
	// 		ClusterID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		ClusterName: to.Ptr(""),
	// 		DiscoveryEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443"),
	// 		FriendlyName: to.Ptr("afscv-2304-139"),
	// 		LastHeartBeat: to.Ptr("2018-06-11T21:50:40.5840543Z"),
	// 		LastOperationName: to.Ptr("ICreateRegisteredServerWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/CV_FileStore_F1D485AA/workflows/4eecfbcf-9537-4b61-8fee-aaa3ace11c44"),
	// 		ManagementEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
	// 		MonitoringEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ResourceLocation: to.Ptr("westus"),
	// 		ServerID: to.Ptr("3635ca8b-5cc8-4a5c-bd43-c2de5ad8dc64"),
	// 		ServerManagementErrorCode: to.Ptr[int32](0),
	// 		ServerName: to.Ptr("afscv-2304-139"),
	// 		ServerOSVersion: to.Ptr("10.0.14393.0"),
	// 		ServerRole: to.Ptr("Standalone"),
	// 		ServiceLocation: to.Ptr("westus"),
	// 		StorageSyncServiceUID: to.Ptr("4aa14534-1c61-483b-b6a6-9630a76f109a"),
	// 	},
	// }
}
Output:

func (*RegisteredServersClient) NewListByStorageSyncServicePager added in v0.4.0

func (client *RegisteredServersClient) NewListByStorageSyncServicePager(resourceGroupName string, storageSyncServiceName string, options *RegisteredServersClientListByStorageSyncServiceOptions) *runtime.Pager[RegisteredServersClientListByStorageSyncServiceResponse]

NewListByStorageSyncServicePager - Get a given registered server list.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - RegisteredServersClientListByStorageSyncServiceOptions contains the optional parameters for the RegisteredServersClient.NewListByStorageSyncServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_ListByStorageSyncService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRegisteredServersClient().NewListByStorageSyncServicePager("SampleResourceGroup_1", "SampleStorageSyncService_1", 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.RegisteredServerArray = armstoragesync.RegisteredServerArray{
		// 	Value: []*armstoragesync.RegisteredServer{
		// 		{
		// 			Name: to.Ptr("SampleRegisteredServer_1.redmond.corp.microsoft.com"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/registeredServers"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
		// 			Properties: &armstoragesync.RegisteredServerProperties{
		// 				AgentVersion: to.Ptr("3.1.5.0"),
		// 				AgentVersionExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T21:50:40.584Z"); return t}()),
		// 				AgentVersionStatus: to.Ptr(armstoragesync.RegisteredServerAgentVersionStatusOk),
		// 				ClusterID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				ClusterName: to.Ptr(""),
		// 				DiscoveryEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443"),
		// 				FriendlyName: to.Ptr("afscv-2304-139"),
		// 				LastHeartBeat: to.Ptr("2018-06-11T21:50:40.5840543Z"),
		// 				LastOperationName: to.Ptr("ICreateRegisteredServerWorkflow"),
		// 				LastWorkflowID: to.Ptr("storageSyncServices/CV_FileStore_F1D485AA/workflows/4eecfbcf-9537-4b61-8fee-aaa3ace11c44"),
		// 				ManagementEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
		// 				MonitoringEndpointURI: to.Ptr("https://kailanitest99.one.microsoft.com:443/"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ResourceLocation: to.Ptr("westus"),
		// 				ServerID: to.Ptr("3635ca8b-5cc8-4a5c-bd43-c2de5ad8dc64"),
		// 				ServerManagementErrorCode: to.Ptr[int32](0),
		// 				ServerName: to.Ptr("afscv-2304-139"),
		// 				ServerOSVersion: to.Ptr("10.0.14393.0"),
		// 				ServerRole: to.Ptr("Standalone"),
		// 				ServiceLocation: to.Ptr("westus"),
		// 				StorageSyncServiceUID: to.Ptr("4aa14534-1c61-483b-b6a6-9630a76f109a"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type RegisteredServersClientBeginCreateOptions added in v0.2.0

type RegisteredServersClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegisteredServersClientBeginCreateOptions contains the optional parameters for the RegisteredServersClient.BeginCreate method.

type RegisteredServersClientBeginDeleteOptions added in v0.2.0

type RegisteredServersClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegisteredServersClientBeginDeleteOptions contains the optional parameters for the RegisteredServersClient.BeginDelete method.

type RegisteredServersClientBeginTriggerRolloverOptions added in v0.2.0

type RegisteredServersClientBeginTriggerRolloverOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RegisteredServersClientBeginTriggerRolloverOptions contains the optional parameters for the RegisteredServersClient.BeginTriggerRollover method.

type RegisteredServersClientCreateResponse added in v0.2.0

type RegisteredServersClientCreateResponse struct {
	// Registered Server resource.
	RegisteredServer
}

RegisteredServersClientCreateResponse contains the response from method RegisteredServersClient.BeginCreate.

type RegisteredServersClientDeleteResponse added in v0.2.0

type RegisteredServersClientDeleteResponse struct {
}

RegisteredServersClientDeleteResponse contains the response from method RegisteredServersClient.BeginDelete.

type RegisteredServersClientGetOptions added in v0.2.0

type RegisteredServersClientGetOptions struct {
}

RegisteredServersClientGetOptions contains the optional parameters for the RegisteredServersClient.Get method.

type RegisteredServersClientGetResponse added in v0.2.0

type RegisteredServersClientGetResponse struct {
	// Registered Server resource.
	RegisteredServer

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

RegisteredServersClientGetResponse contains the response from method RegisteredServersClient.Get.

type RegisteredServersClientListByStorageSyncServiceOptions added in v0.2.0

type RegisteredServersClientListByStorageSyncServiceOptions struct {
}

RegisteredServersClientListByStorageSyncServiceOptions contains the optional parameters for the RegisteredServersClient.NewListByStorageSyncServicePager method.

type RegisteredServersClientListByStorageSyncServiceResponse added in v0.2.0

type RegisteredServersClientListByStorageSyncServiceResponse struct {
	// Array of RegisteredServer
	RegisteredServerArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

RegisteredServersClientListByStorageSyncServiceResponse contains the response from method RegisteredServersClient.NewListByStorageSyncServicePager.

type RegisteredServersClientTriggerRolloverResponse added in v0.2.0

type RegisteredServersClientTriggerRolloverResponse struct {
}

RegisteredServersClientTriggerRolloverResponse contains the response from method RegisteredServersClient.BeginTriggerRollover.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourcesMoveInfo

type ResourcesMoveInfo struct {
	// Collection of Resources.
	Resources []*string

	// Target resource group.
	TargetResourceGroup *string
}

ResourcesMoveInfo - Resource Move Info.

func (ResourcesMoveInfo) MarshalJSON

func (r ResourcesMoveInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourcesMoveInfo.

func (*ResourcesMoveInfo) UnmarshalJSON added in v1.1.0

func (r *ResourcesMoveInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesMoveInfo.

type RestoreFileSpec

type RestoreFileSpec struct {
	// Restore file spec isdir
	Isdir *bool

	// Restore file spec path
	Path *string
}

RestoreFileSpec - Restore file spec.

func (RestoreFileSpec) MarshalJSON added in v1.1.0

func (r RestoreFileSpec) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RestoreFileSpec.

func (*RestoreFileSpec) UnmarshalJSON added in v1.1.0

func (r *RestoreFileSpec) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreFileSpec.

type ServerEndpoint

type ServerEndpoint struct {
	// Server Endpoint properties.
	Properties *ServerEndpointProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ServerEndpoint - Server Endpoint object.

func (ServerEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpoint.

func (*ServerEndpoint) UnmarshalJSON added in v1.1.0

func (s *ServerEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpoint.

type ServerEndpointArray

type ServerEndpointArray struct {
	// Collection of ServerEndpoint.
	Value []*ServerEndpoint
}

ServerEndpointArray - Array of ServerEndpoint

func (ServerEndpointArray) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointArray.

func (*ServerEndpointArray) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointArray.

type ServerEndpointBackgroundDataDownloadActivity

type ServerEndpointBackgroundDataDownloadActivity struct {
	// READ-ONLY; Running count of bytes downloaded
	DownloadedBytes *int64

	// READ-ONLY; Progress percentage
	PercentProgress *int32

	// READ-ONLY; Timestamp when the operation started
	StartedTimestamp *time.Time

	// READ-ONLY; Timestamp when properties were updated
	Timestamp *time.Time
}

ServerEndpointBackgroundDataDownloadActivity - Background data download activity object

func (ServerEndpointBackgroundDataDownloadActivity) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ServerEndpointBackgroundDataDownloadActivity.

func (*ServerEndpointBackgroundDataDownloadActivity) UnmarshalJSON

func (s *ServerEndpointBackgroundDataDownloadActivity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointBackgroundDataDownloadActivity.

type ServerEndpointCloudTieringStatus

type ServerEndpointCloudTieringStatus struct {
	// READ-ONLY; Information regarding how well the local cache on the server is performing.
	CachePerformance *CloudTieringCachePerformance

	// READ-ONLY; Status of the date policy
	DatePolicyStatus *CloudTieringDatePolicyStatus

	// READ-ONLY; Information regarding files that failed to be tiered
	FilesNotTiering *CloudTieringFilesNotTiering

	// READ-ONLY; Cloud tiering health state.
	Health *ServerEndpointHealthState

	// READ-ONLY; The last updated timestamp of health state
	HealthLastUpdatedTimestamp *time.Time

	// READ-ONLY; Last cloud tiering result (HResult)
	LastCloudTieringResult *int32

	// READ-ONLY; Last cloud tiering success timestamp
	LastSuccessTimestamp *time.Time

	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Information regarding how much local space cloud tiering is saving.
	SpaceSavings *CloudTieringSpaceSavings

	// READ-ONLY; Status of the volume free space policy
	VolumeFreeSpacePolicyStatus *CloudTieringVolumeFreeSpacePolicyStatus
}

ServerEndpointCloudTieringStatus - Server endpoint cloud tiering status object.

func (ServerEndpointCloudTieringStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointCloudTieringStatus.

func (*ServerEndpointCloudTieringStatus) UnmarshalJSON

func (s *ServerEndpointCloudTieringStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointCloudTieringStatus.

type ServerEndpointCreateParameters

type ServerEndpointCreateParameters struct {
	// The parameters used to create the server endpoint.
	Properties *ServerEndpointCreateParametersProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ServerEndpointCreateParameters - The parameters used when creating a server endpoint.

func (ServerEndpointCreateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointCreateParameters.

func (*ServerEndpointCreateParameters) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointCreateParameters.

type ServerEndpointCreateParametersProperties

type ServerEndpointCreateParametersProperties struct {
	// Cloud Tiering.
	CloudTiering *FeatureStatus

	// Friendly Name
	FriendlyName *string

	// Policy for how namespace and files are recalled during FastDr.
	InitialDownloadPolicy *InitialDownloadPolicy

	// Policy for how the initial upload sync session is performed.
	InitialUploadPolicy *InitialUploadPolicy

	// Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access.
	LocalCacheMode *LocalCacheMode

	// Offline data transfer
	OfflineDataTransfer *FeatureStatus

	// Offline data transfer share name
	OfflineDataTransferShareName *string

	// Server Local path.
	ServerLocalPath *string

	// Server Resource Id.
	ServerResourceID *string

	// Tier files older than days.
	TierFilesOlderThanDays *int32

	// Level of free space to be maintained by Cloud Tiering if it is enabled.
	VolumeFreeSpacePercent *int32
}

ServerEndpointCreateParametersProperties - ServerEndpoint Properties object.

func (ServerEndpointCreateParametersProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ServerEndpointCreateParametersProperties.

func (*ServerEndpointCreateParametersProperties) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointCreateParametersProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointCreateParametersProperties.

type ServerEndpointFilesNotSyncingError

type ServerEndpointFilesNotSyncingError struct {
	// READ-ONLY; Error code (HResult)
	ErrorCode *int32

	// READ-ONLY; Count of persistent files not syncing with the specified error code
	PersistentCount *int64

	// READ-ONLY; Count of transient files not syncing with the specified error code
	TransientCount *int64
}

ServerEndpointFilesNotSyncingError - Files not syncing error object

func (ServerEndpointFilesNotSyncingError) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointFilesNotSyncingError.

func (*ServerEndpointFilesNotSyncingError) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointFilesNotSyncingError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointFilesNotSyncingError.

type ServerEndpointHealthState

type ServerEndpointHealthState string

ServerEndpointHealthState - Type of the server endpoint health state

const (
	ServerEndpointHealthStateError       ServerEndpointHealthState = "Error"
	ServerEndpointHealthStateHealthy     ServerEndpointHealthState = "Healthy"
	ServerEndpointHealthStateUnavailable ServerEndpointHealthState = "Unavailable"
)

func PossibleServerEndpointHealthStateValues

func PossibleServerEndpointHealthStateValues() []ServerEndpointHealthState

PossibleServerEndpointHealthStateValues returns the possible values for the ServerEndpointHealthState const type.

type ServerEndpointOfflineDataTransferState

type ServerEndpointOfflineDataTransferState string

ServerEndpointOfflineDataTransferState - Type of the Health state

const (
	ServerEndpointOfflineDataTransferStateComplete   ServerEndpointOfflineDataTransferState = "Complete"
	ServerEndpointOfflineDataTransferStateInProgress ServerEndpointOfflineDataTransferState = "InProgress"
	ServerEndpointOfflineDataTransferStateNotRunning ServerEndpointOfflineDataTransferState = "NotRunning"
	ServerEndpointOfflineDataTransferStateStopping   ServerEndpointOfflineDataTransferState = "Stopping"
)

func PossibleServerEndpointOfflineDataTransferStateValues

func PossibleServerEndpointOfflineDataTransferStateValues() []ServerEndpointOfflineDataTransferState

PossibleServerEndpointOfflineDataTransferStateValues returns the possible values for the ServerEndpointOfflineDataTransferState const type.

type ServerEndpointProperties

type ServerEndpointProperties struct {
	// Cloud Tiering.
	CloudTiering *FeatureStatus

	// Friendly Name
	FriendlyName *string

	// Policy for how namespace and files are recalled during FastDr.
	InitialDownloadPolicy *InitialDownloadPolicy

	// Policy for how the initial upload sync session is performed.
	InitialUploadPolicy *InitialUploadPolicy

	// Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access.
	LocalCacheMode *LocalCacheMode

	// Offline data transfer
	OfflineDataTransfer *FeatureStatus

	// Offline data transfer share name
	OfflineDataTransferShareName *string

	// Server Local path.
	ServerLocalPath *string

	// Server Resource Id.
	ServerResourceID *string

	// Tier files older than days.
	TierFilesOlderThanDays *int32

	// Level of free space to be maintained by Cloud Tiering if it is enabled.
	VolumeFreeSpacePercent *int32

	// READ-ONLY; Cloud tiering status. Only populated if cloud tiering is enabled.
	CloudTieringStatus *ServerEndpointCloudTieringStatus

	// READ-ONLY; Resource Last Operation Name
	LastOperationName *string

	// READ-ONLY; ServerEndpoint lastWorkflowId
	LastWorkflowID *string

	// READ-ONLY; Offline data transfer storage account resource ID
	OfflineDataTransferStorageAccountResourceID *string

	// READ-ONLY; Offline data transfer storage account tenant ID
	OfflineDataTransferStorageAccountTenantID *string

	// READ-ONLY; ServerEndpoint Provisioning State
	ProvisioningState *string

	// READ-ONLY; Recall status. Only populated if cloud tiering is enabled.
	RecallStatus *ServerEndpointRecallStatus

	// READ-ONLY; Server name
	ServerName *string

	// READ-ONLY; Server Endpoint sync status
	SyncStatus *ServerEndpointSyncStatus
}

ServerEndpointProperties - ServerEndpoint Properties object.

func (ServerEndpointProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointProperties.

func (*ServerEndpointProperties) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointProperties.

type ServerEndpointRecallError

type ServerEndpointRecallError struct {
	// READ-ONLY; Count of occurences of the error
	Count *int64

	// READ-ONLY; Error code (HResult)
	ErrorCode *int32
}

ServerEndpointRecallError - Server endpoint recall error object

func (ServerEndpointRecallError) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointRecallError.

func (*ServerEndpointRecallError) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointRecallError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointRecallError.

type ServerEndpointRecallStatus

type ServerEndpointRecallStatus struct {
	// READ-ONLY; Last updated timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Array of recall errors
	RecallErrors []*ServerEndpointRecallError

	// READ-ONLY; Total count of recall errors.
	TotalRecallErrorsCount *int64
}

ServerEndpointRecallStatus - Server endpoint recall status object.

func (ServerEndpointRecallStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointRecallStatus.

func (*ServerEndpointRecallStatus) UnmarshalJSON

func (s *ServerEndpointRecallStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointRecallStatus.

type ServerEndpointSyncActivityState

type ServerEndpointSyncActivityState string

ServerEndpointSyncActivityState - Type of the sync activity state

const (
	ServerEndpointSyncActivityStateDownload          ServerEndpointSyncActivityState = "Download"
	ServerEndpointSyncActivityStateUpload            ServerEndpointSyncActivityState = "Upload"
	ServerEndpointSyncActivityStateUploadAndDownload ServerEndpointSyncActivityState = "UploadAndDownload"
)

func PossibleServerEndpointSyncActivityStateValues

func PossibleServerEndpointSyncActivityStateValues() []ServerEndpointSyncActivityState

PossibleServerEndpointSyncActivityStateValues returns the possible values for the ServerEndpointSyncActivityState const type.

type ServerEndpointSyncActivityStatus

type ServerEndpointSyncActivityStatus struct {
	// READ-ONLY; Applied bytes
	AppliedBytes *int64

	// READ-ONLY; Applied item count.
	AppliedItemCount *int64

	// READ-ONLY; Per item error count
	PerItemErrorCount *int64

	// READ-ONLY; Session minutes remaining (if available)
	SessionMinutesRemaining *int32

	// READ-ONLY; Sync mode
	SyncMode *ServerEndpointSyncMode

	// READ-ONLY; Timestamp when properties were updated
	Timestamp *time.Time

	// READ-ONLY; Total bytes (if available)
	TotalBytes *int64

	// READ-ONLY; Total item count (if available)
	TotalItemCount *int64
}

ServerEndpointSyncActivityStatus - Sync Session status object.

func (ServerEndpointSyncActivityStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointSyncActivityStatus.

func (*ServerEndpointSyncActivityStatus) UnmarshalJSON

func (s *ServerEndpointSyncActivityStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointSyncActivityStatus.

type ServerEndpointSyncMode

type ServerEndpointSyncMode string

ServerEndpointSyncMode - Sync mode for the server endpoint.

const (
	ServerEndpointSyncModeInitialFullDownload ServerEndpointSyncMode = "InitialFullDownload"
	ServerEndpointSyncModeInitialUpload       ServerEndpointSyncMode = "InitialUpload"
	ServerEndpointSyncModeNamespaceDownload   ServerEndpointSyncMode = "NamespaceDownload"
	ServerEndpointSyncModeRegular             ServerEndpointSyncMode = "Regular"
	ServerEndpointSyncModeSnapshotUpload      ServerEndpointSyncMode = "SnapshotUpload"
)

func PossibleServerEndpointSyncModeValues

func PossibleServerEndpointSyncModeValues() []ServerEndpointSyncMode

PossibleServerEndpointSyncModeValues returns the possible values for the ServerEndpointSyncMode const type.

type ServerEndpointSyncSessionStatus

type ServerEndpointSyncSessionStatus struct {
	// READ-ONLY; Array of per-item errors coming from the last sync session.
	FilesNotSyncingErrors []*ServerEndpointFilesNotSyncingError

	// READ-ONLY; Sync mode
	LastSyncMode *ServerEndpointSyncMode

	// READ-ONLY; Last sync per item error count.
	LastSyncPerItemErrorCount *int64

	// READ-ONLY; Last sync result (HResult)
	LastSyncResult *int32

	// READ-ONLY; Last sync success timestamp
	LastSyncSuccessTimestamp *time.Time

	// READ-ONLY; Last sync timestamp
	LastSyncTimestamp *time.Time

	// READ-ONLY; Count of persistent files not syncing.
	PersistentFilesNotSyncingCount *int64

	// READ-ONLY; Count of transient files not syncing.
	TransientFilesNotSyncingCount *int64
}

ServerEndpointSyncSessionStatus - Sync Session status object.

func (ServerEndpointSyncSessionStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointSyncSessionStatus.

func (*ServerEndpointSyncSessionStatus) UnmarshalJSON

func (s *ServerEndpointSyncSessionStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointSyncSessionStatus.

type ServerEndpointSyncStatus

type ServerEndpointSyncStatus struct {
	// READ-ONLY; Background data download activity
	BackgroundDataDownloadActivity *ServerEndpointBackgroundDataDownloadActivity

	// READ-ONLY; Combined Health Status.
	CombinedHealth *ServerEndpointHealthState

	// READ-ONLY; Download sync activity
	DownloadActivity *ServerEndpointSyncActivityStatus

	// READ-ONLY; Download Health Status.
	DownloadHealth *ServerEndpointHealthState

	// READ-ONLY; Download Status
	DownloadStatus *ServerEndpointSyncSessionStatus

	// READ-ONLY; Last Updated Timestamp
	LastUpdatedTimestamp *time.Time

	// READ-ONLY; Offline Data Transfer State
	OfflineDataTransferStatus *ServerEndpointOfflineDataTransferState

	// READ-ONLY; Sync activity
	SyncActivity *ServerEndpointSyncActivityState

	// READ-ONLY; Total count of persistent files not syncing (combined upload + download).
	TotalPersistentFilesNotSyncingCount *int64

	// READ-ONLY; Upload sync activity
	UploadActivity *ServerEndpointSyncActivityStatus

	// READ-ONLY; Upload Health Status.
	UploadHealth *ServerEndpointHealthState

	// READ-ONLY; Upload Status
	UploadStatus *ServerEndpointSyncSessionStatus
}

ServerEndpointSyncStatus - Server Endpoint sync status

func (ServerEndpointSyncStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointSyncStatus.

func (*ServerEndpointSyncStatus) UnmarshalJSON

func (s *ServerEndpointSyncStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointSyncStatus.

type ServerEndpointUpdateParameters

type ServerEndpointUpdateParameters struct {
	// The properties of the server endpoint.
	Properties *ServerEndpointUpdateProperties
}

ServerEndpointUpdateParameters - Parameters for updating an Server Endpoint.

func (ServerEndpointUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointUpdateParameters.

func (*ServerEndpointUpdateParameters) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointUpdateParameters.

type ServerEndpointUpdateProperties

type ServerEndpointUpdateProperties struct {
	// Cloud Tiering.
	CloudTiering *FeatureStatus

	// Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access.
	LocalCacheMode *LocalCacheMode

	// Offline data transfer
	OfflineDataTransfer *FeatureStatus

	// Offline data transfer share name
	OfflineDataTransferShareName *string

	// Tier files older than days.
	TierFilesOlderThanDays *int32

	// Level of free space to be maintained by Cloud Tiering if it is enabled.
	VolumeFreeSpacePercent *int32
}

ServerEndpointUpdateProperties - ServerEndpoint Update Properties object.

func (ServerEndpointUpdateProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServerEndpointUpdateProperties.

func (*ServerEndpointUpdateProperties) UnmarshalJSON added in v1.1.0

func (s *ServerEndpointUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServerEndpointUpdateProperties.

type ServerEndpointsClient

type ServerEndpointsClient struct {
	// contains filtered or unexported fields
}

ServerEndpointsClient contains the methods for the ServerEndpoints group. Don't use this type directly, use NewServerEndpointsClient() instead.

func NewServerEndpointsClient

func NewServerEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerEndpointsClient, error)

NewServerEndpointsClient creates a new instance of ServerEndpointsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ServerEndpointsClient) BeginCreate

func (client *ServerEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, parameters ServerEndpointCreateParameters, options *ServerEndpointsClientBeginCreateOptions) (*runtime.Poller[ServerEndpointsClientCreateResponse], error)

BeginCreate - Create a new ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • serverEndpointName - Name of Server Endpoint object.
  • parameters - Body of Server Endpoint object.
  • options - ServerEndpointsClientBeginCreateOptions contains the optional parameters for the ServerEndpointsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServerEndpointsClient().BeginCreate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleServerEndpoint_1", armstoragesync.ServerEndpointCreateParameters{
		Properties: &armstoragesync.ServerEndpointCreateParametersProperties{
			CloudTiering:                 to.Ptr(armstoragesync.FeatureStatusOff),
			InitialDownloadPolicy:        to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
			InitialUploadPolicy:          to.Ptr(armstoragesync.InitialUploadPolicyServerAuthoritative),
			LocalCacheMode:               to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
			OfflineDataTransfer:          to.Ptr(armstoragesync.FeatureStatusOn),
			OfflineDataTransferShareName: to.Ptr("myfileshare"),
			ServerLocalPath:              to.Ptr("D:\\SampleServerEndpoint_1"),
			ServerResourceID:             to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
			TierFilesOlderThanDays:       to.Ptr[int32](0),
			VolumeFreeSpacePercent:       to.Ptr[int32](100),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ServerEndpoint = armstoragesync.ServerEndpoint{
	// 	Name: to.Ptr("SampleServerEndpoint_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints"),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/serverEndpoints/SampleServerEndpoint_1"),
	// 	Properties: &armstoragesync.ServerEndpointProperties{
	// 		CloudTiering: to.Ptr(armstoragesync.FeatureStatusOff),
	// 		FriendlyName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
	// 		InitialDownloadPolicy: to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
	// 		InitialUploadPolicy: to.Ptr(armstoragesync.InitialUploadPolicyServerAuthoritative),
	// 		LastOperationName: to.Ptr("ICreateServerEndpointWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/healthDemo1/workflows/569afb5c-7172-4cf8-a8ea-d987f727f11a"),
	// 		LocalCacheMode: to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
	// 		OfflineDataTransfer: to.Ptr(armstoragesync.FeatureStatusOn),
	// 		OfflineDataTransferShareName: to.Ptr("myfileshare"),
	// 		OfflineDataTransferStorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/mysa"),
	// 		OfflineDataTransferStorageAccountTenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServerLocalPath: to.Ptr("D:\\SampleServerEndpoint_1"),
	// 		ServerName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
	// 		ServerResourceID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
	// 		TierFilesOlderThanDays: to.Ptr[int32](0),
	// 		VolumeFreeSpacePercent: to.Ptr[int32](100),
	// 	},
	// }
}
Output:

func (*ServerEndpointsClient) BeginDelete

func (client *ServerEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, options *ServerEndpointsClientBeginDeleteOptions) (*runtime.Poller[ServerEndpointsClientDeleteResponse], error)

BeginDelete - Delete a given ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • serverEndpointName - Name of Server Endpoint object.
  • options - ServerEndpointsClientBeginDeleteOptions contains the optional parameters for the ServerEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServerEndpointsClient().BeginDelete(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleServerEndpoint_1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ServerEndpointsClient) BeginRecallAction

func (client *ServerEndpointsClient) BeginRecallAction(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, parameters RecallActionParameters, options *ServerEndpointsClientBeginRecallActionOptions) (*runtime.Poller[ServerEndpointsClientRecallActionResponse], error)

BeginRecallAction - Recall a server endpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • serverEndpointName - Name of Server Endpoint object.
  • parameters - Body of Recall Action object.
  • options - ServerEndpointsClientBeginRecallActionOptions contains the optional parameters for the ServerEndpointsClient.BeginRecallAction method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_Recall.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServerEndpointsClient().BeginRecallAction(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleServerEndpoint_1", armstoragesync.RecallActionParameters{
		Pattern:    to.Ptr(""),
		RecallPath: to.Ptr(""),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ServerEndpointsClient) BeginUpdate

func (client *ServerEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, options *ServerEndpointsClientBeginUpdateOptions) (*runtime.Poller[ServerEndpointsClientUpdateResponse], error)

BeginUpdate - Patch a given ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • serverEndpointName - Name of Server Endpoint object.
  • options - ServerEndpointsClientBeginUpdateOptions contains the optional parameters for the ServerEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServerEndpointsClient().BeginUpdate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleServerEndpoint_1", &armstoragesync.ServerEndpointsClientBeginUpdateOptions{Parameters: &armstoragesync.ServerEndpointUpdateParameters{
		Properties: &armstoragesync.ServerEndpointUpdateProperties{
			CloudTiering:           to.Ptr(armstoragesync.FeatureStatusOff),
			LocalCacheMode:         to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
			OfflineDataTransfer:    to.Ptr(armstoragesync.FeatureStatusOff),
			TierFilesOlderThanDays: to.Ptr[int32](0),
			VolumeFreeSpacePercent: to.Ptr[int32](100),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ServerEndpoint = armstoragesync.ServerEndpoint{
	// 	Name: to.Ptr("SampleServerEndpoint_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints"),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/serverEndpoints/SampleServerEndpoint_1"),
	// 	Properties: &armstoragesync.ServerEndpointProperties{
	// 		CloudTiering: to.Ptr(armstoragesync.FeatureStatusOff),
	// 		FriendlyName: to.Ptr("somemachine2.redmond.corp.microsoft.com"),
	// 		InitialDownloadPolicy: to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
	// 		InitialUploadPolicy: to.Ptr(armstoragesync.InitialUploadPolicyMerge),
	// 		LastOperationName: to.Ptr("ICreateServerEndpointWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/healthDemo1/workflows/569afb5c-7172-4cf8-a8ea-d987f727f11b"),
	// 		LocalCacheMode: to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
	// 		OfflineDataTransfer: to.Ptr(armstoragesync.FeatureStatusOff),
	// 		OfflineDataTransferShareName: to.Ptr("myfileshare"),
	// 		OfflineDataTransferStorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/mysa"),
	// 		OfflineDataTransferStorageAccountTenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServerLocalPath: to.Ptr("C:\\data_quota2"),
	// 		ServerName: to.Ptr("somemachine2.redmond.corp.microsoft.com"),
	// 		ServerResourceID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/anpintDemoRG/providers/kailanitest07.one.microsoft.com/storageSyncServices/healthdemo1/registeredServers/f94e2944-b48d-4e5b-bdc7-c48ab3712659"),
	// 		SyncStatus: &armstoragesync.ServerEndpointSyncStatus{
	// 			CombinedHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
	// 			DownloadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
	// 			DownloadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
	// 				LastSyncPerItemErrorCount: to.Ptr[int64](0),
	// 				LastSyncResult: to.Ptr[int32](0),
	// 				LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
	// 				LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
	// 			},
	// 			LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			OfflineDataTransferStatus: to.Ptr(armstoragesync.ServerEndpointOfflineDataTransferStateStopping),
	// 			UploadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
	// 			UploadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
	// 				LastSyncPerItemErrorCount: to.Ptr[int64](0),
	// 				LastSyncResult: to.Ptr[int32](-2134351810),
	// 				LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			},
	// 		},
	// 		TierFilesOlderThanDays: to.Ptr[int32](0),
	// 		VolumeFreeSpacePercent: to.Ptr[int32](20),
	// 	},
	// }
}
Output:

func (*ServerEndpointsClient) Get

func (client *ServerEndpointsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, options *ServerEndpointsClientGetOptions) (ServerEndpointsClientGetResponse, error)

Get - Get a ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • serverEndpointName - Name of Server Endpoint object.
  • options - ServerEndpointsClientGetOptions contains the optional parameters for the ServerEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServerEndpointsClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", "SampleServerEndpoint_1", 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.ServerEndpoint = armstoragesync.ServerEndpoint{
	// 	Name: to.Ptr("SampleServerEndpoint_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints"),
	// 	ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/serverEndpoints/SampleServerEndpoint_1"),
	// 	Properties: &armstoragesync.ServerEndpointProperties{
	// 		CloudTiering: to.Ptr(armstoragesync.FeatureStatusOn),
	// 		CloudTieringStatus: &armstoragesync.ServerEndpointCloudTieringStatus{
	// 			CachePerformance: &armstoragesync.CloudTieringCachePerformance{
	// 				CacheHitBytes: to.Ptr[int64](922337203685477600),
	// 				CacheHitBytesPercent: to.Ptr[int32](50),
	// 				CacheMissBytes: to.Ptr[int64](922337203685477600),
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 			},
	// 			DatePolicyStatus: &armstoragesync.CloudTieringDatePolicyStatus{
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 				TieredFilesMostRecentAccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 			},
	// 			FilesNotTiering: &armstoragesync.CloudTieringFilesNotTiering{
	// 				Errors: []*armstoragesync.FilesNotTieringError{
	// 					{
	// 						ErrorCode: to.Ptr[int32](-2134347771),
	// 						FileCount: to.Ptr[int64](10),
	// 					},
	// 					{
	// 						ErrorCode: to.Ptr[int32](-2134347770),
	// 						FileCount: to.Ptr[int64](20),
	// 					},
	// 					{
	// 						ErrorCode: to.Ptr[int32](-2134347769),
	// 						FileCount: to.Ptr[int64](30),
	// 				}},
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 				TotalFileCount: to.Ptr[int64](60),
	// 			},
	// 			Health: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
	// 			HealthLastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			LastCloudTieringResult: to.Ptr[int32](-2134347771),
	// 			LastSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			SpaceSavings: &armstoragesync.CloudTieringSpaceSavings{
	// 				CachedSizeBytes: to.Ptr[int64](50000000),
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 				SpaceSavingsBytes: to.Ptr[int64](50000000),
	// 				SpaceSavingsPercent: to.Ptr[int32](50),
	// 				TotalSizeCloudBytes: to.Ptr[int64](100000000),
	// 				VolumeSizeBytes: to.Ptr[int64](922337203685477600),
	// 			},
	// 			VolumeFreeSpacePolicyStatus: &armstoragesync.CloudTieringVolumeFreeSpacePolicyStatus{
	// 				CurrentVolumeFreeSpacePercent: to.Ptr[int32](5),
	// 				EffectiveVolumeFreeSpacePolicy: to.Ptr[int32](30),
	// 				LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 			},
	// 		},
	// 		FriendlyName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
	// 		InitialDownloadPolicy: to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
	// 		InitialUploadPolicy: to.Ptr(armstoragesync.InitialUploadPolicyMerge),
	// 		LastOperationName: to.Ptr("ICreateServerEndpointWorkflow"),
	// 		LastWorkflowID: to.Ptr("storageSyncServices/healthDemo1/workflows/569afb5c-7172-4cf8-a8ea-d987f727f11a"),
	// 		LocalCacheMode: to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
	// 		OfflineDataTransfer: to.Ptr(armstoragesync.FeatureStatusOn),
	// 		OfflineDataTransferShareName: to.Ptr("myfileshare"),
	// 		OfflineDataTransferStorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/mysa"),
	// 		OfflineDataTransferStorageAccountTenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		RecallStatus: &armstoragesync.ServerEndpointRecallStatus{
	// 			LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			RecallErrors: []*armstoragesync.ServerEndpointRecallError{
	// 				{
	// 					Count: to.Ptr[int64](5),
	// 					ErrorCode: to.Ptr[int32](-2134347775),
	// 				},
	// 				{
	// 					Count: to.Ptr[int64](10),
	// 					ErrorCode: to.Ptr[int32](-2134347774),
	// 				},
	// 				{
	// 					Count: to.Ptr[int64](15),
	// 					ErrorCode: to.Ptr[int32](-2134347773),
	// 			}},
	// 			TotalRecallErrorsCount: to.Ptr[int64](30),
	// 		},
	// 		ServerLocalPath: to.Ptr("D:\\SampleServerEndpoint_1"),
	// 		ServerName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
	// 		ServerResourceID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
	// 		SyncStatus: &armstoragesync.ServerEndpointSyncStatus{
	// 			CombinedHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
	// 			DownloadActivity: &armstoragesync.ServerEndpointSyncActivityStatus{
	// 				AppliedBytes: to.Ptr[int64](94805587),
	// 				AppliedItemCount: to.Ptr[int64](100),
	// 				PerItemErrorCount: to.Ptr[int64](0),
	// 				Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 				TotalBytes: to.Ptr[int64](19583674),
	// 				TotalItemCount: to.Ptr[int64](300),
	// 			},
	// 			DownloadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
	// 			DownloadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
	// 				LastSyncPerItemErrorCount: to.Ptr[int64](0),
	// 				LastSyncResult: to.Ptr[int32](0),
	// 				LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
	// 				LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
	// 			},
	// 			LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			OfflineDataTransferStatus: to.Ptr(armstoragesync.ServerEndpointOfflineDataTransferStateInProgress),
	// 			SyncActivity: to.Ptr(armstoragesync.ServerEndpointSyncActivityStateUploadAndDownload),
	// 			UploadActivity: &armstoragesync.ServerEndpointSyncActivityStatus{
	// 				AppliedBytes: to.Ptr[int64](57348983),
	// 				AppliedItemCount: to.Ptr[int64](1000),
	// 				PerItemErrorCount: to.Ptr[int64](300),
	// 				Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 				TotalBytes: to.Ptr[int64](1958367412),
	// 				TotalItemCount: to.Ptr[int64](2300),
	// 			},
	// 			UploadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
	// 			UploadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
	// 				LastSyncPerItemErrorCount: to.Ptr[int64](1000),
	// 				LastSyncResult: to.Ptr[int32](-2134351810),
	// 				LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
	// 			},
	// 		},
	// 		TierFilesOlderThanDays: to.Ptr[int32](0),
	// 		VolumeFreeSpacePercent: to.Ptr[int32](100),
	// 	},
	// }
}
Output:

func (*ServerEndpointsClient) NewListBySyncGroupPager added in v0.4.0

func (client *ServerEndpointsClient) NewListBySyncGroupPager(resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *ServerEndpointsClientListBySyncGroupOptions) *runtime.Pager[ServerEndpointsClientListBySyncGroupResponse]

NewListBySyncGroupPager - Get a ServerEndpoint list.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • options - ServerEndpointsClientListBySyncGroupOptions contains the optional parameters for the ServerEndpointsClient.NewListBySyncGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_ListBySyncGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServerEndpointsClient().NewListBySyncGroupPager("SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", 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.ServerEndpointArray = armstoragesync.ServerEndpointArray{
		// 	Value: []*armstoragesync.ServerEndpoint{
		// 		{
		// 			Name: to.Ptr("SampleServerEndpoint_1"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints"),
		// 			ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/serverEndpoints/SampleServerEndpoint_1"),
		// 			Properties: &armstoragesync.ServerEndpointProperties{
		// 				CloudTiering: to.Ptr(armstoragesync.FeatureStatusOff),
		// 				FriendlyName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
		// 				InitialDownloadPolicy: to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
		// 				InitialUploadPolicy: to.Ptr(armstoragesync.InitialUploadPolicyMerge),
		// 				LastOperationName: to.Ptr("ICreateServerEndpointWorkflow"),
		// 				LastWorkflowID: to.Ptr("storageSyncServices/healthDemo1/workflows/569afb5c-7172-4cf8-a8ea-d987f727f11a"),
		// 				LocalCacheMode: to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
		// 				OfflineDataTransfer: to.Ptr(armstoragesync.FeatureStatusOn),
		// 				OfflineDataTransferShareName: to.Ptr("myfileshare"),
		// 				OfflineDataTransferStorageAccountResourceID: to.Ptr("/subscriptions/744f4d70-6d17-4921-8970-a765d14f763f/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/mysa"),
		// 				OfflineDataTransferStorageAccountTenantID: to.Ptr("72f988bf-86f1-41af-91ab-2d7cd011db47"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServerLocalPath: to.Ptr("D:\\SampleServerEndpoint_1"),
		// 				ServerName: to.Ptr("somemachine.redmond.corp.microsoft.com"),
		// 				ServerResourceID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/080d4133-bdb5-40a0-96a0-71a6057bfe9a"),
		// 				SyncStatus: &armstoragesync.ServerEndpointSyncStatus{
		// 					CombinedHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
		// 					DownloadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
		// 					DownloadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
		// 						LastSyncPerItemErrorCount: to.Ptr[int64](1000),
		// 						LastSyncResult: to.Ptr[int32](0),
		// 						LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
		// 						LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
		// 					},
		// 					LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					OfflineDataTransferStatus: to.Ptr(armstoragesync.ServerEndpointOfflineDataTransferStateComplete),
		// 					UploadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
		// 					UploadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
		// 						LastSyncPerItemErrorCount: to.Ptr[int64](0),
		// 						LastSyncResult: to.Ptr[int32](0),
		// 						LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 						LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					},
		// 				},
		// 				TierFilesOlderThanDays: to.Ptr[int32](0),
		// 				VolumeFreeSpacePercent: to.Ptr[int32](100),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SampleServerEndpoint_2"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints"),
		// 			ID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1/serverEndpoints/SampleServerEndpoint_2"),
		// 			Properties: &armstoragesync.ServerEndpointProperties{
		// 				CloudTiering: to.Ptr(armstoragesync.FeatureStatusOn),
		// 				CloudTieringStatus: &armstoragesync.ServerEndpointCloudTieringStatus{
		// 					CachePerformance: &armstoragesync.CloudTieringCachePerformance{
		// 						CacheHitBytes: to.Ptr[int64](922337203685477600),
		// 						CacheHitBytesPercent: to.Ptr[int32](50),
		// 						CacheMissBytes: to.Ptr[int64](922337203685477600),
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 					},
		// 					DatePolicyStatus: &armstoragesync.CloudTieringDatePolicyStatus{
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 						TieredFilesMostRecentAccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 					},
		// 					FilesNotTiering: &armstoragesync.CloudTieringFilesNotTiering{
		// 						Errors: []*armstoragesync.FilesNotTieringError{
		// 							{
		// 								ErrorCode: to.Ptr[int32](-2134347771),
		// 								FileCount: to.Ptr[int64](10),
		// 							},
		// 							{
		// 								ErrorCode: to.Ptr[int32](-2134347770),
		// 								FileCount: to.Ptr[int64](20),
		// 							},
		// 							{
		// 								ErrorCode: to.Ptr[int32](-2134347769),
		// 								FileCount: to.Ptr[int64](30),
		// 						}},
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 						TotalFileCount: to.Ptr[int64](60),
		// 					},
		// 					Health: to.Ptr(armstoragesync.ServerEndpointHealthStateError),
		// 					HealthLastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					LastCloudTieringResult: to.Ptr[int32](-2134347771),
		// 					LastSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					SpaceSavings: &armstoragesync.CloudTieringSpaceSavings{
		// 						CachedSizeBytes: to.Ptr[int64](50000000),
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 						SpaceSavingsBytes: to.Ptr[int64](50000000),
		// 						SpaceSavingsPercent: to.Ptr[int32](50),
		// 						TotalSizeCloudBytes: to.Ptr[int64](100000000),
		// 						VolumeSizeBytes: to.Ptr[int64](922337203685477600),
		// 					},
		// 					VolumeFreeSpacePolicyStatus: &armstoragesync.CloudTieringVolumeFreeSpacePolicyStatus{
		// 						CurrentVolumeFreeSpacePercent: to.Ptr[int32](5),
		// 						EffectiveVolumeFreeSpacePolicy: to.Ptr[int32](30),
		// 						LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
		// 					},
		// 				},
		// 				FriendlyName: to.Ptr("somemachine2.redmond.corp.microsoft.com"),
		// 				InitialDownloadPolicy: to.Ptr(armstoragesync.InitialDownloadPolicyNamespaceThenModifiedFiles),
		// 				InitialUploadPolicy: to.Ptr(armstoragesync.InitialUploadPolicyMerge),
		// 				LastOperationName: to.Ptr("ICreateServerEndpointWorkflow"),
		// 				LastWorkflowID: to.Ptr("storageSyncServices/healthDemo1/workflows/40b1dc00-d7d9-4721-a1e9-ab60139b830a"),
		// 				LocalCacheMode: to.Ptr(armstoragesync.LocalCacheModeUpdateLocallyCachedFiles),
		// 				OfflineDataTransfer: to.Ptr(armstoragesync.FeatureStatusOff),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				RecallStatus: &armstoragesync.ServerEndpointRecallStatus{
		// 					LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					RecallErrors: []*armstoragesync.ServerEndpointRecallError{
		// 						{
		// 							Count: to.Ptr[int64](5),
		// 							ErrorCode: to.Ptr[int32](-2134347775),
		// 						},
		// 						{
		// 							Count: to.Ptr[int64](10),
		// 							ErrorCode: to.Ptr[int32](-2134347774),
		// 						},
		// 						{
		// 							Count: to.Ptr[int64](15),
		// 							ErrorCode: to.Ptr[int32](-2134347773),
		// 					}},
		// 					TotalRecallErrorsCount: to.Ptr[int64](30),
		// 				},
		// 				ServerLocalPath: to.Ptr("D:\\SampleServerEndpoint_2"),
		// 				ServerName: to.Ptr("somemachine2.redmond.corp.microsoft.com"),
		// 				ServerResourceID: to.Ptr("/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/registeredServers/f94e2944-b48d-4e5b-bdc7-c48ab3712659"),
		// 				SyncStatus: &armstoragesync.ServerEndpointSyncStatus{
		// 					CombinedHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
		// 					DownloadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
		// 					DownloadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
		// 						LastSyncPerItemErrorCount: to.Ptr[int64](0),
		// 						LastSyncResult: to.Ptr[int32](0),
		// 						LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
		// 						LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
		// 					},
		// 					LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					OfflineDataTransferStatus: to.Ptr(armstoragesync.ServerEndpointOfflineDataTransferStateNotRunning),
		// 					SyncActivity: to.Ptr(armstoragesync.ServerEndpointSyncActivityStateUpload),
		// 					UploadActivity: &armstoragesync.ServerEndpointSyncActivityStatus{
		// 						AppliedBytes: to.Ptr[int64](57348983),
		// 						AppliedItemCount: to.Ptr[int64](1000),
		// 						PerItemErrorCount: to.Ptr[int64](300),
		// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 						TotalBytes: to.Ptr[int64](1958367412),
		// 						TotalItemCount: to.Ptr[int64](2300),
		// 					},
		// 					UploadHealth: to.Ptr(armstoragesync.ServerEndpointHealthStateHealthy),
		// 					UploadStatus: &armstoragesync.ServerEndpointSyncSessionStatus{
		// 						LastSyncPerItemErrorCount: to.Ptr[int64](0),
		// 						LastSyncResult: to.Ptr[int32](0),
		// 						LastSyncSuccessTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:28:33.921Z"); return t}()),
		// 						LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-11T23:32:51.105Z"); return t}()),
		// 					},
		// 				},
		// 				TierFilesOlderThanDays: to.Ptr[int32](5),
		// 				VolumeFreeSpacePercent: to.Ptr[int32](80),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ServerEndpointsClientBeginCreateOptions added in v0.2.0

type ServerEndpointsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServerEndpointsClientBeginCreateOptions contains the optional parameters for the ServerEndpointsClient.BeginCreate method.

type ServerEndpointsClientBeginDeleteOptions added in v0.2.0

type ServerEndpointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServerEndpointsClientBeginDeleteOptions contains the optional parameters for the ServerEndpointsClient.BeginDelete method.

type ServerEndpointsClientBeginRecallActionOptions added in v0.2.0

type ServerEndpointsClientBeginRecallActionOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServerEndpointsClientBeginRecallActionOptions contains the optional parameters for the ServerEndpointsClient.BeginRecallAction method.

type ServerEndpointsClientBeginUpdateOptions added in v0.2.0

type ServerEndpointsClientBeginUpdateOptions struct {
	// Any of the properties applicable in PUT request.
	Parameters *ServerEndpointUpdateParameters

	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServerEndpointsClientBeginUpdateOptions contains the optional parameters for the ServerEndpointsClient.BeginUpdate method.

type ServerEndpointsClientCreateResponse added in v0.2.0

type ServerEndpointsClientCreateResponse struct {
	// Server Endpoint object.
	ServerEndpoint
}

ServerEndpointsClientCreateResponse contains the response from method ServerEndpointsClient.BeginCreate.

type ServerEndpointsClientDeleteResponse added in v0.2.0

type ServerEndpointsClientDeleteResponse struct {
}

ServerEndpointsClientDeleteResponse contains the response from method ServerEndpointsClient.BeginDelete.

type ServerEndpointsClientGetOptions added in v0.2.0

type ServerEndpointsClientGetOptions struct {
}

ServerEndpointsClientGetOptions contains the optional parameters for the ServerEndpointsClient.Get method.

type ServerEndpointsClientGetResponse added in v0.2.0

type ServerEndpointsClientGetResponse struct {
	// Server Endpoint object.
	ServerEndpoint

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

ServerEndpointsClientGetResponse contains the response from method ServerEndpointsClient.Get.

type ServerEndpointsClientListBySyncGroupOptions added in v0.2.0

type ServerEndpointsClientListBySyncGroupOptions struct {
}

ServerEndpointsClientListBySyncGroupOptions contains the optional parameters for the ServerEndpointsClient.NewListBySyncGroupPager method.

type ServerEndpointsClientListBySyncGroupResponse added in v0.2.0

type ServerEndpointsClientListBySyncGroupResponse struct {
	// Array of ServerEndpoint
	ServerEndpointArray

	// Location contains the information returned from the Location header response.
	Location *string

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

ServerEndpointsClientListBySyncGroupResponse contains the response from method ServerEndpointsClient.NewListBySyncGroupPager.

type ServerEndpointsClientRecallActionResponse added in v0.2.0

type ServerEndpointsClientRecallActionResponse struct {
}

ServerEndpointsClientRecallActionResponse contains the response from method ServerEndpointsClient.BeginRecallAction.

type ServerEndpointsClientUpdateResponse added in v0.2.0

type ServerEndpointsClientUpdateResponse struct {
	// Server Endpoint object.
	ServerEndpoint
}

ServerEndpointsClientUpdateResponse contains the response from method ServerEndpointsClient.BeginUpdate.

type Service added in v0.2.0

type Service struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Storage Sync Service properties.
	Properties *ServiceProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Service - Storage Sync Service object.

func (Service) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type Service.

func (*Service) UnmarshalJSON added in v1.1.0

func (s *Service) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Service.

type ServiceArray added in v0.2.0

type ServiceArray struct {
	// Collection of StorageSyncServices.
	Value []*Service
}

ServiceArray - Array of StorageSyncServices

func (ServiceArray) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceArray.

func (*ServiceArray) UnmarshalJSON added in v1.1.0

func (s *ServiceArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceArray.

type ServiceCreateParameters added in v0.2.0

type ServiceCreateParameters struct {
	// REQUIRED; Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo
	// Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource
	// cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.
	Location *string

	// The parameters used to create the storage sync service.
	Properties *ServiceCreateParametersProperties

	// Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this
	// resource (across resource groups). A maximum of 15 tags can be provided for a
	// resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than
	// 256 characters.
	Tags map[string]*string
}

ServiceCreateParameters - The parameters used when creating a storage sync service.

func (ServiceCreateParameters) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceCreateParameters.

func (*ServiceCreateParameters) UnmarshalJSON added in v1.1.0

func (s *ServiceCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCreateParameters.

type ServiceCreateParametersProperties added in v0.2.0

type ServiceCreateParametersProperties struct {
	// Incoming Traffic Policy
	IncomingTrafficPolicy *IncomingTrafficPolicy
}

ServiceCreateParametersProperties - StorageSyncService Properties object.

func (ServiceCreateParametersProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceCreateParametersProperties.

func (*ServiceCreateParametersProperties) UnmarshalJSON added in v1.1.0

func (s *ServiceCreateParametersProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCreateParametersProperties.

type ServiceProperties added in v0.2.0

type ServiceProperties struct {
	// Incoming Traffic Policy
	IncomingTrafficPolicy *IncomingTrafficPolicy

	// READ-ONLY; Resource Last Operation Name
	LastOperationName *string

	// READ-ONLY; StorageSyncService lastWorkflowId
	LastWorkflowID *string

	// READ-ONLY; List of private endpoint connection associated with the specified storage sync service
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; StorageSyncService Provisioning State
	ProvisioningState *string

	// READ-ONLY; Storage Sync service status.
	StorageSyncServiceStatus *int32

	// READ-ONLY; Storage Sync service Uid
	StorageSyncServiceUID *string
}

ServiceProperties - Storage Sync Service Properties object.

func (ServiceProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceProperties.

func (*ServiceProperties) UnmarshalJSON added in v1.1.0

func (s *ServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.

type ServiceUpdateParameters added in v0.2.0

type ServiceUpdateParameters struct {
	// The properties of the server endpoint.
	Properties *ServiceUpdateProperties

	// The user-specified tags associated with the storage sync service.
	Tags map[string]*string
}

ServiceUpdateParameters - Parameters for updating an Storage sync service.

func (ServiceUpdateParameters) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateParameters.

func (*ServiceUpdateParameters) UnmarshalJSON added in v1.1.0

func (s *ServiceUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateParameters.

type ServiceUpdateProperties added in v0.2.0

type ServiceUpdateProperties struct {
	// Incoming Traffic Policy
	IncomingTrafficPolicy *IncomingTrafficPolicy
}

ServiceUpdateProperties - StorageSyncService Properties object.

func (ServiceUpdateProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties.

func (*ServiceUpdateProperties) UnmarshalJSON added in v1.1.0

func (s *ServiceUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties.

type ServicesClient added in v0.2.0

type ServicesClient struct {
	// contains filtered or unexported fields
}

ServicesClient contains the methods for the StorageSyncServices group. Don't use this type directly, use NewServicesClient() instead.

func NewServicesClient added in v0.2.0

func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)

NewServicesClient creates a new instance of ServicesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ServicesClient) BeginCreate added in v0.2.0

func (client *ServicesClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, parameters ServiceCreateParameters, options *ServicesClientBeginCreateOptions) (*runtime.Poller[ServicesClientCreateResponse], error)

BeginCreate - Create a new StorageSyncService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • parameters - Storage Sync Service resource name.
  • options - ServicesClientBeginCreateOptions contains the optional parameters for the ServicesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginCreate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", armstoragesync.ServiceCreateParameters{
		Location: to.Ptr("WestUS"),
		Properties: &armstoragesync.ServiceCreateParametersProperties{
			IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		},
		Tags: map[string]*string{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Service = armstoragesync.Service{
	// 	Name: to.Ptr("SampleStorageSyncService_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1"),
	// 	Location: to.Ptr("WestUS"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armstoragesync.ServiceProperties{
	// 		IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
	// 	},
	// }
}
Output:

func (*ServicesClient) BeginDelete added in v0.2.0

func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error)

BeginDelete - Delete a given StorageSyncService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginDelete(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ServicesClient) BeginUpdate added in v0.2.0

func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error)

BeginUpdate - Patch a given StorageSyncService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginUpdate(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", &armstoragesync.ServicesClientBeginUpdateOptions{Parameters: &armstoragesync.ServiceUpdateParameters{
		Properties: &armstoragesync.ServiceUpdateProperties{
			IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		},
		Tags: map[string]*string{
			"Dept":        to.Ptr("IT"),
			"Environment": to.Ptr("Test"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Service = armstoragesync.Service{
	// 	Name: to.Ptr("SampleStorageSyncService_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1"),
	// 	Location: to.Ptr("WestUS"),
	// 	Tags: map[string]*string{
	// 		"Dept": to.Ptr("IT"),
	// 		"Environment": to.Ptr("Test"),
	// 	},
	// 	Properties: &armstoragesync.ServiceProperties{
	// 		IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
	// 	},
	// }
}
Output:

func (*ServicesClient) CheckNameAvailability added in v0.2.0

CheckNameAvailability - Check the give namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • locationName - The desired region for the name check.
  • parameters - Parameters to check availability of the given namespace name
  • options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.
Example (StorageSyncServiceCheckNameAvailabilityAlreadyExists)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServiceCheckNameAvailability_AlreadyExists.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().CheckNameAvailability(ctx, "westus", armstoragesync.CheckNameAvailabilityParameters{
		Name: to.Ptr("newstoragesyncservicename"),
		Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
	}, 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.CheckNameAvailabilityResult = armstoragesync.CheckNameAvailabilityResult{
	// 	Message: to.Ptr("An account named 'newstoragesyncservicename' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armstoragesync.NameAvailabilityReasonAlreadyExists),
	// }
}
Output:

Example (StorageSyncServiceCheckNameAvailabilityAvailable)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServiceCheckNameAvailability_Available.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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().CheckNameAvailability(ctx, "westus", armstoragesync.CheckNameAvailabilityParameters{
		Name: to.Ptr("newstoragesyncservicename"),
		Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
	}, 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.CheckNameAvailabilityResult = armstoragesync.CheckNameAvailabilityResult{
	// 	NameAvailable: to.Ptr(true),
	// }
}
Output:

func (*ServicesClient) Get added in v0.2.0

func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)

Get - Get a given StorageSyncService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", 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.Service = armstoragesync.Service{
	// 	Name: to.Ptr("SampleStorageSyncService_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1"),
	// 	Location: to.Ptr("WestUS"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armstoragesync.ServiceProperties{
	// 		IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
	// 		PrivateEndpointConnections: []*armstoragesync.PrivateEndpointConnection{
	// 			{
	// 				ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/{resource}/{resourceName}/privateEndpointConnections/SampleStorageSyncService_1.cd99f12ba6f3483f9292229e4f822258"),
	// 				Properties: &armstoragesync.PrivateEndpointConnectionProperties{
	// 					PrivateEndpoint: &armstoragesync.PrivateEndpoint{
	// 						ID: to.Ptr("subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/resourceGroups/SampleResourceGroup_2/providers/Microsoft.Network/privateEndpoints/testpe01"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{
	// 						Description: to.Ptr("Please approve my request, thanks."),
	// 						Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusPending),
	// 					},
	// 				},
	// 		}},
	// 		StorageSyncServiceStatus: to.Ptr[int32](0),
	// 		StorageSyncServiceUID: to.Ptr("\"2de01144-72da-4d7f-9d0c-e858855114a8\""),
	// 	},
	// }
}
Output:

func (*ServicesClient) NewListByResourceGroupPager added in v0.4.0

func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Get a StorageSyncService list by Resource group name.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServicesClient().NewListByResourceGroupPager("SampleResourceGroup_1", 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.ServiceArray = armstoragesync.ServiceArray{
		// 	Value: []*armstoragesync.Service{
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_1"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"3d1bf292-0f2a-4cc1-a3e1-60f35800e40c\""),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_2"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_2"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"2de01144-72da-4d7f-9d0c-e858855114a8\""),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_3"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_3"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"b2c58ee5-933e-462c-8a9e-b30f2bdd8fa3\""),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ServicesClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Get a StorageSyncService list by subscription.

Generated from API version 2020-09-01

  • options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServicesClient().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.ServiceArray = armstoragesync.ServiceArray{
		// 	Value: []*armstoragesync.Service{
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_1"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"3d1bf292-0f2a-4cc1-a3e1-60f35800e40c\""),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_2"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_2"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"2de01144-72da-4d7f-9d0c-e858855114a8\""),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SampleStorageSyncService_3"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_3"),
		// 			Location: to.Ptr("WestUS"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armstoragesync.ServiceProperties{
		// 				IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic),
		// 				StorageSyncServiceStatus: to.Ptr[int32](0),
		// 				StorageSyncServiceUID: to.Ptr("\"b2c58ee5-933e-462c-8a9e-b30f2bdd8fa3\""),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ServicesClientBeginCreateOptions added in v0.2.0

type ServicesClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginCreateOptions contains the optional parameters for the ServicesClient.BeginCreate method.

type ServicesClientBeginDeleteOptions added in v0.2.0

type ServicesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.

type ServicesClientBeginUpdateOptions added in v0.2.0

type ServicesClientBeginUpdateOptions struct {
	// Storage Sync Service resource.
	Parameters *ServiceUpdateParameters

	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.

type ServicesClientCheckNameAvailabilityOptions added in v0.2.0

type ServicesClientCheckNameAvailabilityOptions struct {
}

ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.

type ServicesClientCheckNameAvailabilityResponse added in v0.2.0

type ServicesClientCheckNameAvailabilityResponse struct {
	// The CheckNameAvailability operation response.
	CheckNameAvailabilityResult
}

ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability.

type ServicesClientCreateResponse added in v0.2.0

type ServicesClientCreateResponse struct {
	// Storage Sync Service object.
	Service
}

ServicesClientCreateResponse contains the response from method ServicesClient.BeginCreate.

type ServicesClientDeleteResponse added in v0.2.0

type ServicesClientDeleteResponse struct {
}

ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete.

type ServicesClientGetOptions added in v0.2.0

type ServicesClientGetOptions struct {
}

ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.

type ServicesClientGetResponse added in v0.2.0

type ServicesClientGetResponse struct {
	// Storage Sync Service object.
	Service

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

ServicesClientGetResponse contains the response from method ServicesClient.Get.

type ServicesClientListByResourceGroupOptions added in v0.2.0

type ServicesClientListByResourceGroupOptions struct {
}

ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager method.

type ServicesClientListByResourceGroupResponse added in v0.2.0

type ServicesClientListByResourceGroupResponse struct {
	// Array of StorageSyncServices
	ServiceArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

ServicesClientListByResourceGroupResponse contains the response from method ServicesClient.NewListByResourceGroupPager.

type ServicesClientListBySubscriptionOptions added in v0.2.0

type ServicesClientListBySubscriptionOptions struct {
}

ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.

type ServicesClientListBySubscriptionResponse added in v0.2.0

type ServicesClientListBySubscriptionResponse struct {
	// Array of StorageSyncServices
	ServiceArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager.

type ServicesClientUpdateResponse added in v0.2.0

type ServicesClientUpdateResponse struct {
	// Storage Sync Service object.
	Service
}

ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate.

type SubscriptionState

type SubscriptionState struct {
	// Subscription state properties.
	Properties any

	// State of Azure Subscription
	State *Reason

	// READ-ONLY; Is Transitioning
	Istransitioning *bool
}

SubscriptionState - Subscription State object.

func (SubscriptionState) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SubscriptionState.

func (*SubscriptionState) UnmarshalJSON added in v1.1.0

func (s *SubscriptionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionState.

type SyncGroup

type SyncGroup struct {
	// SyncGroup properties.
	Properties *SyncGroupProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SyncGroup - Sync Group object.

func (SyncGroup) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SyncGroup.

func (*SyncGroup) UnmarshalJSON added in v1.1.0

func (s *SyncGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroup.

type SyncGroupArray

type SyncGroupArray struct {
	// Collection of SyncGroup.
	Value []*SyncGroup
}

SyncGroupArray - Array of SyncGroup

func (SyncGroupArray) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SyncGroupArray.

func (*SyncGroupArray) UnmarshalJSON added in v1.1.0

func (s *SyncGroupArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupArray.

type SyncGroupCreateParameters

type SyncGroupCreateParameters struct {
	// The parameters used to create the sync group
	Properties any

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SyncGroupCreateParameters - The parameters used when creating a sync group.

func (SyncGroupCreateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SyncGroupCreateParameters.

func (*SyncGroupCreateParameters) UnmarshalJSON added in v1.1.0

func (s *SyncGroupCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupCreateParameters.

type SyncGroupProperties

type SyncGroupProperties struct {
	// READ-ONLY; Sync group status
	SyncGroupStatus *string

	// READ-ONLY; Unique Id
	UniqueID *string
}

SyncGroupProperties - SyncGroup Properties object.

func (SyncGroupProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SyncGroupProperties.

func (*SyncGroupProperties) UnmarshalJSON added in v1.1.0

func (s *SyncGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupProperties.

type SyncGroupsClient

type SyncGroupsClient struct {
	// contains filtered or unexported fields
}

SyncGroupsClient contains the methods for the SyncGroups group. Don't use this type directly, use NewSyncGroupsClient() instead.

func NewSyncGroupsClient

func NewSyncGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncGroupsClient, error)

NewSyncGroupsClient creates a new instance of SyncGroupsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SyncGroupsClient) Create

func (client *SyncGroupsClient) Create(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, parameters SyncGroupCreateParameters, options *SyncGroupsClientCreateOptions) (SyncGroupsClientCreateResponse, error)

Create - Create a new SyncGroup. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • parameters - Sync Group Body
  • options - SyncGroupsClientCreateOptions contains the optional parameters for the SyncGroupsClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/SyncGroups_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncGroupsClient().Create(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", armstoragesync.SyncGroupCreateParameters{
		Properties: map[string]any{},
	}, 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.SyncGroup = armstoragesync.SyncGroup{
	// 	Name: to.Ptr("SampleSyncGroup_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/syncGroups/SampleSyncGroup_1"),
	// 	Properties: &armstoragesync.SyncGroupProperties{
	// 		UniqueID: to.Ptr("7868e4ee-8ddd-4a2d-941b-0041f6052a8a"),
	// 	},
	// }
}
Output:

func (*SyncGroupsClient) Delete

func (client *SyncGroupsClient) Delete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *SyncGroupsClientDeleteOptions) (SyncGroupsClientDeleteResponse, error)

Delete - Delete a given SyncGroup. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • options - SyncGroupsClientDeleteOptions contains the optional parameters for the SyncGroupsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/SyncGroups_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSyncGroupsClient().Delete(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SyncGroupsClient) Get

func (client *SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *SyncGroupsClientGetOptions) (SyncGroupsClientGetResponse, error)

Get - Get a given SyncGroup. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • syncGroupName - Name of Sync Group resource.
  • options - SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/SyncGroups_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSyncGroupsClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "SampleSyncGroup_1", 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.SyncGroup = armstoragesync.SyncGroup{
	// 	Name: to.Ptr("SampleSyncGroup_1"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SSS_Restore_08-08_Test112/syncGroups/SampleSyncGroup_1"),
	// 	Properties: &armstoragesync.SyncGroupProperties{
	// 		SyncGroupStatus: to.Ptr("0"),
	// 		UniqueID: to.Ptr("191660cd-6a1a-4f8c-9787-a6bed206a1dd"),
	// 	},
	// }
}
Output:

func (*SyncGroupsClient) NewListByStorageSyncServicePager added in v0.4.0

func (client *SyncGroupsClient) NewListByStorageSyncServicePager(resourceGroupName string, storageSyncServiceName string, options *SyncGroupsClientListByStorageSyncServiceOptions) *runtime.Pager[SyncGroupsClientListByStorageSyncServiceResponse]

NewListByStorageSyncServicePager - Get a SyncGroup List.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - SyncGroupsClientListByStorageSyncServiceOptions contains the optional parameters for the SyncGroupsClient.NewListByStorageSyncServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/SyncGroups_ListByStorageSyncService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSyncGroupsClient().NewListByStorageSyncServicePager("SampleResourceGroup_1", "SampleStorageSyncService_1", 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.SyncGroupArray = armstoragesync.SyncGroupArray{
		// 	Value: []*armstoragesync.SyncGroup{
		// 		{
		// 			Name: to.Ptr("SampleSyncGroup_1"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/syncGroups"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SSS_Restore_08-08_Test112/syncGroups/SampleSyncGroup_1"),
		// 			Properties: &armstoragesync.SyncGroupProperties{
		// 				SyncGroupStatus: to.Ptr("0"),
		// 				UniqueID: to.Ptr("191660cd-6a1a-4f8c-9787-a6bed206a1dd"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SyncGroupsClientCreateOptions added in v0.2.0

type SyncGroupsClientCreateOptions struct {
}

SyncGroupsClientCreateOptions contains the optional parameters for the SyncGroupsClient.Create method.

type SyncGroupsClientCreateResponse added in v0.2.0

type SyncGroupsClientCreateResponse struct {
	// Sync Group object.
	SyncGroup

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

SyncGroupsClientCreateResponse contains the response from method SyncGroupsClient.Create.

type SyncGroupsClientDeleteOptions added in v0.2.0

type SyncGroupsClientDeleteOptions struct {
}

SyncGroupsClientDeleteOptions contains the optional parameters for the SyncGroupsClient.Delete method.

type SyncGroupsClientDeleteResponse added in v0.2.0

type SyncGroupsClientDeleteResponse struct {
	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

SyncGroupsClientDeleteResponse contains the response from method SyncGroupsClient.Delete.

type SyncGroupsClientGetOptions added in v0.2.0

type SyncGroupsClientGetOptions struct {
}

SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.

type SyncGroupsClientGetResponse added in v0.2.0

type SyncGroupsClientGetResponse struct {
	// Sync Group object.
	SyncGroup

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

SyncGroupsClientGetResponse contains the response from method SyncGroupsClient.Get.

type SyncGroupsClientListByStorageSyncServiceOptions added in v0.2.0

type SyncGroupsClientListByStorageSyncServiceOptions struct {
}

SyncGroupsClientListByStorageSyncServiceOptions contains the optional parameters for the SyncGroupsClient.NewListByStorageSyncServicePager method.

type SyncGroupsClientListByStorageSyncServiceResponse added in v0.2.0

type SyncGroupsClientListByStorageSyncServiceResponse struct {
	// Array of SyncGroup
	SyncGroupArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

SyncGroupsClientListByStorageSyncServiceResponse contains the response from method SyncGroupsClient.NewListByStorageSyncServicePager.

type SystemData added in v0.3.0

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v0.3.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

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 resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TriggerChangeDetectionParameters

type TriggerChangeDetectionParameters struct {
	// Change Detection Mode. Applies to a directory specified in directoryPath parameter.
	ChangeDetectionMode *ChangeDetectionMode

	// Relative path to a directory Azure File share for which change detection is to be performed.
	DirectoryPath *string

	// Array of relative paths on the Azure File share to be included in the change detection. Can be files and directories.
	Paths []*string
}

TriggerChangeDetectionParameters - The parameters used when calling trigger change detection action on cloud endpoint.

func (TriggerChangeDetectionParameters) MarshalJSON

func (t TriggerChangeDetectionParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggerChangeDetectionParameters.

func (*TriggerChangeDetectionParameters) UnmarshalJSON added in v1.1.0

func (t *TriggerChangeDetectionParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerChangeDetectionParameters.

type TriggerRolloverRequest

type TriggerRolloverRequest struct {
	// Certificate Data
	ServerCertificate *string
}

TriggerRolloverRequest - Trigger Rollover Request.

func (TriggerRolloverRequest) MarshalJSON added in v1.1.0

func (t TriggerRolloverRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggerRolloverRequest.

func (*TriggerRolloverRequest) UnmarshalJSON added in v1.1.0

func (t *TriggerRolloverRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggerRolloverRequest.

type Workflow

type Workflow struct {
	// Workflow properties.
	Properties *WorkflowProperties

	// READ-ONLY; Fully qualified resource ID 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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Workflow resource.

func (Workflow) MarshalJSON

func (w Workflow) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Workflow.

func (*Workflow) UnmarshalJSON added in v1.1.0

func (w *Workflow) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Workflow.

type WorkflowArray

type WorkflowArray struct {
	// Collection of workflow items.
	Value []*Workflow
}

WorkflowArray - Array of Workflow

func (WorkflowArray) MarshalJSON

func (w WorkflowArray) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkflowArray.

func (*WorkflowArray) UnmarshalJSON added in v1.1.0

func (w *WorkflowArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowArray.

type WorkflowProperties

type WorkflowProperties struct {
	// workflow last operation identifier.
	LastOperationID *string

	// last step name
	LastStepName *string

	// operation direction.
	Operation *OperationDirection

	// workflow status.
	Status *WorkflowStatus

	// workflow steps
	Steps *string

	// READ-ONLY; workflow command name.
	CommandName *string

	// READ-ONLY; workflow created timestamp.
	CreatedTimestamp *time.Time

	// READ-ONLY; workflow last status timestamp.
	LastStatusTimestamp *time.Time
}

WorkflowProperties - Workflow Properties object.

func (WorkflowProperties) MarshalJSON

func (w WorkflowProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkflowProperties.

func (*WorkflowProperties) UnmarshalJSON

func (w *WorkflowProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowProperties.

type WorkflowStatus

type WorkflowStatus string

WorkflowStatus - Type of the Workflow Status

const (
	WorkflowStatusAborted   WorkflowStatus = "aborted"
	WorkflowStatusActive    WorkflowStatus = "active"
	WorkflowStatusExpired   WorkflowStatus = "expired"
	WorkflowStatusFailed    WorkflowStatus = "failed"
	WorkflowStatusSucceeded WorkflowStatus = "succeeded"
)

func PossibleWorkflowStatusValues

func PossibleWorkflowStatusValues() []WorkflowStatus

PossibleWorkflowStatusValues returns the possible values for the WorkflowStatus const type.

type WorkflowsClient

type WorkflowsClient struct {
	// contains filtered or unexported fields
}

WorkflowsClient contains the methods for the Workflows group. Don't use this type directly, use NewWorkflowsClient() instead.

func NewWorkflowsClient

func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowsClient, error)

NewWorkflowsClient creates a new instance of WorkflowsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*WorkflowsClient) Abort

func (client *WorkflowsClient) Abort(ctx context.Context, resourceGroupName string, storageSyncServiceName string, workflowID string, options *WorkflowsClientAbortOptions) (WorkflowsClientAbortResponse, error)

Abort - Abort the given workflow. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • workflowID - workflow Id
  • options - WorkflowsClientAbortOptions contains the optional parameters for the WorkflowsClient.Abort method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/Workflows_Abort.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWorkflowsClient().Abort(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "7ffd50b3-5574-478d-9ff2-9371bc42ce68", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkflowsClient) Get

func (client *WorkflowsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, workflowID string, options *WorkflowsClientGetOptions) (WorkflowsClientGetResponse, error)

Get - Get Workflows resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • workflowID - workflow Id
  • options - WorkflowsClientGetOptions contains the optional parameters for the WorkflowsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/Workflows_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/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkflowsClient().Get(ctx, "SampleResourceGroup_1", "SampleStorageSyncService_1", "828219ea-083e-48b5-89ea-8fd9991b2e75", 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.Workflow = armstoragesync.Workflow{
	// 	Name: to.Ptr("828219ea-083e-48b5-89ea-8fd9991b2e75"),
	// 	Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/workflows"),
	// 	ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/workflows/828219ea-083e-48b5-89ea-8fd9991b2e75"),
	// 	Properties: &armstoragesync.WorkflowProperties{
	// 		CommandName: to.Ptr("ICreateServerEndpointWorkflow"),
	// 		CreatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 		LastOperationID: to.Ptr("\"fe680c98-5725-49c8-b0dc-5e29745f752b\""),
	// 		LastStatusTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-17T19:04:59.195Z"); return t}()),
	// 		LastStepName: to.Ptr("runServerJob"),
	// 		Operation: to.Ptr(armstoragesync.OperationDirectionDo),
	// 		Status: to.Ptr(armstoragesync.WorkflowStatusSucceeded),
	// 		Steps: to.Ptr("[{\"name\":\"validateInput\",\"friendlyName\":\"validateInput\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"newServerEndpoint\",\"friendlyName\":\"newServerEndpoint\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"updateReplicaGroupCertificates\",\"friendlyName\":\"updateReplicaGroupCertificates\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"runServerJob\",\"friendlyName\":\"runServerJob\",\"status\":\"Succeeded\",\"error\":null}]"),
	// 	},
	// }
}
Output:

func (*WorkflowsClient) NewListByStorageSyncServicePager added in v0.4.0

func (client *WorkflowsClient) NewListByStorageSyncServicePager(resourceGroupName string, storageSyncServiceName string, options *WorkflowsClientListByStorageSyncServiceOptions) *runtime.Pager[WorkflowsClientListByStorageSyncServiceResponse]

NewListByStorageSyncServicePager - Get a Workflow List

Generated from API version 2020-09-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageSyncServiceName - Name of Storage Sync Service resource.
  • options - WorkflowsClientListByStorageSyncServiceOptions contains the optional parameters for the WorkflowsClient.NewListByStorageSyncServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/Workflows_ListByStorageSyncService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagesync/armstoragesync"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstoragesync.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkflowsClient().NewListByStorageSyncServicePager("SampleResourceGroup_1", "SampleStorageSyncService_1", 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.WorkflowArray = armstoragesync.WorkflowArray{
		// 	Value: []*armstoragesync.Workflow{
		// 		{
		// 			Name: to.Ptr("828219ea-083e-48b5-89ea-8fd9991b2e75"),
		// 			Type: to.Ptr("Microsoft.StorageSync/storageSyncServices/workflows"),
		// 			ID: to.Ptr("/subscriptions/3a048283-338f-4002-a9dd-a50fdadcb392/resourceGroups/SampleResourceGroup_1/providers/Microsoft.StorageSync/storageSyncServices/SampleStorageSyncService_1/workflows/828219ea-083e-48b5-89ea-8fd9991b2e75"),
		// 			Properties: &armstoragesync.WorkflowProperties{
		// 				LastOperationID: to.Ptr("\"fe680c98-5725-49c8-b0dc-5e29745f752b\""),
		// 				LastStepName: to.Ptr("runServerJob"),
		// 				Operation: to.Ptr(armstoragesync.OperationDirectionDo),
		// 				Status: to.Ptr(armstoragesync.WorkflowStatusSucceeded),
		// 				Steps: to.Ptr("[{\"name\":\"validateInput\",\"friendlyName\":\"validateInput\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"newServerEndpoint\",\"friendlyName\":\"newServerEndpoint\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"updateReplicaGroupCertificates\",\"friendlyName\":\"updateReplicaGroupCertificates\",\"status\":\"Succeeded\",\"error\":null},{\"name\":\"runServerJob\",\"friendlyName\":\"runServerJob\",\"status\":\"Succeeded\",\"error\":null}]"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type WorkflowsClientAbortOptions added in v0.2.0

type WorkflowsClientAbortOptions struct {
}

WorkflowsClientAbortOptions contains the optional parameters for the WorkflowsClient.Abort method.

type WorkflowsClientAbortResponse added in v0.2.0

type WorkflowsClientAbortResponse struct {
	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

WorkflowsClientAbortResponse contains the response from method WorkflowsClient.Abort.

type WorkflowsClientGetOptions added in v0.2.0

type WorkflowsClientGetOptions struct {
}

WorkflowsClientGetOptions contains the optional parameters for the WorkflowsClient.Get method.

type WorkflowsClientGetResponse added in v0.2.0

type WorkflowsClientGetResponse struct {
	// Workflow resource.
	Workflow

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

WorkflowsClientGetResponse contains the response from method WorkflowsClient.Get.

type WorkflowsClientListByStorageSyncServiceOptions added in v0.2.0

type WorkflowsClientListByStorageSyncServiceOptions struct {
}

WorkflowsClientListByStorageSyncServiceOptions contains the optional parameters for the WorkflowsClient.NewListByStorageSyncServicePager method.

type WorkflowsClientListByStorageSyncServiceResponse added in v0.2.0

type WorkflowsClientListByStorageSyncServiceResponse struct {
	// Array of Workflow
	WorkflowArray

	// XMSCorrelationRequestID contains the information returned from the x-ms-correlation-request-id header response.
	XMSCorrelationRequestID *string

	// XMSRequestID contains the information returned from the x-ms-request-id header response.
	XMSRequestID *string
}

WorkflowsClientListByStorageSyncServiceResponse contains the response from method WorkflowsClient.NewListByStorageSyncServicePager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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