Documentation ¶
Index ¶
- type APIError
- type BackupRequest
- type ChangeDetectionMode
- type CheckNameAvailabilityParameters
- type CheckNameAvailabilityResult
- type CloudEndpoint
- type CloudEndpointArray
- type CloudEndpointChangeEnumerationActivity
- type CloudEndpointChangeEnumerationActivityState
- type CloudEndpointChangeEnumerationStatus
- type CloudEndpointChangeEnumerationTotalCountsState
- type CloudEndpointCreateParameters
- type CloudEndpointCreateParametersProperties
- type CloudEndpointLastChangeEnumerationStatus
- type CloudEndpointProperties
- type CloudEndpointsClient
- func (client *CloudEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientCreateResponse], error)
- func (client *CloudEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientDeleteResponse], error)
- func (client *CloudEndpointsClient) BeginPostBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientPostBackupResponse], error)
- func (client *CloudEndpointsClient) BeginPostRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientPostRestoreResponse], error)
- func (client *CloudEndpointsClient) BeginPreBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientPreBackupResponse], error)
- func (client *CloudEndpointsClient) BeginPreRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientPreRestoreResponse], error)
- func (client *CloudEndpointsClient) BeginTriggerChangeDetection(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[CloudEndpointsClientTriggerChangeDetectionResponse], error)
- func (client *CloudEndpointsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (CloudEndpointsClientGetResponse, error)
- func (client *CloudEndpointsClient) ListBySyncGroup(resourceGroupName string, storageSyncServiceName string, syncGroupName string, ...) *runtime.Pager[CloudEndpointsClientListBySyncGroupResponse]
- func (client *CloudEndpointsClient) Restoreheartbeat(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (CloudEndpointsClientRestoreheartbeatResponse, error)
- type CloudEndpointsClientBeginCreateOptions
- type CloudEndpointsClientBeginDeleteOptions
- type CloudEndpointsClientBeginPostBackupOptions
- type CloudEndpointsClientBeginPostRestoreOptions
- type CloudEndpointsClientBeginPreBackupOptions
- type CloudEndpointsClientBeginPreRestoreOptions
- type CloudEndpointsClientBeginTriggerChangeDetectionOptions
- type CloudEndpointsClientCreateResponse
- type CloudEndpointsClientDeleteResponse
- type CloudEndpointsClientGetOptions
- type CloudEndpointsClientGetResponse
- type CloudEndpointsClientListBySyncGroupOptions
- type CloudEndpointsClientListBySyncGroupResponse
- type CloudEndpointsClientPostBackupResponse
- type CloudEndpointsClientPostRestoreResponse
- type CloudEndpointsClientPreBackupResponse
- type CloudEndpointsClientPreRestoreResponse
- type CloudEndpointsClientRestoreheartbeatOptions
- type CloudEndpointsClientRestoreheartbeatResponse
- type CloudEndpointsClientTriggerChangeDetectionResponse
- type CloudTieringCachePerformance
- type CloudTieringDatePolicyStatus
- type CloudTieringFilesNotTiering
- type CloudTieringSpaceSavings
- type CloudTieringVolumeFreeSpacePolicyStatus
- type CreatedByType
- type Error
- type ErrorDetails
- type FeatureStatus
- type FilesNotTieringError
- type IncomingTrafficPolicy
- type InitialDownloadPolicy
- type InitialUploadPolicy
- type InnerErrorDetails
- type LocalCacheMode
- type LocationOperationStatus
- type MicrosoftStorageSyncClient
- type MicrosoftStorageSyncClientLocationOperationStatusOptions
- type MicrosoftStorageSyncClientLocationOperationStatusResponse
- type NameAvailabilityReason
- type OperationDirection
- type OperationDisplayInfo
- type OperationDisplayResource
- type OperationEntity
- type OperationEntityListResult
- type OperationProperties
- type OperationResourceMetricSpecification
- type OperationResourceMetricSpecificationDimension
- type OperationResourceServiceSpecification
- type OperationStatus
- type OperationStatusClient
- type OperationStatusClientGetOptions
- type OperationStatusClientGetResponse
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PostBackupResponse
- type PostBackupResponseProperties
- type PostRestoreRequest
- type PreRestoreRequest
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[PrivateEndpointConnectionsClientCreateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, ...) ...
- type PrivateEndpointConnectionsClientBeginCreateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByStorageSyncServiceOptions
- type PrivateEndpointConnectionsClientListByStorageSyncServiceResponse
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- type PrivateLinkResourcesClientListByStorageSyncServiceOptions
- type PrivateLinkResourcesClientListByStorageSyncServiceResponse
- type PrivateLinkServiceConnectionState
- type ProgressType
- type ProxyResource
- type Reason
- type RecallActionParameters
- type RegisteredServer
- type RegisteredServerAgentVersionStatus
- type RegisteredServerArray
- type RegisteredServerCreateParameters
- type RegisteredServerCreateParametersProperties
- type RegisteredServerProperties
- type RegisteredServersClient
- func (client *RegisteredServersClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[RegisteredServersClientCreateResponse], error)
- func (client *RegisteredServersClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[RegisteredServersClientDeleteResponse], error)
- func (client *RegisteredServersClient) BeginTriggerRollover(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[RegisteredServersClientTriggerRolloverResponse], error)
- func (client *RegisteredServersClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (RegisteredServersClientGetResponse, error)
- func (client *RegisteredServersClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, ...) *runtime.Pager[RegisteredServersClientListByStorageSyncServiceResponse]
- type RegisteredServersClientBeginCreateOptions
- type RegisteredServersClientBeginDeleteOptions
- type RegisteredServersClientBeginTriggerRolloverOptions
- type RegisteredServersClientCreateResponse
- type RegisteredServersClientDeleteResponse
- type RegisteredServersClientGetOptions
- type RegisteredServersClientGetResponse
- type RegisteredServersClientListByStorageSyncServiceOptions
- type RegisteredServersClientListByStorageSyncServiceResponse
- type RegisteredServersClientTriggerRolloverResponse
- type Resource
- type ResourcesMoveInfo
- type RestoreFileSpec
- type ServerEndpoint
- type ServerEndpointArray
- type ServerEndpointBackgroundDataDownloadActivity
- type ServerEndpointCloudTieringStatus
- type ServerEndpointCreateParameters
- type ServerEndpointCreateParametersProperties
- type ServerEndpointFilesNotSyncingError
- type ServerEndpointHealthState
- type ServerEndpointOfflineDataTransferState
- type ServerEndpointProperties
- type ServerEndpointRecallError
- type ServerEndpointRecallStatus
- type ServerEndpointSyncActivityState
- type ServerEndpointSyncActivityStatus
- type ServerEndpointSyncMode
- type ServerEndpointSyncSessionStatus
- type ServerEndpointSyncStatus
- type ServerEndpointUpdateParameters
- type ServerEndpointUpdateProperties
- type ServerEndpointsClient
- func (client *ServerEndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServerEndpointsClientCreateResponse], error)
- func (client *ServerEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServerEndpointsClientDeleteResponse], error)
- func (client *ServerEndpointsClient) BeginRecallAction(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServerEndpointsClientRecallActionResponse], error)
- func (client *ServerEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServerEndpointsClientUpdateResponse], error)
- func (client *ServerEndpointsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (ServerEndpointsClientGetResponse, error)
- func (client *ServerEndpointsClient) ListBySyncGroup(resourceGroupName string, storageSyncServiceName string, syncGroupName string, ...) *runtime.Pager[ServerEndpointsClientListBySyncGroupResponse]
- type ServerEndpointsClientBeginCreateOptions
- type ServerEndpointsClientBeginDeleteOptions
- type ServerEndpointsClientBeginRecallActionOptions
- type ServerEndpointsClientBeginUpdateOptions
- type ServerEndpointsClientCreateResponse
- type ServerEndpointsClientDeleteResponse
- type ServerEndpointsClientGetOptions
- type ServerEndpointsClientGetResponse
- type ServerEndpointsClientListBySyncGroupOptions
- type ServerEndpointsClientListBySyncGroupResponse
- type ServerEndpointsClientRecallActionResponse
- type ServerEndpointsClientUpdateResponse
- type Service
- type ServiceArray
- type ServiceCreateParameters
- type ServiceCreateParametersProperties
- type ServiceProperties
- type ServiceUpdateParameters
- type ServiceUpdateProperties
- type ServicesClient
- func (client *ServicesClient) BeginCreate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServicesClientCreateResponse], error)
- func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServicesClientDeleteResponse], error)
- func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (*armruntime.Poller[ServicesClientUpdateResponse], error)
- func (client *ServicesClient) CheckNameAvailability(ctx context.Context, locationName string, ...) (ServicesClientCheckNameAvailabilityResponse, error)
- func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (ServicesClientGetResponse, error)
- func (client *ServicesClient) ListByResourceGroup(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
- func (client *ServicesClient) ListBySubscription(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse]
- type ServicesClientBeginCreateOptions
- type ServicesClientBeginDeleteOptions
- type ServicesClientBeginUpdateOptions
- type ServicesClientCheckNameAvailabilityOptions
- type ServicesClientCheckNameAvailabilityResponse
- type ServicesClientCreateResponse
- type ServicesClientDeleteResponse
- type ServicesClientGetOptions
- type ServicesClientGetResponse
- type ServicesClientListByResourceGroupOptions
- type ServicesClientListByResourceGroupResponse
- type ServicesClientListBySubscriptionOptions
- type ServicesClientListBySubscriptionResponse
- type ServicesClientUpdateResponse
- type SubscriptionState
- type SyncGroup
- type SyncGroupArray
- type SyncGroupCreateParameters
- type SyncGroupProperties
- type SyncGroupsClient
- func (client *SyncGroupsClient) Create(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (SyncGroupsClientCreateResponse, error)
- func (client *SyncGroupsClient) Delete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (SyncGroupsClientDeleteResponse, error)
- func (client *SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (SyncGroupsClientGetResponse, error)
- func (client *SyncGroupsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, ...) *runtime.Pager[SyncGroupsClientListByStorageSyncServiceResponse]
- type SyncGroupsClientCreateOptions
- type SyncGroupsClientCreateResponse
- type SyncGroupsClientDeleteOptions
- type SyncGroupsClientDeleteResponse
- type SyncGroupsClientGetOptions
- type SyncGroupsClientGetResponse
- type SyncGroupsClientListByStorageSyncServiceOptions
- type SyncGroupsClientListByStorageSyncServiceResponse
- type SystemData
- type TrackedResource
- type TriggerChangeDetectionParameters
- type TriggerRolloverRequest
- type Workflow
- type WorkflowArray
- type WorkflowProperties
- type WorkflowStatus
- type WorkflowsClient
- func (client *WorkflowsClient) Abort(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (WorkflowsClientAbortResponse, error)
- func (client *WorkflowsClient) Get(ctx context.Context, resourceGroupName string, storageSyncServiceName string, ...) (WorkflowsClientGetResponse, error)
- func (client *WorkflowsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, ...) *runtime.Pager[WorkflowsClientListByStorageSyncServiceResponse]
- type WorkflowsClientAbortOptions
- type WorkflowsClientAbortResponse
- type WorkflowsClientGetOptions
- type WorkflowsClientGetResponse
- type WorkflowsClientListByStorageSyncServiceOptions
- type WorkflowsClientListByStorageSyncServiceResponse
Examples ¶
- CloudEndpointsClient.BeginCreate
- CloudEndpointsClient.BeginDelete
- CloudEndpointsClient.BeginPostBackup
- CloudEndpointsClient.BeginPostRestore
- CloudEndpointsClient.BeginPreBackup
- CloudEndpointsClient.BeginPreRestore
- CloudEndpointsClient.BeginTriggerChangeDetection
- CloudEndpointsClient.Get
- CloudEndpointsClient.ListBySyncGroup
- CloudEndpointsClient.Restoreheartbeat
- MicrosoftStorageSyncClient.LocationOperationStatus
- OperationStatusClient.Get
- OperationsClient.List
- PrivateEndpointConnectionsClient.BeginCreate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.ListByStorageSyncService
- PrivateLinkResourcesClient.ListByStorageSyncService
- RegisteredServersClient.BeginCreate
- RegisteredServersClient.BeginDelete
- RegisteredServersClient.BeginTriggerRollover
- RegisteredServersClient.Get
- RegisteredServersClient.ListByStorageSyncService
- ServerEndpointsClient.BeginCreate
- ServerEndpointsClient.BeginDelete
- ServerEndpointsClient.BeginRecallAction
- ServerEndpointsClient.BeginUpdate
- ServerEndpointsClient.Get
- ServerEndpointsClient.ListBySyncGroup
- ServicesClient.BeginCreate
- ServicesClient.BeginDelete
- ServicesClient.BeginUpdate
- ServicesClient.CheckNameAvailability
- ServicesClient.Get
- ServicesClient.ListByResourceGroup
- ServicesClient.ListBySubscription
- SyncGroupsClient.Create
- SyncGroupsClient.Delete
- SyncGroupsClient.Get
- SyncGroupsClient.ListByStorageSyncService
- WorkflowsClient.Abort
- WorkflowsClient.Get
- WorkflowsClient.ListByStorageSyncService
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 `json:"code,omitempty"` // Error details of the given entry. Details *ErrorDetails `json:"details,omitempty"` // Inner error details of the given entry. Innererror *InnerErrorDetails `json:"innererror,omitempty"` // Error message of the given entry. Message *string `json:"message,omitempty"` // Target of the given error entry. Target *string `json:"target,omitempty"` }
APIError - Error type
type BackupRequest ¶
type BackupRequest struct { string `json:"azureFileShare,omitempty"` }AzureFileShare *
BackupRequest - Backup request
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 `json:"name,omitempty"` // REQUIRED; The resource type. Must be set to Microsoft.StorageSync/storageSyncServices Type *string `json:"type,omitempty"` }
CheckNameAvailabilityParameters - Parameters for a check name availability request.
type CheckNameAvailabilityResult ¶
type CheckNameAvailabilityResult struct { // READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty" azure:"ro"` // 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 `json:"nameAvailable,omitempty" azure:"ro"` // 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 `json:"reason,omitempty" azure:"ro"` }
CheckNameAvailabilityResult - The CheckNameAvailability operation response.
type CloudEndpoint ¶
type CloudEndpoint struct { // Cloud Endpoint properties. Properties *CloudEndpointProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
CloudEndpoint - Cloud Endpoint object.
type CloudEndpointArray ¶
type CloudEndpointArray struct { // Collection of CloudEndpoint. Value []*CloudEndpoint `json:"value,omitempty"` }
CloudEndpointArray - Array of CloudEndpoint
func (CloudEndpointArray) MarshalJSON ¶
func (c CloudEndpointArray) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"deletesProgressPercent,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Estimate of time remaining for the enumeration run MinutesRemaining *int32 `json:"minutesRemaining,omitempty" azure:"ro"` // READ-ONLY; Change enumeration operation state OperationState *CloudEndpointChangeEnumerationActivityState `json:"operationState,omitempty" azure:"ro"` // READ-ONLY; Count of directories processed ProcessedDirectoriesCount *int64 `json:"processedDirectoriesCount,omitempty" azure:"ro"` // READ-ONLY; Count of files processed ProcessedFilesCount *int64 `json:"processedFilesCount,omitempty" azure:"ro"` // READ-ONLY; Progress percentage for change enumeration run, excluding processing of deletes ProgressPercent *int32 `json:"progressPercent,omitempty" azure:"ro"` // READ-ONLY; Timestamp when change enumeration started StartedTimestamp *time.Time `json:"startedTimestamp,omitempty" azure:"ro"` // READ-ONLY; When non-zero, indicates an issue that is delaying change enumeration StatusCode *int32 `json:"statusCode,omitempty" azure:"ro"` // READ-ONLY; Change enumeration total counts state TotalCountsState *CloudEndpointChangeEnumerationTotalCountsState `json:"totalCountsState,omitempty" azure:"ro"` // READ-ONLY; Total count of directories enumerated TotalDirectoriesCount *int64 `json:"totalDirectoriesCount,omitempty" azure:"ro"` // READ-ONLY; Total count of files enumerated TotalFilesCount *int64 `json:"totalFilesCount,omitempty" azure:"ro"` // READ-ONLY; Total enumerated size in bytes TotalSizeBytes *int64 `json:"totalSizeBytes,omitempty" azure:"ro"` }
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 `json:"activity,omitempty" azure:"ro"` // READ-ONLY; Status of last completed change enumeration LastEnumerationStatus *CloudEndpointLastChangeEnumerationStatus `json:"lastEnumerationStatus,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
CloudEndpointCreateParameters - The parameters used when creating a cloud endpoint.
type CloudEndpointCreateParametersProperties ¶
type CloudEndpointCreateParametersProperties struct { string `json:"azureFileShareName,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Storage Account Resource Id StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` // Storage Account Tenant Id StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"` }AzureFileShareName *
CloudEndpointCreateParametersProperties - CloudEndpoint Properties object.
type CloudEndpointLastChangeEnumerationStatus ¶
type CloudEndpointLastChangeEnumerationStatus struct { // READ-ONLY; Timestamp when change enumeration completed CompletedTimestamp *time.Time `json:"completedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Count of directories in the namespace NamespaceDirectoriesCount *int64 `json:"namespaceDirectoriesCount,omitempty" azure:"ro"` // READ-ONLY; Count of files in the namespace NamespaceFilesCount *int64 `json:"namespaceFilesCount,omitempty" azure:"ro"` // READ-ONLY; Namespace size in bytes NamespaceSizeBytes *int64 `json:"namespaceSizeBytes,omitempty" azure:"ro"` // READ-ONLY; Timestamp of when change enumeration is expected to run again NextRunTimestamp *time.Time `json:"nextRunTimestamp,omitempty" azure:"ro"` // READ-ONLY; Timestamp when change enumeration started StartedTimestamp *time.Time `json:"startedTimestamp,omitempty" azure:"ro"` }
CloudEndpointLastChangeEnumerationStatus - Cloud endpoint change enumeration status object
func (CloudEndpointLastChangeEnumerationStatus) MarshalJSON ¶
func (c CloudEndpointLastChangeEnumerationStatus) MarshalJSON() ([]byte, error)
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 { string `json:"azureFileShareName,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Resource Last Operation Name LastOperationName *string `json:"lastOperationName,omitempty"` // CloudEndpoint lastWorkflowId LastWorkflowID *string `json:"lastWorkflowId,omitempty"` // Partnership Id PartnershipID *string `json:"partnershipId,omitempty"` // CloudEndpoint Provisioning State ProvisioningState *string `json:"provisioningState,omitempty"` // Storage Account Resource Id StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` // Storage Account Tenant Id StorageAccountTenantID *string `json:"storageAccountTenantId,omitempty"` // READ-ONLY; Backup Enabled BackupEnabled *string `json:"backupEnabled,omitempty" azure:"ro"` // READ-ONLY; Cloud endpoint change enumeration status ChangeEnumerationStatus *CloudEndpointChangeEnumerationStatus `json:"changeEnumerationStatus,omitempty" azure:"ro"` }AzureFileShareName *
CloudEndpointProperties - CloudEndpoint Properties object.
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) (*armruntime.Poller[CloudEndpointsClientCreateResponse], error)
BeginCreate - Create a new CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_Create.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.CloudEndpointCreateParameters{ Properties: &armstoragesync.CloudEndpointCreateParametersProperties{ AzureFileShareName: to.Ptr("<azure-file-share-name>"), FriendlyName: to.Ptr("<friendly-name>"), StorageAccountResourceID: to.Ptr("<storage-account-resource-id>"), StorageAccountTenantID: to.Ptr("<storage-account-tenant-id>"), }, }, &armstoragesync.CloudEndpointsClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*CloudEndpointsClient) BeginDelete ¶
func (client *CloudEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, options *CloudEndpointsClientBeginDeleteOptions) (*armruntime.Poller[CloudEndpointsClientDeleteResponse], error)
BeginDelete - Delete a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_Delete.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", &armstoragesync.CloudEndpointsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CloudEndpointsClient) BeginPostBackup ¶
func (client *CloudEndpointsClient) BeginPostBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters BackupRequest, options *CloudEndpointsClientBeginPostBackupOptions) (*armruntime.Poller[CloudEndpointsClientPostBackupResponse], error)
BeginPostBackup - Post Backup a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PostBackup.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginPostBackup(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.BackupRequest{ AzureFileShare: to.Ptr("<azure-file-share>"), }, &armstoragesync.CloudEndpointsClientBeginPostBackupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*CloudEndpointsClient) BeginPostRestore ¶
func (client *CloudEndpointsClient) BeginPostRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters PostRestoreRequest, options *CloudEndpointsClientBeginPostRestoreOptions) (*armruntime.Poller[CloudEndpointsClientPostRestoreResponse], error)
BeginPostRestore - Post Restore a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PostRestore.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginPostRestore(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.PostRestoreRequest{ AzureFileShareURI: to.Ptr("<azure-file-share-uri>"), RestoreFileSpec: []*armstoragesync.RestoreFileSpec{ { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(true), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }}, SourceAzureFileShareURI: to.Ptr("<source-azure-file-share-uri>"), Status: to.Ptr("<status>"), }, &armstoragesync.CloudEndpointsClientBeginPostRestoreOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CloudEndpointsClient) BeginPreBackup ¶
func (client *CloudEndpointsClient) BeginPreBackup(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters BackupRequest, options *CloudEndpointsClientBeginPreBackupOptions) (*armruntime.Poller[CloudEndpointsClientPreBackupResponse], error)
BeginPreBackup - Pre Backup a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PreBackup.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginPreBackup(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.BackupRequest{ AzureFileShare: to.Ptr("<azure-file-share>"), }, &armstoragesync.CloudEndpointsClientBeginPreBackupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CloudEndpointsClient) BeginPreRestore ¶
func (client *CloudEndpointsClient) BeginPreRestore(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters PreRestoreRequest, options *CloudEndpointsClientBeginPreRestoreOptions) (*armruntime.Poller[CloudEndpointsClientPreRestoreResponse], error)
BeginPreRestore - Pre Restore a given CloudEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_PreRestore.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginPreRestore(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.PreRestoreRequest{ AzureFileShareURI: to.Ptr("<azure-file-share-uri>"), RestoreFileSpec: []*armstoragesync.RestoreFileSpec{ { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(true), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }, { Path: to.Ptr("<path>"), Isdir: to.Ptr(false), }}, }, &armstoragesync.CloudEndpointsClientBeginPreRestoreOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CloudEndpointsClient) BeginTriggerChangeDetection ¶
func (client *CloudEndpointsClient) BeginTriggerChangeDetection(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, cloudEndpointName string, parameters TriggerChangeDetectionParameters, options *CloudEndpointsClientBeginTriggerChangeDetectionOptions) (*armruntime.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. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/CloudEndpoints_TriggerChangeDetection.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginTriggerChangeDetection(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", armstoragesync.TriggerChangeDetectionParameters{ ChangeDetectionMode: to.Ptr(armstoragesync.ChangeDetectionModeRecursive), DirectoryPath: to.Ptr("<directory-path>"), }, &armstoragesync.CloudEndpointsClientBeginTriggerChangeDetectionOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*CloudEndpointsClient) ListBySyncGroup ¶
func (client *CloudEndpointsClient) ListBySyncGroup(resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *CloudEndpointsClientListBySyncGroupOptions) *runtime.Pager[CloudEndpointsClientListBySyncGroupResponse]
ListBySyncGroup - Get a CloudEndpoint List. If the operation fails it returns an *azcore.ResponseError type. 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.ListBySyncGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySyncGroup("<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewCloudEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Restoreheartbeat(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<cloud-endpoint-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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 {
CloudEndpoint
}
CloudEndpointsClientCreateResponse contains the response from method CloudEndpointsClient.Create.
type CloudEndpointsClientDeleteResponse ¶ added in v0.2.0
type CloudEndpointsClientDeleteResponse struct { }
CloudEndpointsClientDeleteResponse contains the response from method CloudEndpointsClient.Delete.
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 { 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.ListBySyncGroup method.
type CloudEndpointsClientListBySyncGroupResponse ¶ added in v0.2.0
type CloudEndpointsClientListBySyncGroupResponse struct { 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.ListBySyncGroup.
type CloudEndpointsClientPostBackupResponse ¶ added in v0.2.0
type CloudEndpointsClientPostBackupResponse struct {
PostBackupResponse
}
CloudEndpointsClientPostBackupResponse contains the response from method CloudEndpointsClient.PostBackup.
type CloudEndpointsClientPostRestoreResponse ¶ added in v0.2.0
type CloudEndpointsClientPostRestoreResponse struct { }
CloudEndpointsClientPostRestoreResponse contains the response from method CloudEndpointsClient.PostRestore.
type CloudEndpointsClientPreBackupResponse ¶ added in v0.2.0
type CloudEndpointsClientPreBackupResponse struct { }
CloudEndpointsClientPreBackupResponse contains the response from method CloudEndpointsClient.PreBackup.
type CloudEndpointsClientPreRestoreResponse ¶ added in v0.2.0
type CloudEndpointsClientPreRestoreResponse struct { }
CloudEndpointsClientPreRestoreResponse contains the response from method CloudEndpointsClient.PreRestore.
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.TriggerChangeDetection.
type CloudTieringCachePerformance ¶
type CloudTieringCachePerformance struct { // READ-ONLY; Count of bytes that were served from the local server CacheHitBytes *int64 `json:"cacheHitBytes,omitempty" azure:"ro"` // READ-ONLY; Percentage of total bytes (hit + miss) that were served from the local server CacheHitBytesPercent *int32 `json:"cacheHitBytesPercent,omitempty" azure:"ro"` // READ-ONLY; Count of bytes that were served from the cloud CacheMissBytes *int64 `json:"cacheMissBytes,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` }
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 `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Most recent access time of tiered files TieredFilesMostRecentAccessTimestamp *time.Time `json:"tieredFilesMostRecentAccessTimestamp,omitempty" azure:"ro"` }
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 `json:"errors,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Last cloud tiering result (HResult) TotalFileCount *int64 `json:"totalFileCount,omitempty" azure:"ro"` }
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 `json:"cachedSizeBytes,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Count of bytes saved on the server SpaceSavingsBytes *int64 `json:"spaceSavingsBytes,omitempty" azure:"ro"` // READ-ONLY; Percentage of cached size over total size SpaceSavingsPercent *int32 `json:"spaceSavingsPercent,omitempty" azure:"ro"` // READ-ONLY; Total size of content in the azure file share TotalSizeCloudBytes *int64 `json:"totalSizeCloudBytes,omitempty" azure:"ro"` // READ-ONLY; Volume size VolumeSizeBytes *int64 `json:"volumeSizeBytes,omitempty" azure:"ro"` }
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 `json:"currentVolumeFreeSpacePercent,omitempty" azure:"ro"` // READ-ONLY; In the case where multiple server endpoints are present in a volume, an effective free space policy is applied. EffectiveVolumeFreeSpacePolicy *int32 `json:"effectiveVolumeFreeSpacePolicy,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` }
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 `json:"error,omitempty"` // Error details of the given entry. Innererror *APIError `json:"innererror,omitempty"` }
Error type
type ErrorDetails ¶ added in v0.2.0
type ErrorDetails struct { // Error code of the given entry. Code *string `json:"code,omitempty"` // Exception type of the given entry. ExceptionType *string `json:"exceptionType,omitempty"` // HTTP error code of the given entry. HTTPErrorCode *string `json:"httpErrorCode,omitempty"` // HTTP method of the given entry. HTTPMethod *string `json:"httpMethod,omitempty"` // Hashed message of the given entry. HashedMessage *string `json:"hashedMessage,omitempty"` // Error message of the given entry. Message *string `json:"message,omitempty"` // Request URI of the given entry. RequestURI *string `json:"requestUri,omitempty"` // Target of the given entry. Target *string `json:"target,omitempty"` }
ErrorDetails - Error Details object.
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 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; Count of files with this error FileCount *int64 `json:"fileCount,omitempty" azure:"ro"` }
FilesNotTieringError - Files not tiering error object
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 `json:"callStack,omitempty"` // Exception of the inner error. InnerException *string `json:"innerException,omitempty"` // Call stack of the inner error. InnerExceptionCallStack *string `json:"innerExceptionCallStack,omitempty"` // Error message of the error. Message *string `json:"message,omitempty"` }
InnerErrorDetails - Error Details object.
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 `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; Error details. Error *APIError `json:"error,omitempty" azure:"ro"` // READ-ONLY; Operation resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Operation Id Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Percent complete. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; Start time of the operation StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; Operation status Status *string `json:"status,omitempty" azure:"ro"` }
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 ¶
func (client *MicrosoftStorageSyncClient) LocationOperationStatus(ctx context.Context, locationName string, operationID string, options *MicrosoftStorageSyncClientLocationOperationStatusOptions) (MicrosoftStorageSyncClientLocationOperationStatusResponse, error)
LocationOperationStatus - Get Operation status If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewMicrosoftStorageSyncClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.LocationOperationStatus(ctx, "<location-name>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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 { 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 ( NameAvailabilityReasonInvalid NameAvailabilityReason = "Invalid" NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists" )
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 `json:"description,omitempty"` // The action that users can perform, based on their permission level. Operation *string `json:"operation,omitempty"` // Service provider: Microsoft StorageSync. Provider *string `json:"provider,omitempty"` // Resource on which the operation is performed. Resource *string `json:"resource,omitempty"` }
OperationDisplayInfo - The operation supported by storage sync.
type OperationDisplayResource ¶
type OperationDisplayResource struct { // Operation Display Resource Description. Description *string `json:"description,omitempty"` // Operation Display Resource Operation. Operation *string `json:"operation,omitempty"` // Operation Display Resource Provider. Provider *string `json:"provider,omitempty"` // Operation Display Resource. Resource *string `json:"resource,omitempty"` }
OperationDisplayResource - Operation Display Resource object.
type OperationEntity ¶
type OperationEntity struct { // The operation supported by storage sync. Display *OperationDisplayInfo `json:"display,omitempty"` // Operation name: {provider}/{resource}/{operation}. Name *string `json:"name,omitempty"` // The origin. Origin *string `json:"origin,omitempty"` // Properties of the operations resource. Properties *OperationProperties `json:"properties,omitempty"` }
OperationEntity - The operation supported by storage sync.
type OperationEntityListResult ¶
type OperationEntityListResult struct { // The link used to get the next page of operations. NextLink *string `json:"nextLink,omitempty"` // The list of operations. Value []*OperationEntity `json:"value,omitempty"` }
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.
type OperationProperties ¶
type OperationProperties struct { // Service specification for the operations resource. ServiceSpecification *OperationResourceServiceSpecification `json:"serviceSpecification,omitempty"` }
OperationProperties - Properties of the operations resource.
type OperationResourceMetricSpecification ¶
type OperationResourceMetricSpecification struct { // Aggregation type for the metric. AggregationType *string `json:"aggregationType,omitempty"` // Dimensions for the metric specification. Dimensions []*OperationResourceMetricSpecificationDimension `json:"dimensions,omitempty"` // Display description for the metric. DisplayDescription *string `json:"displayDescription,omitempty"` // Display name for the metric. DisplayName *string `json:"displayName,omitempty"` // Fill gaps in the metric with zero. FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` // Name of the metric. Name *string `json:"name,omitempty"` // Supported aggregation types for the metric. SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` // Unit for the metric. Unit *string `json:"unit,omitempty"` }
OperationResourceMetricSpecification - Operation Display Resource object.
func (OperationResourceMetricSpecification) MarshalJSON ¶
func (o OperationResourceMetricSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResourceMetricSpecification.
type OperationResourceMetricSpecificationDimension ¶
type OperationResourceMetricSpecificationDimension struct { // Display name of the dimensions. DisplayName *string `json:"displayName,omitempty"` // Name of the dimension. Name *string `json:"name,omitempty"` // Indicates metric should be exported for Shoebox. ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` }
OperationResourceMetricSpecificationDimension object.
type OperationResourceServiceSpecification ¶
type OperationResourceServiceSpecification struct { // List of metric specifications. MetricSpecifications []*OperationResourceMetricSpecification `json:"metricSpecifications,omitempty"` }
OperationResourceServiceSpecification - Service specification.
func (OperationResourceServiceSpecification) MarshalJSON ¶
func (o OperationResourceServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResourceServiceSpecification.
type OperationStatus ¶
type OperationStatus struct { // READ-ONLY; End time of the operation EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; Error details. Error *APIError `json:"error,omitempty" azure:"ro"` // READ-ONLY; Operation Id Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Start time of the operation StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; Operation status Status *string `json:"status,omitempty" azure:"ro"` }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewOperationStatusClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<location-name>", "<workflow-id>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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 { 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) List ¶
func (client *OperationsClient) List(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
List - Lists all of the available Storage Sync Rest API operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { 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.List.
type PostBackupResponse ¶
type PostBackupResponse struct { // Post Backup Response Properties BackupMetadata *PostBackupResponseProperties `json:"backupMetadata,omitempty"` }
PostBackupResponse - Post Backup Response
type PostBackupResponseProperties ¶
type PostBackupResponseProperties struct { // READ-ONLY; cloud endpoint Name. CloudEndpointName *string `json:"cloudEndpointName,omitempty" azure:"ro"` }
PostBackupResponseProperties - Post Backup Response Properties object.
type PostRestoreRequest ¶
type PostRestoreRequest struct { string `json:"azureFileShareUri,omitempty"` // Post Restore Azure failed file list. FailedFileList *string `json:"failedFileList,omitempty"` // Post Restore partition. Partition *string `json:"partition,omitempty"` // Post Restore replica group. ReplicaGroup *string `json:"replicaGroup,omitempty"` // Post Restore request id. RequestID *string `json:"requestId,omitempty"` // Post Restore restore file spec array. RestoreFileSpec []*RestoreFileSpec `json:"restoreFileSpec,omitempty"` SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"` // Post Restore Azure status. Status *string `json:"status,omitempty"` }AzureFileShareURI *
PostRestoreRequest - Post Restore Request
func (PostRestoreRequest) MarshalJSON ¶
func (p PostRestoreRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostRestoreRequest.
type PreRestoreRequest ¶
type PreRestoreRequest struct { string `json:"azureFileShareUri,omitempty"` // Pre Restore backup metadata property bag. BackupMetadataPropertyBag *string `json:"backupMetadataPropertyBag,omitempty"` // Pre Restore partition. Partition *string `json:"partition,omitempty"` // Pre Restore pause wait for sync drain time period in seconds. PauseWaitForSyncDrainTimePeriodInSeconds *int32 `json:"pauseWaitForSyncDrainTimePeriodInSeconds,omitempty"` // Pre Restore replica group. ReplicaGroup *string `json:"replicaGroup,omitempty"` // Pre Restore request id. RequestID *string `json:"requestId,omitempty"` // Pre Restore restore file spec array. RestoreFileSpec []*RestoreFileSpec `json:"restoreFileSpec,omitempty"` SourceAzureFileShareURI *string `json:"sourceAzureFileShareUri,omitempty"` // Pre Restore Azure status. Status *string `json:"status,omitempty"` }AzureFileShareURI *
PreRestoreRequest - Pre Restore request object.
func (PreRestoreRequest) MarshalJSON ¶
func (p PreRestoreRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreRestoreRequest.
type PrivateEndpoint ¶
type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for Private Endpoint ID *string `json:"id,omitempty" azure:"ro"` }
PrivateEndpoint - The Private Endpoint resource.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
PrivateEndpointConnection - The Private Endpoint Connection resource.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // Array of private endpoint connections Value []*PrivateEndpointConnection `json:"value,omitempty"` }
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.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` // The resource of private end point. PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.
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) (*armruntime.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. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_Create.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<private-endpoint-connection-name>", armstoragesync.PrivateEndpointConnection{ Properties: &armstoragesync.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armstoragesync.PrivateLinkServiceConnectionState{ Description: to.Ptr("<description>"), Status: to.Ptr(armstoragesync.PrivateEndpointServiceConnectionStatusApproved), }, }, }, &armstoragesync.PrivateEndpointConnectionsClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.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. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_Delete.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<private-endpoint-connection-name>", &armstoragesync.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<private-endpoint-connection-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) ListByStorageSyncService ¶
func (client *PrivateEndpointConnectionsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, options *PrivateEndpointConnectionsClientListByStorageSyncServiceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByStorageSyncServiceResponse]
ListByStorageSyncService - Get a PrivateEndpointConnection List. If the operation fails it returns an *azcore.ResponseError type. 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.ListByStorageSyncService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByStorageSyncService("<resource-group-name>", "<storage-sync-service-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.Create.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.
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 {
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.ListByStorageSyncService method.
type PrivateEndpointConnectionsClientListByStorageSyncServiceResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientListByStorageSyncServiceResponse struct { 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.ListByStorageSyncService.
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 `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
PrivateLinkResource - A private link resource
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource `json:"value,omitempty"` }
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.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` // READ-ONLY; The private link resource group id. GroupID *string `json:"groupId,omitempty" azure:"ro"` // READ-ONLY; The private link resource required member names. RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` }
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.
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 ¶
func (client *PrivateLinkResourcesClient) ListByStorageSyncService(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *PrivateLinkResourcesClientListByStorageSyncServiceOptions) (PrivateLinkResourcesClientListByStorageSyncServiceResponse, error)
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.ListByStorageSyncService(ctx, "<resource-group-name>", "<storage-sync-service-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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 {
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 `json:"actionsRequired,omitempty"` // The reason for approval/rejection of the connection. Description *string `json:"description,omitempty"` // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` }
PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
type Reason ¶
type Reason string
Reason - State of Azure Subscription
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 `json:"pattern,omitempty"` // Recall path. RecallPath *string `json:"recallPath,omitempty"` }
RecallActionParameters - The parameters used when calling recall action on server endpoint.
type RegisteredServer ¶
type RegisteredServer struct { // RegisteredServer properties. Properties *RegisteredServerProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
RegisteredServer - Registered Server resource.
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 `json:"value,omitempty"` }
RegisteredServerArray - Array of RegisteredServer
func (RegisteredServerArray) MarshalJSON ¶
func (r RegisteredServerArray) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegisteredServerArray.
type RegisteredServerCreateParameters ¶
type RegisteredServerCreateParameters struct { // The parameters used to create the registered server. Properties *RegisteredServerCreateParametersProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
RegisteredServerCreateParameters - The parameters used when creating a registered server.
type RegisteredServerCreateParametersProperties ¶
type RegisteredServerCreateParametersProperties struct { // Registered Server Agent Version AgentVersion *string `json:"agentVersion,omitempty"` // Registered Server clusterId ClusterID *string `json:"clusterId,omitempty"` // Registered Server clusterName ClusterName *string `json:"clusterName,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Registered Server last heart beat LastHeartBeat *string `json:"lastHeartBeat,omitempty"` // Registered Server Certificate ServerCertificate *string `json:"serverCertificate,omitempty"` // Registered Server serverId ServerID *string `json:"serverId,omitempty"` // Registered Server OS Version ServerOSVersion *string `json:"serverOSVersion,omitempty"` // Registered Server serverRole ServerRole *string `json:"serverRole,omitempty"` }
RegisteredServerCreateParametersProperties - RegisteredServer Create Properties object.
type RegisteredServerProperties ¶
type RegisteredServerProperties struct { // Registered Server Agent Version AgentVersion *string `json:"agentVersion,omitempty"` // Registered Server clusterId ClusterID *string `json:"clusterId,omitempty"` // Registered Server clusterName ClusterName *string `json:"clusterName,omitempty"` // Resource discoveryEndpointUri DiscoveryEndpointURI *string `json:"discoveryEndpointUri,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Registered Server last heart beat LastHeartBeat *string `json:"lastHeartBeat,omitempty"` // Resource Last Operation Name LastOperationName *string `json:"lastOperationName,omitempty"` // Registered Server lastWorkflowId LastWorkflowID *string `json:"lastWorkflowId,omitempty"` // Management Endpoint Uri ManagementEndpointURI *string `json:"managementEndpointUri,omitempty"` // Monitoring Configuration MonitoringConfiguration *string `json:"monitoringConfiguration,omitempty"` // Telemetry Endpoint Uri MonitoringEndpointURI *string `json:"monitoringEndpointUri,omitempty"` // Registered Server Provisioning State ProvisioningState *string `json:"provisioningState,omitempty"` // Resource Location ResourceLocation *string `json:"resourceLocation,omitempty"` // Registered Server Certificate ServerCertificate *string `json:"serverCertificate,omitempty"` // Registered Server serverId ServerID *string `json:"serverId,omitempty"` // Registered Server Management Error Code ServerManagementErrorCode *int32 `json:"serverManagementErrorCode,omitempty"` // Registered Server OS Version ServerOSVersion *string `json:"serverOSVersion,omitempty"` // Registered Server serverRole ServerRole *string `json:"serverRole,omitempty"` // Service Location ServiceLocation *string `json:"serviceLocation,omitempty"` // Registered Server storageSyncServiceUid StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty"` // READ-ONLY; Registered Server Agent Version Expiration Date AgentVersionExpirationDate *time.Time `json:"agentVersionExpirationDate,omitempty" azure:"ro"` // READ-ONLY; Registered Server Agent Version Status AgentVersionStatus *RegisteredServerAgentVersionStatus `json:"agentVersionStatus,omitempty" azure:"ro"` // READ-ONLY; Server name ServerName *string `json:"serverName,omitempty" azure:"ro"` }
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) (*armruntime.Poller[RegisteredServersClientCreateResponse], error)
BeginCreate - Add a new registered server. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_Create.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewRegisteredServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<server-id>", armstoragesync.RegisteredServerCreateParameters{ Properties: &armstoragesync.RegisteredServerCreateParametersProperties{ AgentVersion: to.Ptr("<agent-version>"), FriendlyName: to.Ptr("<friendly-name>"), ServerCertificate: to.Ptr("<server-certificate>"), ServerID: to.Ptr("<server-id>"), ServerOSVersion: to.Ptr("<server-osversion>"), ServerRole: to.Ptr("<server-role>"), }, }, &armstoragesync.RegisteredServersClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RegisteredServersClient) BeginDelete ¶
func (client *RegisteredServersClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, options *RegisteredServersClientBeginDeleteOptions) (*armruntime.Poller[RegisteredServersClientDeleteResponse], error)
BeginDelete - Delete the given registered server. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_Delete.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewRegisteredServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<server-id>", &armstoragesync.RegisteredServersClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*RegisteredServersClient) BeginTriggerRollover ¶
func (client *RegisteredServersClient) BeginTriggerRollover(ctx context.Context, resourceGroupName string, storageSyncServiceName string, serverID string, parameters TriggerRolloverRequest, options *RegisteredServersClientBeginTriggerRolloverOptions) (*armruntime.Poller[RegisteredServersClientTriggerRolloverResponse], error)
BeginTriggerRollover - Triggers Server certificate rollover. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/RegisteredServers_TriggerRollover.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewRegisteredServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginTriggerRollover(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<server-id>", armstoragesync.TriggerRolloverRequest{ ServerCertificate: to.Ptr("<server-certificate>"), }, &armstoragesync.RegisteredServersClientBeginTriggerRolloverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewRegisteredServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<server-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RegisteredServersClient) ListByStorageSyncService ¶
func (client *RegisteredServersClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, options *RegisteredServersClientListByStorageSyncServiceOptions) *runtime.Pager[RegisteredServersClientListByStorageSyncServiceResponse]
ListByStorageSyncService - Get a given registered server list. If the operation fails it returns an *azcore.ResponseError type. 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.ListByStorageSyncService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewRegisteredServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByStorageSyncService("<resource-group-name>", "<storage-sync-service-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 {
RegisteredServer
}
RegisteredServersClientCreateResponse contains the response from method RegisteredServersClient.Create.
type RegisteredServersClientDeleteResponse ¶ added in v0.2.0
type RegisteredServersClientDeleteResponse struct { }
RegisteredServersClientDeleteResponse contains the response from method RegisteredServersClient.Delete.
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 { 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.ListByStorageSyncService method.
type RegisteredServersClientListByStorageSyncServiceResponse ¶ added in v0.2.0
type RegisteredServersClientListByStorageSyncServiceResponse struct { 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.ListByStorageSyncService.
type RegisteredServersClientTriggerRolloverResponse ¶ added in v0.2.0
type RegisteredServersClientTriggerRolloverResponse struct { }
RegisteredServersClientTriggerRolloverResponse contains the response from method RegisteredServersClient.TriggerRollover.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type ResourcesMoveInfo ¶
type ResourcesMoveInfo struct { // Collection of Resources. Resources []*string `json:"resources,omitempty"` // Target resource group. TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` }
ResourcesMoveInfo - Resource Move Info.
func (ResourcesMoveInfo) MarshalJSON ¶
func (r ResourcesMoveInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcesMoveInfo.
type RestoreFileSpec ¶
type RestoreFileSpec struct { // Restore file spec isdir Isdir *bool `json:"isdir,omitempty"` // Restore file spec path Path *string `json:"path,omitempty"` }
RestoreFileSpec - Restore file spec.
type ServerEndpoint ¶
type ServerEndpoint struct { // Server Endpoint properties. Properties *ServerEndpointProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerEndpoint - Server Endpoint object.
type ServerEndpointArray ¶
type ServerEndpointArray struct { // Collection of ServerEndpoint. Value []*ServerEndpoint `json:"value,omitempty"` }
ServerEndpointArray - Array of ServerEndpoint
func (ServerEndpointArray) MarshalJSON ¶
func (s ServerEndpointArray) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerEndpointArray.
type ServerEndpointBackgroundDataDownloadActivity ¶
type ServerEndpointBackgroundDataDownloadActivity struct { // READ-ONLY; Running count of bytes downloaded DownloadedBytes *int64 `json:"downloadedBytes,omitempty" azure:"ro"` // READ-ONLY; Progress percentage PercentProgress *int32 `json:"percentProgress,omitempty" azure:"ro"` // READ-ONLY; Timestamp when the operation started StartedTimestamp *time.Time `json:"startedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Timestamp when properties were updated Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` }
ServerEndpointBackgroundDataDownloadActivity - Background data download activity object
func (ServerEndpointBackgroundDataDownloadActivity) MarshalJSON ¶
func (s ServerEndpointBackgroundDataDownloadActivity) MarshalJSON() ([]byte, error)
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 `json:"cachePerformance,omitempty" azure:"ro"` // READ-ONLY; Status of the date policy DatePolicyStatus *CloudTieringDatePolicyStatus `json:"datePolicyStatus,omitempty" azure:"ro"` // READ-ONLY; Information regarding files that failed to be tiered FilesNotTiering *CloudTieringFilesNotTiering `json:"filesNotTiering,omitempty" azure:"ro"` // READ-ONLY; Cloud tiering health state. Health *ServerEndpointHealthState `json:"health,omitempty" azure:"ro"` // READ-ONLY; The last updated timestamp of health state HealthLastUpdatedTimestamp *time.Time `json:"healthLastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Last cloud tiering result (HResult) LastCloudTieringResult *int32 `json:"lastCloudTieringResult,omitempty" azure:"ro"` // READ-ONLY; Last cloud tiering success timestamp LastSuccessTimestamp *time.Time `json:"lastSuccessTimestamp,omitempty" azure:"ro"` // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Information regarding how much local space cloud tiering is saving. SpaceSavings *CloudTieringSpaceSavings `json:"spaceSavings,omitempty" azure:"ro"` // READ-ONLY; Status of the volume free space policy VolumeFreeSpacePolicyStatus *CloudTieringVolumeFreeSpacePolicyStatus `json:"volumeFreeSpacePolicyStatus,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerEndpointCreateParameters - The parameters used when creating a server endpoint.
type ServerEndpointCreateParametersProperties ¶
type ServerEndpointCreateParametersProperties struct { // Cloud Tiering. CloudTiering *FeatureStatus `json:"cloudTiering,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Policy for how namespace and files are recalled during FastDr. InitialDownloadPolicy *InitialDownloadPolicy `json:"initialDownloadPolicy,omitempty"` // Policy for how the initial upload sync session is performed. InitialUploadPolicy *InitialUploadPolicy `json:"initialUploadPolicy,omitempty"` // Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access. LocalCacheMode *LocalCacheMode `json:"localCacheMode,omitempty"` // Offline data transfer OfflineDataTransfer *FeatureStatus `json:"offlineDataTransfer,omitempty"` OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` // Server Local path. ServerLocalPath *string `json:"serverLocalPath,omitempty"` // Server Resource Id. ServerResourceID *string `json:"serverResourceId,omitempty"` // Tier files older than days. TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` // Level of free space to be maintained by Cloud Tiering if it is enabled. VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` }
ServerEndpointCreateParametersProperties - ServerEndpoint Properties object.
type ServerEndpointFilesNotSyncingError ¶
type ServerEndpointFilesNotSyncingError struct { // READ-ONLY; Error code (HResult) ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; Count of persistent files not syncing with the specified error code PersistentCount *int64 `json:"persistentCount,omitempty" azure:"ro"` // READ-ONLY; Count of transient files not syncing with the specified error code TransientCount *int64 `json:"transientCount,omitempty" azure:"ro"` }
ServerEndpointFilesNotSyncingError - Files not syncing error object
type ServerEndpointHealthState ¶
type ServerEndpointHealthState string
ServerEndpointHealthState - Type of the server endpoint health state
const ( ServerEndpointHealthStateError ServerEndpointHealthState = "Error" ServerEndpointHealthStateHealthy ServerEndpointHealthState = "Healthy" )
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 `json:"cloudTiering,omitempty"` // Friendly Name FriendlyName *string `json:"friendlyName,omitempty"` // Policy for how namespace and files are recalled during FastDr. InitialDownloadPolicy *InitialDownloadPolicy `json:"initialDownloadPolicy,omitempty"` // Policy for how the initial upload sync session is performed. InitialUploadPolicy *InitialUploadPolicy `json:"initialUploadPolicy,omitempty"` // Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access. LocalCacheMode *LocalCacheMode `json:"localCacheMode,omitempty"` // Offline data transfer OfflineDataTransfer *FeatureStatus `json:"offlineDataTransfer,omitempty"` OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` // Server Local path. ServerLocalPath *string `json:"serverLocalPath,omitempty"` // Server Resource Id. ServerResourceID *string `json:"serverResourceId,omitempty"` // Tier files older than days. TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` // Level of free space to be maintained by Cloud Tiering if it is enabled. VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` // READ-ONLY; Cloud tiering status. Only populated if cloud tiering is enabled. CloudTieringStatus *ServerEndpointCloudTieringStatus `json:"cloudTieringStatus,omitempty" azure:"ro"` // READ-ONLY; Resource Last Operation Name LastOperationName *string `json:"lastOperationName,omitempty" azure:"ro"` // READ-ONLY; ServerEndpoint lastWorkflowId LastWorkflowID *string `json:"lastWorkflowId,omitempty" azure:"ro"` // READ-ONLY; Offline data transfer storage account resource ID OfflineDataTransferStorageAccountResourceID *string `json:"offlineDataTransferStorageAccountResourceId,omitempty" azure:"ro"` // READ-ONLY; Offline data transfer storage account tenant ID OfflineDataTransferStorageAccountTenantID *string `json:"offlineDataTransferStorageAccountTenantId,omitempty" azure:"ro"` // READ-ONLY; ServerEndpoint Provisioning State ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Recall status. Only populated if cloud tiering is enabled. RecallStatus *ServerEndpointRecallStatus `json:"recallStatus,omitempty" azure:"ro"` // READ-ONLY; Server name ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; Server Endpoint sync status SyncStatus *ServerEndpointSyncStatus `json:"syncStatus,omitempty" azure:"ro"` }
ServerEndpointProperties - ServerEndpoint Properties object.
type ServerEndpointRecallError ¶
type ServerEndpointRecallError struct { // READ-ONLY; Count of occurences of the error Count *int64 `json:"count,omitempty" azure:"ro"` // READ-ONLY; Error code (HResult) ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` }
ServerEndpointRecallError - Server endpoint recall error object
type ServerEndpointRecallStatus ¶
type ServerEndpointRecallStatus struct { // READ-ONLY; Last updated timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Array of recall errors RecallErrors []*ServerEndpointRecallError `json:"recallErrors,omitempty" azure:"ro"` // READ-ONLY; Total count of recall errors. TotalRecallErrorsCount *int64 `json:"totalRecallErrorsCount,omitempty" azure:"ro"` }
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 `json:"appliedBytes,omitempty" azure:"ro"` // READ-ONLY; Applied item count. AppliedItemCount *int64 `json:"appliedItemCount,omitempty" azure:"ro"` // READ-ONLY; Per item error count PerItemErrorCount *int64 `json:"perItemErrorCount,omitempty" azure:"ro"` // READ-ONLY; Session minutes remaining (if available) SessionMinutesRemaining *int32 `json:"sessionMinutesRemaining,omitempty" azure:"ro"` // READ-ONLY; Sync mode SyncMode *ServerEndpointSyncMode `json:"syncMode,omitempty" azure:"ro"` // READ-ONLY; Timestamp when properties were updated Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` // READ-ONLY; Total bytes (if available) TotalBytes *int64 `json:"totalBytes,omitempty" azure:"ro"` // READ-ONLY; Total item count (if available) TotalItemCount *int64 `json:"totalItemCount,omitempty" azure:"ro"` }
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 `json:"filesNotSyncingErrors,omitempty" azure:"ro"` // READ-ONLY; Sync mode LastSyncMode *ServerEndpointSyncMode `json:"lastSyncMode,omitempty" azure:"ro"` // READ-ONLY; Last sync per item error count. LastSyncPerItemErrorCount *int64 `json:"lastSyncPerItemErrorCount,omitempty" azure:"ro"` // READ-ONLY; Last sync result (HResult) LastSyncResult *int32 `json:"lastSyncResult,omitempty" azure:"ro"` // READ-ONLY; Last sync success timestamp LastSyncSuccessTimestamp *time.Time `json:"lastSyncSuccessTimestamp,omitempty" azure:"ro"` // READ-ONLY; Last sync timestamp LastSyncTimestamp *time.Time `json:"lastSyncTimestamp,omitempty" azure:"ro"` // READ-ONLY; Count of persistent files not syncing. PersistentFilesNotSyncingCount *int64 `json:"persistentFilesNotSyncingCount,omitempty" azure:"ro"` // READ-ONLY; Count of transient files not syncing. TransientFilesNotSyncingCount *int64 `json:"transientFilesNotSyncingCount,omitempty" azure:"ro"` }
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 `json:"backgroundDataDownloadActivity,omitempty" azure:"ro"` // READ-ONLY; Combined Health Status. CombinedHealth *ServerEndpointHealthState `json:"combinedHealth,omitempty" azure:"ro"` // READ-ONLY; Download sync activity DownloadActivity *ServerEndpointSyncActivityStatus `json:"downloadActivity,omitempty" azure:"ro"` // READ-ONLY; Download Health Status. DownloadHealth *ServerEndpointHealthState `json:"downloadHealth,omitempty" azure:"ro"` // READ-ONLY; Download Status DownloadStatus *ServerEndpointSyncSessionStatus `json:"downloadStatus,omitempty" azure:"ro"` // READ-ONLY; Last Updated Timestamp LastUpdatedTimestamp *time.Time `json:"lastUpdatedTimestamp,omitempty" azure:"ro"` // READ-ONLY; Offline Data Transfer State OfflineDataTransferStatus *ServerEndpointOfflineDataTransferState `json:"offlineDataTransferStatus,omitempty" azure:"ro"` // READ-ONLY; Sync activity SyncActivity *ServerEndpointSyncActivityState `json:"syncActivity,omitempty" azure:"ro"` // READ-ONLY; Total count of persistent files not syncing (combined upload + download). TotalPersistentFilesNotSyncingCount *int64 `json:"totalPersistentFilesNotSyncingCount,omitempty" azure:"ro"` // READ-ONLY; Upload sync activity UploadActivity *ServerEndpointSyncActivityStatus `json:"uploadActivity,omitempty" azure:"ro"` // READ-ONLY; Upload Health Status. UploadHealth *ServerEndpointHealthState `json:"uploadHealth,omitempty" azure:"ro"` // READ-ONLY; Upload Status UploadStatus *ServerEndpointSyncSessionStatus `json:"uploadStatus,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` }
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.
type ServerEndpointUpdateProperties ¶
type ServerEndpointUpdateProperties struct { // Cloud Tiering. CloudTiering *FeatureStatus `json:"cloudTiering,omitempty"` // Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access. LocalCacheMode *LocalCacheMode `json:"localCacheMode,omitempty"` // Offline data transfer OfflineDataTransfer *FeatureStatus `json:"offlineDataTransfer,omitempty"` OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` // Tier files older than days. TierFilesOlderThanDays *int32 `json:"tierFilesOlderThanDays,omitempty"` // Level of free space to be maintained by Cloud Tiering if it is enabled. VolumeFreeSpacePercent *int32 `json:"volumeFreeSpacePercent,omitempty"` }
ServerEndpointUpdateProperties - ServerEndpoint Update Properties object.
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) (*armruntime.Poller[ServerEndpointsClientCreateResponse], error)
BeginCreate - Create a new ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_Create.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<server-endpoint-name>", 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("<offline-data-transfer-share-name>"), ServerLocalPath: to.Ptr("<server-local-path>"), ServerResourceID: to.Ptr("<server-resource-id>"), TierFilesOlderThanDays: to.Ptr[int32](0), VolumeFreeSpacePercent: to.Ptr[int32](100), }, }, &armstoragesync.ServerEndpointsClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerEndpointsClient) BeginDelete ¶
func (client *ServerEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, options *ServerEndpointsClientBeginDeleteOptions) (*armruntime.Poller[ServerEndpointsClientDeleteResponse], error)
BeginDelete - Delete a given ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_Delete.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<server-endpoint-name>", &armstoragesync.ServerEndpointsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ServerEndpointsClient) BeginRecallAction ¶
func (client *ServerEndpointsClient) BeginRecallAction(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, parameters RecallActionParameters, options *ServerEndpointsClientBeginRecallActionOptions) (*armruntime.Poller[ServerEndpointsClientRecallActionResponse], error)
BeginRecallAction - Recall a server endpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_Recall.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRecallAction(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<server-endpoint-name>", armstoragesync.RecallActionParameters{ Pattern: to.Ptr("<pattern>"), RecallPath: to.Ptr("<recall-path>"), }, &armstoragesync.ServerEndpointsClientBeginRecallActionOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ServerEndpointsClient) BeginUpdate ¶
func (client *ServerEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, syncGroupName string, serverEndpointName string, options *ServerEndpointsClientBeginUpdateOptions) (*armruntime.Poller[ServerEndpointsClientUpdateResponse], error)
BeginUpdate - Patch a given ServerEndpoint. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/ServerEndpoints_Update.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<server-endpoint-name>", &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), }, }, ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", "<server-endpoint-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerEndpointsClient) ListBySyncGroup ¶
func (client *ServerEndpointsClient) ListBySyncGroup(resourceGroupName string, storageSyncServiceName string, syncGroupName string, options *ServerEndpointsClientListBySyncGroupOptions) *runtime.Pager[ServerEndpointsClientListBySyncGroupResponse]
ListBySyncGroup - Get a ServerEndpoint list. If the operation fails it returns an *azcore.ResponseError type. 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.ListBySyncGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServerEndpointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySyncGroup("<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 {
ServerEndpoint
}
ServerEndpointsClientCreateResponse contains the response from method ServerEndpointsClient.Create.
type ServerEndpointsClientDeleteResponse ¶ added in v0.2.0
type ServerEndpointsClientDeleteResponse struct { }
ServerEndpointsClientDeleteResponse contains the response from method ServerEndpointsClient.Delete.
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 { 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.ListBySyncGroup method.
type ServerEndpointsClientListBySyncGroupResponse ¶ added in v0.2.0
type ServerEndpointsClientListBySyncGroupResponse struct { 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.ListBySyncGroup.
type ServerEndpointsClientRecallActionResponse ¶ added in v0.2.0
type ServerEndpointsClientRecallActionResponse struct { }
ServerEndpointsClientRecallActionResponse contains the response from method ServerEndpointsClient.RecallAction.
type ServerEndpointsClientUpdateResponse ¶ added in v0.2.0
type ServerEndpointsClientUpdateResponse struct {
ServerEndpoint
}
ServerEndpointsClientUpdateResponse contains the response from method ServerEndpointsClient.Update.
type Service ¶ added in v0.2.0
type Service struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Storage Sync Service properties. Properties *ServiceProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Service - Storage Sync Service object.
func (Service) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Service.
type ServiceArray ¶ added in v0.2.0
type ServiceArray struct { // Collection of StorageSyncServices. Value []*Service `json:"value,omitempty"` }
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.
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 `json:"location,omitempty"` // The parameters used to create the storage sync service. Properties *ServiceCreateParametersProperties `json:"properties,omitempty"` // 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 `json:"tags,omitempty"` }
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.
type ServiceCreateParametersProperties ¶ added in v0.2.0
type ServiceCreateParametersProperties struct { // Incoming Traffic Policy IncomingTrafficPolicy *IncomingTrafficPolicy `json:"incomingTrafficPolicy,omitempty"` }
ServiceCreateParametersProperties - StorageSyncService Properties object.
type ServiceProperties ¶ added in v0.2.0
type ServiceProperties struct { // Incoming Traffic Policy IncomingTrafficPolicy *IncomingTrafficPolicy `json:"incomingTrafficPolicy,omitempty"` // READ-ONLY; Resource Last Operation Name LastOperationName *string `json:"lastOperationName,omitempty" azure:"ro"` // READ-ONLY; StorageSyncService lastWorkflowId LastWorkflowID *string `json:"lastWorkflowId,omitempty" azure:"ro"` // READ-ONLY; List of private endpoint connection associated with the specified storage sync service PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` // READ-ONLY; StorageSyncService Provisioning State ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Storage Sync service status. StorageSyncServiceStatus *int32 `json:"storageSyncServiceStatus,omitempty" azure:"ro"` // READ-ONLY; Storage Sync service Uid StorageSyncServiceUID *string `json:"storageSyncServiceUid,omitempty" azure:"ro"` }
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.
type ServiceUpdateParameters ¶ added in v0.2.0
type ServiceUpdateParameters struct { // The properties of the server endpoint. Properties *ServiceUpdateProperties `json:"properties,omitempty"` // The user-specified tags associated with the storage sync service. Tags map[string]*string `json:"tags,omitempty"` }
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.
type ServiceUpdateProperties ¶ added in v0.2.0
type ServiceUpdateProperties struct { // Incoming Traffic Policy IncomingTrafficPolicy *IncomingTrafficPolicy `json:"incomingTrafficPolicy,omitempty"` }
ServiceUpdateProperties - StorageSyncService Properties object.
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) (*armruntime.Poller[ServicesClientCreateResponse], error)
BeginCreate - Create a new StorageSyncService. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_Create.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<storage-sync-service-name>", armstoragesync.ServiceCreateParameters{ Location: to.Ptr("<location>"), Properties: &armstoragesync.ServiceCreateParametersProperties{ IncomingTrafficPolicy: to.Ptr(armstoragesync.IncomingTrafficPolicyAllowAllTraffic), }, Tags: map[string]*string{}, }, &armstoragesync.ServicesClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServicesClient) BeginDelete ¶ added in v0.2.0
func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *ServicesClientBeginDeleteOptions) (*armruntime.Poller[ServicesClientDeleteResponse], error)
BeginDelete - Delete a given StorageSyncService. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_Delete.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<storage-sync-service-name>", &armstoragesync.ServicesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ServicesClient) BeginUpdate ¶ added in v0.2.0
func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, storageSyncServiceName string, options *ServicesClientBeginUpdateOptions) (*armruntime.Poller[ServicesClientUpdateResponse], error)
BeginUpdate - Patch a given StorageSyncService. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/StorageSyncServices_Update.json
package main import ( "context" "log" "time" "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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<storage-sync-service-name>", &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"), }, }, ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServicesClient) CheckNameAvailability ¶ added in v0.2.0
func (client *ServicesClient) CheckNameAvailability(ctx context.Context, locationName string, parameters CheckNameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Check the give namespace name availability. If the operation fails it returns an *azcore.ResponseError type. 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CheckNameAvailability(ctx, "<location-name>", armstoragesync.CheckNameAvailabilityParameters{ Name: to.Ptr("<name>"), Type: to.Ptr("<type>"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServicesClient) ListByResourceGroup ¶ added in v0.2.0
func (client *ServicesClient) ListByResourceGroup(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
ListByResourceGroup - Get a StorageSyncService list by Resource group name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. The name is case insensitive. options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ServicesClient) ListBySubscription ¶ added in v0.2.0
func (client *ServicesClient) ListBySubscription(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse]
ListBySubscription - Get a StorageSyncService list by subscription. If the operation fails it returns an *azcore.ResponseError type. options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewServicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySubscription(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 {
CheckNameAvailabilityResult
}
ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability.
type ServicesClientCreateResponse ¶ added in v0.2.0
type ServicesClientCreateResponse struct {
Service
}
ServicesClientCreateResponse contains the response from method ServicesClient.Create.
type ServicesClientDeleteResponse ¶ added in v0.2.0
type ServicesClientDeleteResponse struct { }
ServicesClientDeleteResponse contains the response from method ServicesClient.Delete.
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 { 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.ListByResourceGroup method.
type ServicesClientListByResourceGroupResponse ¶ added in v0.2.0
type ServicesClientListByResourceGroupResponse struct { 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.ListByResourceGroup.
type ServicesClientListBySubscriptionOptions ¶ added in v0.2.0
type ServicesClientListBySubscriptionOptions struct { }
ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method.
type ServicesClientListBySubscriptionResponse ¶ added in v0.2.0
type ServicesClientListBySubscriptionResponse struct { 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.ListBySubscription.
type ServicesClientUpdateResponse ¶ added in v0.2.0
type ServicesClientUpdateResponse struct {
Service
}
ServicesClientUpdateResponse contains the response from method ServicesClient.Update.
type SubscriptionState ¶
type SubscriptionState struct { // Subscription state properties. Properties interface{} `json:"properties,omitempty"` // State of Azure Subscription State *Reason `json:"state,omitempty"` // READ-ONLY; Is Transitioning Istransitioning *bool `json:"istransitioning,omitempty" azure:"ro"` }
SubscriptionState - Subscription State object.
type SyncGroup ¶
type SyncGroup struct { // SyncGroup properties. Properties *SyncGroupProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
SyncGroup - Sync Group object.
type SyncGroupArray ¶
type SyncGroupArray struct { // Collection of SyncGroup. Value []*SyncGroup `json:"value,omitempty"` }
SyncGroupArray - Array of SyncGroup
func (SyncGroupArray) MarshalJSON ¶
func (s SyncGroupArray) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupArray.
type SyncGroupCreateParameters ¶
type SyncGroupCreateParameters struct { // The parameters used to create the sync group Properties interface{} `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
SyncGroupCreateParameters - The parameters used when creating a sync group.
type SyncGroupProperties ¶
type SyncGroupProperties struct { // READ-ONLY; Sync group status SyncGroupStatus *string `json:"syncGroupStatus,omitempty" azure:"ro"` // READ-ONLY; Unique Id UniqueID *string `json:"uniqueId,omitempty" azure:"ro"` }
SyncGroupProperties - SyncGroup Properties object.
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Create(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", armstoragesync.SyncGroupCreateParameters{ Properties: map[string]interface{}{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<sync-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncGroupsClient) ListByStorageSyncService ¶
func (client *SyncGroupsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, options *SyncGroupsClientListByStorageSyncServiceOptions) *runtime.Pager[SyncGroupsClientListByStorageSyncServiceResponse]
ListByStorageSyncService - Get a SyncGroup List. If the operation fails it returns an *azcore.ResponseError type. 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.ListByStorageSyncService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByStorageSyncService("<resource-group-name>", "<storage-sync-service-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 { 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 { 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.ListByStorageSyncService method.
type SyncGroupsClientListByStorageSyncServiceResponse ¶ added in v0.2.0
type SyncGroupsClientListByStorageSyncServiceResponse struct { 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.ListByStorageSyncService.
type SystemData ¶ added in v0.3.0
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 `json:"location,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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.
type TriggerChangeDetectionParameters ¶
type TriggerChangeDetectionParameters struct { // Change Detection Mode. Applies to a directory specified in directoryPath parameter. ChangeDetectionMode *ChangeDetectionMode `json:"changeDetectionMode,omitempty"` // Relative path to a directory Azure File share for which change detection is to be performed. DirectoryPath *string `json:"directoryPath,omitempty"` // Array of relative paths on the Azure File share to be included in the change detection. Can be files and directories. Paths []*string `json:"paths,omitempty"` }
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.
type TriggerRolloverRequest ¶
type TriggerRolloverRequest struct { // Certificate Data ServerCertificate *string `json:"serverCertificate,omitempty"` }
TriggerRolloverRequest - Trigger Rollover Request.
type Workflow ¶
type Workflow struct { // Workflow properties. Properties *WorkflowProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Workflow resource.
type WorkflowArray ¶
type WorkflowArray struct { // Collection of workflow items. Value []*Workflow `json:"value,omitempty"` }
WorkflowArray - Array of Workflow
func (WorkflowArray) MarshalJSON ¶
func (w WorkflowArray) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkflowArray.
type WorkflowProperties ¶
type WorkflowProperties struct { // workflow last operation identifier. LastOperationID *string `json:"lastOperationId,omitempty"` // last step name LastStepName *string `json:"lastStepName,omitempty"` // operation direction. Operation *OperationDirection `json:"operation,omitempty"` // workflow status. Status *WorkflowStatus `json:"status,omitempty"` // workflow steps Steps *string `json:"steps,omitempty"` // READ-ONLY; workflow command name. CommandName *string `json:"commandName,omitempty" azure:"ro"` // READ-ONLY; workflow created timestamp. CreatedTimestamp *time.Time `json:"createdTimestamp,omitempty" azure:"ro"` // READ-ONLY; workflow last status timestamp. LastStatusTimestamp *time.Time `json:"lastStatusTimestamp,omitempty" azure:"ro"` }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewWorkflowsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Abort(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<workflow-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. 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/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewWorkflowsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<storage-sync-service-name>", "<workflow-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*WorkflowsClient) ListByStorageSyncService ¶
func (client *WorkflowsClient) ListByStorageSyncService(resourceGroupName string, storageSyncServiceName string, options *WorkflowsClientListByStorageSyncServiceOptions) *runtime.Pager[WorkflowsClientListByStorageSyncServiceResponse]
ListByStorageSyncService - Get a Workflow List If the operation fails it returns an *azcore.ResponseError type. 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.ListByStorageSyncService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/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) return } ctx := context.Background() client, err := armstoragesync.NewWorkflowsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByStorageSyncService("<resource-group-name>", "<storage-sync-service-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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 // 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.ListByStorageSyncService method.
type WorkflowsClientListByStorageSyncServiceResponse ¶ added in v0.2.0
type WorkflowsClientListByStorageSyncServiceResponse struct { 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.ListByStorageSyncService.
Source Files ¶
- build.go
- zz_generated_cloudendpoints_client.go
- zz_generated_constants.go
- zz_generated_microsoftstoragesync_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_operationstatus_client.go
- zz_generated_privateendpointconnections_client.go
- zz_generated_privatelinkresources_client.go
- zz_generated_registeredservers_client.go
- zz_generated_response_types.go
- zz_generated_serverendpoints_client.go
- zz_generated_services_client.go
- zz_generated_syncgroups_client.go
- zz_generated_time_rfc3339.go
- zz_generated_workflows_client.go