armstoragemover

package module
v2.1.0 Latest Latest
Warning

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

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

README

Azure Storage Mover Module for Go

PkgGoDev

The armstoragemover module provides operations for working with Azure Storage Mover.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Storage Mover module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewStorageMoversClient()

Fakes

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

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

Provide Feedback

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

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type Agent

type Agent struct {
	// REQUIRED
	Properties *AgentProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

Agent - The Agent resource.

func (Agent) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Agent.

func (*Agent) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Agent.

type AgentList

type AgentList struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*Agent
}

AgentList - List of Agents.

func (AgentList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentList.

func (*AgentList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentList.

type AgentProperties

type AgentProperties struct {
	// REQUIRED; The fully qualified resource ID of the Hybrid Compute resource for the Agent.
	ArcResourceID *string

	// REQUIRED; The VM UUID of the Hybrid Compute resource for the Agent.
	ArcVMUUID *string

	// A description for the Agent.
	Description *string

	// READ-ONLY; The Agent status.
	AgentStatus *AgentStatus

	// READ-ONLY; The Agent version.
	AgentVersion *string

	// READ-ONLY
	ErrorDetails *AgentPropertiesErrorDetails

	// READ-ONLY; The last updated time of the Agent status.
	LastStatusUpdate *time.Time

	// READ-ONLY; Local IP address reported by the Agent.
	LocalIPAddress *string

	// READ-ONLY; Available memory reported by the Agent, in MB.
	MemoryInMB *int64

	// READ-ONLY; Available compute cores reported by the Agent.
	NumberOfCores *int64

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Uptime of the Agent in seconds.
	UptimeInSeconds *int64
}

func (AgentProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentProperties.

func (*AgentProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentProperties.

type AgentPropertiesErrorDetails

type AgentPropertiesErrorDetails struct {
	// Error code reported by Agent
	Code *string

	// Expanded description of reported error code
	Message *string
}

func (AgentPropertiesErrorDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentPropertiesErrorDetails.

func (*AgentPropertiesErrorDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentPropertiesErrorDetails.

type AgentStatus

type AgentStatus string

AgentStatus - The Agent status.

const (
	AgentStatusExecuting         AgentStatus = "Executing"
	AgentStatusOffline           AgentStatus = "Offline"
	AgentStatusOnline            AgentStatus = "Online"
	AgentStatusRegistering       AgentStatus = "Registering"
	AgentStatusRequiresAttention AgentStatus = "RequiresAttention"
	AgentStatusUnregistering     AgentStatus = "Unregistering"
)

func PossibleAgentStatusValues

func PossibleAgentStatusValues() []AgentStatus

PossibleAgentStatusValues returns the possible values for the AgentStatus const type.

type AgentUpdateParameters

type AgentUpdateParameters struct {
	Properties *AgentUpdateProperties
}

AgentUpdateParameters - The Agent resource.

func (AgentUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentUpdateParameters.

func (*AgentUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateParameters.

type AgentUpdateProperties

type AgentUpdateProperties struct {
	// A description for the Agent.
	Description *string
}

func (AgentUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AgentUpdateProperties.

func (*AgentUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateProperties.

type AgentsClient

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

AgentsClient contains the methods for the Agents group. Don't use this type directly, use NewAgentsClient() instead.

func NewAgentsClient

func NewAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentsClient, error)

NewAgentsClient creates a new instance of AgentsClient 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 (*AgentsClient) BeginDelete

func (client *AgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, options *AgentsClientBeginDeleteOptions) (*runtime.Poller[AgentsClientDeleteResponse], error)

BeginDelete - Deletes an Agent resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • agentName - The name of the Agent resource.
  • options - AgentsClientBeginDeleteOptions contains the optional parameters for the AgentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Agents_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAgentsClient().BeginDelete(ctx, "examples-rg", "examples-storageMoverName", "examples-agentName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*AgentsClient) CreateOrUpdate

func (client *AgentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, agent Agent, options *AgentsClientCreateOrUpdateOptions) (AgentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • agentName - The name of the Agent resource.
  • options - AgentsClientCreateOrUpdateOptions contains the optional parameters for the AgentsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Agents_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAgentsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-agentName", armstoragemover.Agent{
	Properties: &armstoragemover.AgentProperties{
		Description:   to.Ptr("Example Agent Description"),
		ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"),
		ArcVMUUID:     to.Ptr("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Agent = armstoragemover.Agent{
// 	Name: to.Ptr("examples-agentName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"),
// 	Properties: &armstoragemover.AgentProperties{
// 		Description: to.Ptr("Example Agent Description"),
// 		AgentStatus: to.Ptr(armstoragemover.AgentStatusRegistering),
// 		AgentVersion: to.Ptr("1.0.0"),
// 		ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"),
// 		ArcVMUUID: to.Ptr("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
// 	},
// }
Output:

func (*AgentsClient) Get

func (client *AgentsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, options *AgentsClientGetOptions) (AgentsClientGetResponse, error)

Get - Gets an Agent resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • agentName - The name of the Agent resource.
  • options - AgentsClientGetOptions contains the optional parameters for the AgentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Agents_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAgentsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-agentName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Agent = armstoragemover.Agent{
// 	Name: to.Ptr("examples-agentName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"),
// 	SystemData: &armstoragemover.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 	},
// 	Properties: &armstoragemover.AgentProperties{
// 		Description: to.Ptr("Example Agent Description"),
// 		AgentStatus: to.Ptr(armstoragemover.AgentStatusOnline),
// 		AgentVersion: to.Ptr("1.0.0"),
// 		ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"),
// 		ArcVMUUID: to.Ptr("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
// 		LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
// 		LocalIPAddress: to.Ptr("192.168.0.0"),
// 		MemoryInMB: to.Ptr[int64](100024),
// 		NumberOfCores: to.Ptr[int64](32),
// 		UptimeInSeconds: to.Ptr[int64](522),
// 	},
// }
Output:

func (*AgentsClient) NewListPager

func (client *AgentsClient) NewListPager(resourceGroupName string, storageMoverName string, options *AgentsClientListOptions) *runtime.Pager[AgentsClientListResponse]

NewListPager - Lists all Agents in a Storage Mover.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - AgentsClientListOptions contains the optional parameters for the AgentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Agents_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAgentsClient().NewListPager("examples-rg", "examples-storageMoverName", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AgentList = armstoragemover.AgentList{
	// 	Value: []*armstoragemover.Agent{
	// 		{
	// 			Name: to.Ptr("examples-agentName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName1"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Properties: &armstoragemover.AgentProperties{
	// 				Description: to.Ptr("Example Agent 1 Description"),
	// 				AgentStatus: to.Ptr(armstoragemover.AgentStatusOnline),
	// 				AgentVersion: to.Ptr("1.0.0"),
	// 				ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName1"),
	// 				ArcVMUUID: to.Ptr("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				LocalIPAddress: to.Ptr("192.168.0.0"),
	// 				MemoryInMB: to.Ptr[int64](100024),
	// 				NumberOfCores: to.Ptr[int64](32),
	// 				UptimeInSeconds: to.Ptr[int64](522),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-agentName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName2"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Properties: &armstoragemover.AgentProperties{
	// 				Description: to.Ptr("Example Agent 2 Description"),
	// 				AgentStatus: to.Ptr(armstoragemover.AgentStatusOnline),
	// 				AgentVersion: to.Ptr("1.0.0"),
	// 				ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName2"),
	// 				ArcVMUUID: to.Ptr("147a1f84-7bbf-4e99-9a6a-a1735a91dfd5"),
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				LocalIPAddress: to.Ptr("192.168.0.0"),
	// 				MemoryInMB: to.Ptr[int64](100024),
	// 				NumberOfCores: to.Ptr[int64](32),
	// 				UptimeInSeconds: to.Ptr[int64](522),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-agentName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName3"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Properties: &armstoragemover.AgentProperties{
	// 				Description: to.Ptr("Example Agent 3 Description"),
	// 				AgentStatus: to.Ptr(armstoragemover.AgentStatusOnline),
	// 				AgentVersion: to.Ptr("1.0.0"),
	// 				ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName3"),
	// 				ArcVMUUID: to.Ptr("648a7958-f99e-4268-b20e-94c96558dc0d"),
	// 				ErrorDetails: &armstoragemover.AgentPropertiesErrorDetails{
	// 					Code: to.Ptr("SampleErrorCode"),
	// 					Message: to.Ptr("Detailed sample error message."),
	// 				},
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				LocalIPAddress: to.Ptr("192.168.0.0"),
	// 				MemoryInMB: to.Ptr[int64](100024),
	// 				NumberOfCores: to.Ptr[int64](32),
	// 				UptimeInSeconds: to.Ptr[int64](522),
	// 			},
	// 	}},
	// }
}
Output:

func (*AgentsClient) Update

func (client *AgentsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, agent AgentUpdateParameters, options *AgentsClientUpdateOptions) (AgentsClientUpdateResponse, error)

Update - Creates or updates an Agent resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • agentName - The name of the Agent resource.
  • options - AgentsClientUpdateOptions contains the optional parameters for the AgentsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Agents_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAgentsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-agentName", armstoragemover.AgentUpdateParameters{
	Properties: &armstoragemover.AgentUpdateProperties{
		Description: to.Ptr("Updated Agent Description"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Agent = armstoragemover.Agent{
// 	Name: to.Ptr("examples-agentName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"),
// 	Properties: &armstoragemover.AgentProperties{
// 		Description: to.Ptr("Updated Agent Description"),
// 		AgentStatus: to.Ptr(armstoragemover.AgentStatusOnline),
// 		AgentVersion: to.Ptr("1.0.0"),
// 		ArcResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"),
// 		ArcVMUUID: to.Ptr("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
// 		LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
// 		LocalIPAddress: to.Ptr("192.168.0.0"),
// 		MemoryInMB: to.Ptr[int64](100024),
// 		NumberOfCores: to.Ptr[int64](32),
// 		UptimeInSeconds: to.Ptr[int64](522),
// 	},
// }
Output:

type AgentsClientBeginDeleteOptions

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

AgentsClientBeginDeleteOptions contains the optional parameters for the AgentsClient.BeginDelete method.

type AgentsClientCreateOrUpdateOptions

type AgentsClientCreateOrUpdateOptions struct {
}

AgentsClientCreateOrUpdateOptions contains the optional parameters for the AgentsClient.CreateOrUpdate method.

type AgentsClientCreateOrUpdateResponse

type AgentsClientCreateOrUpdateResponse struct {
	// The Agent resource.
	Agent
}

AgentsClientCreateOrUpdateResponse contains the response from method AgentsClient.CreateOrUpdate.

type AgentsClientDeleteResponse

type AgentsClientDeleteResponse struct {
}

AgentsClientDeleteResponse contains the response from method AgentsClient.BeginDelete.

type AgentsClientGetOptions

type AgentsClientGetOptions struct {
}

AgentsClientGetOptions contains the optional parameters for the AgentsClient.Get method.

type AgentsClientGetResponse

type AgentsClientGetResponse struct {
	// The Agent resource.
	Agent
}

AgentsClientGetResponse contains the response from method AgentsClient.Get.

type AgentsClientListOptions

type AgentsClientListOptions struct {
}

AgentsClientListOptions contains the optional parameters for the AgentsClient.NewListPager method.

type AgentsClientListResponse

type AgentsClientListResponse struct {
	// List of Agents.
	AgentList
}

AgentsClientListResponse contains the response from method AgentsClient.NewListPager.

type AgentsClientUpdateOptions

type AgentsClientUpdateOptions struct {
}

AgentsClientUpdateOptions contains the optional parameters for the AgentsClient.Update method.

type AgentsClientUpdateResponse

type AgentsClientUpdateResponse struct {
	// The Agent resource.
	Agent
}

AgentsClientUpdateResponse contains the response from method AgentsClient.Update.

type AzureKeyVaultSmbCredentials

type AzureKeyVaultSmbCredentials struct {
	// REQUIRED; The Credentials type.
	Type *CredentialType

	// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.
	PasswordURI *string

	// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.
	UsernameURI *string
}

AzureKeyVaultSmbCredentials - The Azure Key Vault secret URIs which store the credentials.

func (*AzureKeyVaultSmbCredentials) GetCredentials

func (a *AzureKeyVaultSmbCredentials) GetCredentials() *Credentials

GetCredentials implements the CredentialsClassification interface for type AzureKeyVaultSmbCredentials.

func (AzureKeyVaultSmbCredentials) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureKeyVaultSmbCredentials.

func (*AzureKeyVaultSmbCredentials) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureKeyVaultSmbCredentials.

type AzureStorageBlobContainerEndpointProperties

type AzureStorageBlobContainerEndpointProperties struct {
	// REQUIRED; The name of the Storage blob container that is the target destination.
	BlobContainerName *string

	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// REQUIRED; The Azure Resource ID of the storage account that is the target destination.
	StorageAccountResourceID *string

	// A description for the Endpoint.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

AzureStorageBlobContainerEndpointProperties - The properties of Azure Storage blob container endpoint.

func (*AzureStorageBlobContainerEndpointProperties) GetEndpointBaseProperties

GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageBlobContainerEndpointProperties.

func (AzureStorageBlobContainerEndpointProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointProperties.

func (*AzureStorageBlobContainerEndpointProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointProperties.

type AzureStorageBlobContainerEndpointUpdateProperties

type AzureStorageBlobContainerEndpointUpdateProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// A description for the Endpoint.
	Description *string
}

func (*AzureStorageBlobContainerEndpointUpdateProperties) GetEndpointBaseUpdateProperties

GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageBlobContainerEndpointUpdateProperties.

func (AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties.

func (*AzureStorageBlobContainerEndpointUpdateProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties.

type AzureStorageSmbFileShareEndpointProperties

type AzureStorageSmbFileShareEndpointProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// REQUIRED; The name of the Azure Storage file share.
	FileShareName *string

	// REQUIRED; The Azure Resource ID of the storage account.
	StorageAccountResourceID *string

	// A description for the Endpoint.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

AzureStorageSmbFileShareEndpointProperties - The properties of Azure Storage SMB file share endpoint.

func (*AzureStorageSmbFileShareEndpointProperties) GetEndpointBaseProperties

GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageSmbFileShareEndpointProperties.

func (AzureStorageSmbFileShareEndpointProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointProperties.

func (*AzureStorageSmbFileShareEndpointProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointProperties.

type AzureStorageSmbFileShareEndpointUpdateProperties

type AzureStorageSmbFileShareEndpointUpdateProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// A description for the Endpoint.
	Description *string
}

AzureStorageSmbFileShareEndpointUpdateProperties - The properties of Azure Storage SMB file share endpoint to update.

func (*AzureStorageSmbFileShareEndpointUpdateProperties) GetEndpointBaseUpdateProperties

GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageSmbFileShareEndpointUpdateProperties.

func (AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties.

func (*AzureStorageSmbFileShareEndpointUpdateProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties.

type ClientFactory

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

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

func (*ClientFactory) NewAgentsClient

func (c *ClientFactory) NewAgentsClient() *AgentsClient

NewAgentsClient creates a new instance of AgentsClient.

func (*ClientFactory) NewEndpointsClient

func (c *ClientFactory) NewEndpointsClient() *EndpointsClient

NewEndpointsClient creates a new instance of EndpointsClient.

func (*ClientFactory) NewJobDefinitionsClient

func (c *ClientFactory) NewJobDefinitionsClient() *JobDefinitionsClient

NewJobDefinitionsClient creates a new instance of JobDefinitionsClient.

func (*ClientFactory) NewJobRunsClient

func (c *ClientFactory) NewJobRunsClient() *JobRunsClient

NewJobRunsClient creates a new instance of JobRunsClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewProjectsClient

func (c *ClientFactory) NewProjectsClient() *ProjectsClient

NewProjectsClient creates a new instance of ProjectsClient.

func (*ClientFactory) NewStorageMoversClient

func (c *ClientFactory) NewStorageMoversClient() *StorageMoversClient

NewStorageMoversClient creates a new instance of StorageMoversClient.

type CopyMode

type CopyMode string

CopyMode - Strategy to use for copy.

const (
	CopyModeAdditive CopyMode = "Additive"
	CopyModeMirror   CopyMode = "Mirror"
)

func PossibleCopyModeValues

func PossibleCopyModeValues() []CopyMode

PossibleCopyModeValues returns the possible values for the CopyMode const type.

type CreatedByType

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

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CredentialType

type CredentialType string

CredentialType - The Credentials type.

const (
	CredentialTypeAzureKeyVaultSmb CredentialType = "AzureKeyVaultSmb"
)

func PossibleCredentialTypeValues

func PossibleCredentialTypeValues() []CredentialType

PossibleCredentialTypeValues returns the possible values for the CredentialType const type.

type Credentials

type Credentials struct {
	// REQUIRED; The Credentials type.
	Type *CredentialType
}

Credentials - The Credentials.

func (*Credentials) GetCredentials

func (c *Credentials) GetCredentials() *Credentials

GetCredentials implements the CredentialsClassification interface for type Credentials.

func (Credentials) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Credentials.

func (*Credentials) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Credentials.

type CredentialsClassification

type CredentialsClassification interface {
	// GetCredentials returns the Credentials content of the underlying type.
	GetCredentials() *Credentials
}

CredentialsClassification provides polymorphic access to related types. Call the interface's GetCredentials() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureKeyVaultSmbCredentials, *Credentials

type Endpoint

type Endpoint struct {
	// REQUIRED; The resource specific properties for the Storage Mover resource.
	Properties EndpointBasePropertiesClassification

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

Endpoint - The Endpoint resource, which contains information about file sources and targets.

func (Endpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Endpoint.

func (*Endpoint) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint.

type EndpointBaseProperties

type EndpointBaseProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// A description for the Endpoint.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

EndpointBaseProperties - The resource specific properties for the Storage Mover resource.

func (*EndpointBaseProperties) GetEndpointBaseProperties

func (e *EndpointBaseProperties) GetEndpointBaseProperties() *EndpointBaseProperties

GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type EndpointBaseProperties.

func (EndpointBaseProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointBaseProperties.

func (*EndpointBaseProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseProperties.

type EndpointBasePropertiesClassification

type EndpointBasePropertiesClassification interface {
	// GetEndpointBaseProperties returns the EndpointBaseProperties content of the underlying type.
	GetEndpointBaseProperties() *EndpointBaseProperties
}

EndpointBasePropertiesClassification provides polymorphic access to related types. Call the interface's GetEndpointBaseProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureStorageBlobContainerEndpointProperties, *AzureStorageSmbFileShareEndpointProperties, *EndpointBaseProperties, *NfsMountEndpointProperties, - *SmbMountEndpointProperties

type EndpointBaseUpdateParameters

type EndpointBaseUpdateParameters struct {
	// The Endpoint resource, which contains information about file sources and targets.
	Properties EndpointBaseUpdatePropertiesClassification
}

EndpointBaseUpdateParameters - The Endpoint resource.

func (EndpointBaseUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateParameters.

func (*EndpointBaseUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateParameters.

type EndpointBaseUpdateProperties

type EndpointBaseUpdateProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// A description for the Endpoint.
	Description *string
}

EndpointBaseUpdateProperties - The Endpoint resource, which contains information about file sources and targets.

func (*EndpointBaseUpdateProperties) GetEndpointBaseUpdateProperties

func (e *EndpointBaseUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties

GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type EndpointBaseUpdateProperties.

func (EndpointBaseUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateProperties.

func (*EndpointBaseUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateProperties.

type EndpointBaseUpdatePropertiesClassification

type EndpointBaseUpdatePropertiesClassification interface {
	// GetEndpointBaseUpdateProperties returns the EndpointBaseUpdateProperties content of the underlying type.
	GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties
}

EndpointBaseUpdatePropertiesClassification provides polymorphic access to related types. Call the interface's GetEndpointBaseUpdateProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureStorageBlobContainerEndpointUpdateProperties, *AzureStorageSmbFileShareEndpointUpdateProperties, *EndpointBaseUpdateProperties, - *NfsMountEndpointUpdateProperties, *SmbMountEndpointUpdateProperties

type EndpointList

type EndpointList struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*Endpoint
}

EndpointList - List of Endpoints.

func (EndpointList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointList.

func (*EndpointList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointList.

type EndpointType

type EndpointType string

EndpointType - The Endpoint resource type.

const (
	EndpointTypeAzureStorageBlobContainer EndpointType = "AzureStorageBlobContainer"
	EndpointTypeAzureStorageSmbFileShare  EndpointType = "AzureStorageSmbFileShare"
	EndpointTypeNfsMount                  EndpointType = "NfsMount"
	EndpointTypeSmbMount                  EndpointType = "SmbMount"
)

func PossibleEndpointTypeValues

func PossibleEndpointTypeValues() []EndpointType

PossibleEndpointTypeValues returns the possible values for the EndpointType const type.

type EndpointsClient

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

EndpointsClient contains the methods for the Endpoints group. Don't use this type directly, use NewEndpointsClient() instead.

func NewEndpointsClient

func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error)

NewEndpointsClient creates a new instance of EndpointsClient 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 (*EndpointsClient) BeginDelete

func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error)

BeginDelete - Deletes an Endpoint resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • endpointName - The name of the Endpoint resource.
  • options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewEndpointsClient().BeginDelete(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*EndpointsClient) CreateOrUpdate

func (client *EndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint Endpoint, options *EndpointsClientCreateOrUpdateOptions) (EndpointsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Endpoint resource, which represents a data transfer source or destination. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • endpointName - The name of the Endpoint resource.
  • options - EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method.
Example (EndpointsCreateOrUpdateAzureStorageBlobContainer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.Endpoint{
	Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
		Description:              to.Ptr("Example Storage Blob Container Endpoint Description"),
		EndpointType:             to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
		BlobContainerName:        to.Ptr("examples-blobcontainer"),
		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
// 		Description: to.Ptr("Example Storage Blob Container Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		BlobContainerName: to.Ptr("examples-blobcontainer"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsCreateOrUpdateAzureStorageSmbFileShare)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.Endpoint{
	Properties: &armstoragemover.AzureStorageSmbFileShareEndpointProperties{
		Description:              to.Ptr("Example Storage File Share Endpoint Description"),
		EndpointType:             to.Ptr(armstoragemover.EndpointTypeAzureStorageSmbFileShare),
		FileShareName:            to.Ptr("examples-fileshare"),
		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageSmbFileShareEndpointProperties{
// 		Description: to.Ptr("Example Storage File Share Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageSmbFileShare),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		FileShareName: to.Ptr("examples-fileshare"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsCreateOrUpdateNfsMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_CreateOrUpdate_NfsMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.Endpoint{
	Properties: &armstoragemover.NfsMountEndpointProperties{
		Description:  to.Ptr("Example NFS Mount Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
		Export:       to.Ptr("examples-exportName"),
		Host:         to.Ptr("0.0.0.0"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.NfsMountEndpointProperties{
// 		Description: to.Ptr("Example NFS Mount Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Export: to.Ptr("examples-exportName"),
// 		Host: to.Ptr("0.0.0.0"),
// 		NfsVersion: to.Ptr(armstoragemover.NfsVersionNFSauto),
// 	},
// }
Output:

Example (EndpointsCreateOrUpdateSmbMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_CreateOrUpdate_SmbMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.Endpoint{
	Properties: &armstoragemover.SmbMountEndpointProperties{
		Description:  to.Ptr("Example SMB Mount Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeSmbMount),
		Credentials: &armstoragemover.AzureKeyVaultSmbCredentials{
			Type:        to.Ptr(armstoragemover.CredentialTypeAzureKeyVaultSmb),
			PasswordURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"),
			UsernameURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-username"),
		},
		Host:      to.Ptr("0.0.0.0"),
		ShareName: to.Ptr("examples-shareName"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.SmbMountEndpointProperties{
// 		Description: to.Ptr("Example SMB Mount Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeSmbMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Credentials: &armstoragemover.AzureKeyVaultSmbCredentials{
// 			Type: to.Ptr(armstoragemover.CredentialTypeAzureKeyVaultSmb),
// 			PasswordURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"),
// 			UsernameURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-username"),
// 		},
// 		Host: to.Ptr("0.0.0.0"),
// 		ShareName: to.Ptr("examples-shareName"),
// 	},
// }
Output:

func (*EndpointsClient) Get

func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error)

Get - Gets an Endpoint resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • endpointName - The name of the Endpoint resource.
  • options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.
Example (EndpointsGetAzureStorageBlobContainer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Get_AzureStorageBlobContainer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
// 		Description: to.Ptr("Example Storage Blob Container Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		BlobContainerName: to.Ptr("examples-blobcontainer"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsGetAzureStorageSmbFileShare)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Get_AzureStorageSmbFileShare.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageSmbFileShareEndpointProperties{
// 		Description: to.Ptr("Example Storage File Share Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageSmbFileShare),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		FileShareName: to.Ptr("examples-fileshare"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsGetNfsMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Get_NfsMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.NfsMountEndpointProperties{
// 		Description: to.Ptr("Example NFS Mount Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Export: to.Ptr("examples-exportName"),
// 		Host: to.Ptr("0.0.0.0"),
// 		NfsVersion: to.Ptr(armstoragemover.NfsVersionNFSauto),
// 	},
// }
Output:

Example (EndpointsGetSmbMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Get_SmbMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.SmbMountEndpointProperties{
// 		Description: to.Ptr("Example SMB Mount Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeSmbMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Credentials: &armstoragemover.AzureKeyVaultSmbCredentials{
// 			Type: to.Ptr(armstoragemover.CredentialTypeAzureKeyVaultSmb),
// 			PasswordURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"),
// 			UsernameURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-username"),
// 		},
// 		Host: to.Ptr("0.0.0.0"),
// 		ShareName: to.Ptr("examples-shareName"),
// 	},
// }
Output:

func (*EndpointsClient) NewListPager

func (client *EndpointsClient) NewListPager(resourceGroupName string, storageMoverName string, options *EndpointsClientListOptions) *runtime.Pager[EndpointsClientListResponse]

NewListPager - Lists all Endpoints in a Storage Mover.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEndpointsClient().NewListPager("examples-rg", "examples-storageMoverName", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.EndpointList = armstoragemover.EndpointList{
	// 	Value: []*armstoragemover.Endpoint{
	// 		{
	// 			Name: to.Ptr("examples-endpointName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName1"),
	// 			Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
	// 				Description: to.Ptr("Example Storage Container Endpoint 1 Description"),
	// 				EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
	// 				ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
	// 				BlobContainerName: to.Ptr("examples-blobcontainer1"),
	// 				StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-endpointName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName2"),
	// 			Properties: &armstoragemover.NfsMountEndpointProperties{
	// 				Description: to.Ptr("Example Storage Container Endpoint 2 Description"),
	// 				EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
	// 				ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
	// 				Export: to.Ptr("/"),
	// 				Host: to.Ptr("0.0.0.0"),
	// 				NfsVersion: to.Ptr(armstoragemover.NfsVersionNFSv4),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-endpointName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName3"),
	// 			Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
	// 				Description: to.Ptr("Example Storage Container Endpoint 3 Description"),
	// 				EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
	// 				ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
	// 				BlobContainerName: to.Ptr("examples-blobcontainer3"),
	// 				StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
	// 			},
	// 	}},
	// }
}
Output:

func (*EndpointsClient) Update

func (client *EndpointsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint EndpointBaseUpdateParameters, options *EndpointsClientUpdateOptions) (EndpointsClientUpdateResponse, error)

Update - Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • endpointName - The name of the Endpoint resource.
  • options - EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method.
Example (EndpointsUpdateAzureStorageBlobContainer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Update_AzureStorageBlobContainer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.EndpointBaseUpdateParameters{
	Properties: &armstoragemover.AzureStorageBlobContainerEndpointUpdateProperties{
		Description:  to.Ptr("Updated Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{
// 		Description: to.Ptr("Updated Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		BlobContainerName: to.Ptr("examples-blobcontainer"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsUpdateAzureStorageSmbFileShare)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Update_AzureStorageSmbFileShare.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.EndpointBaseUpdateParameters{
	Properties: &armstoragemover.AzureStorageSmbFileShareEndpointUpdateProperties{
		Description:  to.Ptr("Updated Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageSmbFileShare),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.AzureStorageSmbFileShareEndpointProperties{
// 		Description: to.Ptr("Updated Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageSmbFileShare),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		FileShareName: to.Ptr("examples-fileshare"),
// 		StorageAccountResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examplesa"),
// 	},
// }
Output:

Example (EndpointsUpdateNfsMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Update_NfsMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.EndpointBaseUpdateParameters{
	Properties: &armstoragemover.NfsMountEndpointUpdateProperties{
		Description:  to.Ptr("Updated Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.NfsMountEndpointProperties{
// 		Description: to.Ptr("Updated Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeNfsMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Export: to.Ptr("examples-exportName"),
// 		Host: to.Ptr("0.0.0.0"),
// 		NfsVersion: to.Ptr(armstoragemover.NfsVersionNFSauto),
// 	},
// }
Output:

Example (EndpointsUpdateSmbMount)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Endpoints_Update_SmbMount.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEndpointsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.EndpointBaseUpdateParameters{
	Properties: &armstoragemover.SmbMountEndpointUpdateProperties{
		Description:  to.Ptr("Updated Endpoint Description"),
		EndpointType: to.Ptr(armstoragemover.EndpointTypeSmbMount),
		Credentials: &armstoragemover.AzureKeyVaultSmbCredentials{
			Type:        to.Ptr(armstoragemover.CredentialTypeAzureKeyVaultSmb),
			PasswordURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-password"),
			UsernameURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-username"),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Endpoint = armstoragemover.Endpoint{
// 	Name: to.Ptr("examples-endpointName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"),
// 	Properties: &armstoragemover.SmbMountEndpointProperties{
// 		Description: to.Ptr("Updated Endpoint Description"),
// 		EndpointType: to.Ptr(armstoragemover.EndpointTypeSmbMount),
// 		ProvisioningState: to.Ptr(armstoragemover.ProvisioningStateSucceeded),
// 		Credentials: &armstoragemover.AzureKeyVaultSmbCredentials{
// 			Type: to.Ptr(armstoragemover.CredentialTypeAzureKeyVaultSmb),
// 			PasswordURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-password"),
// 			UsernameURI: to.Ptr("https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-username"),
// 		},
// 		Host: to.Ptr("0.0.0.0"),
// 		ShareName: to.Ptr("examples-shareName"),
// 	},
// }
Output:

type EndpointsClientBeginDeleteOptions

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

EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method.

type EndpointsClientCreateOrUpdateOptions

type EndpointsClientCreateOrUpdateOptions struct {
}

EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method.

type EndpointsClientCreateOrUpdateResponse

type EndpointsClientCreateOrUpdateResponse struct {
	// The Endpoint resource, which contains information about file sources and targets.
	Endpoint
}

EndpointsClientCreateOrUpdateResponse contains the response from method EndpointsClient.CreateOrUpdate.

type EndpointsClientDeleteResponse

type EndpointsClientDeleteResponse struct {
}

EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete.

type EndpointsClientGetOptions

type EndpointsClientGetOptions struct {
}

EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method.

type EndpointsClientGetResponse

type EndpointsClientGetResponse struct {
	// The Endpoint resource, which contains information about file sources and targets.
	Endpoint
}

EndpointsClientGetResponse contains the response from method EndpointsClient.Get.

type EndpointsClientListOptions

type EndpointsClientListOptions struct {
}

EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method.

type EndpointsClientListResponse

type EndpointsClientListResponse struct {
	// List of Endpoints.
	EndpointList
}

EndpointsClientListResponse contains the response from method EndpointsClient.NewListPager.

type EndpointsClientUpdateOptions

type EndpointsClientUpdateOptions struct {
}

EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method.

type EndpointsClientUpdateResponse

type EndpointsClientUpdateResponse struct {
	// The Endpoint resource, which contains information about file sources and targets.
	Endpoint
}

EndpointsClientUpdateResponse contains the response from method EndpointsClient.Update.

type JobDefinition

type JobDefinition struct {
	// REQUIRED; Job definition properties.
	Properties *JobDefinitionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

JobDefinition - The Job Definition resource.

func (JobDefinition) MarshalJSON

func (j JobDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobDefinition.

func (*JobDefinition) UnmarshalJSON

func (j *JobDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinition.

type JobDefinitionList

type JobDefinitionList struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*JobDefinition
}

JobDefinitionList - List of Job Definitions.

func (JobDefinitionList) MarshalJSON

func (j JobDefinitionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobDefinitionList.

func (*JobDefinitionList) UnmarshalJSON

func (j *JobDefinitionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionList.

type JobDefinitionProperties

type JobDefinitionProperties struct {
	// REQUIRED; Strategy to use for copy.
	CopyMode *CopyMode

	// REQUIRED; The name of the source Endpoint.
	SourceName *string

	// REQUIRED; The name of the target Endpoint.
	TargetName *string

	// Name of the Agent to assign for new Job Runs of this Job Definition.
	AgentName *string

	// A description for the Job Definition.
	Description *string

	// The subpath to use when reading from the source Endpoint.
	SourceSubpath *string

	// The subpath to use when writing to the target Endpoint.
	TargetSubpath *string

	// READ-ONLY; Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.
	AgentResourceID *string

	// READ-ONLY; The name of the Job Run in a non-terminal state, if exists.
	LatestJobRunName *string

	// READ-ONLY; The fully qualified resource ID of the Job Run in a non-terminal state, if exists.
	LatestJobRunResourceID *string

	// READ-ONLY; The current status of the Job Run in a non-terminal state, if exists.
	LatestJobRunStatus *JobRunStatus

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Fully qualified resource ID of the source Endpoint.
	SourceResourceID *string

	// READ-ONLY; Fully qualified resource ID of the target Endpoint.
	TargetResourceID *string
}

JobDefinitionProperties - Job definition properties.

func (JobDefinitionProperties) MarshalJSON

func (j JobDefinitionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobDefinitionProperties.

func (*JobDefinitionProperties) UnmarshalJSON

func (j *JobDefinitionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionProperties.

type JobDefinitionUpdateParameters

type JobDefinitionUpdateParameters struct {
	// Job definition properties.
	Properties *JobDefinitionUpdateProperties
}

JobDefinitionUpdateParameters - The Job Definition resource.

func (JobDefinitionUpdateParameters) MarshalJSON

func (j JobDefinitionUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateParameters.

func (*JobDefinitionUpdateParameters) UnmarshalJSON

func (j *JobDefinitionUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateParameters.

type JobDefinitionUpdateProperties

type JobDefinitionUpdateProperties struct {
	// Name of the Agent to assign for new Job Runs of this Job Definition.
	AgentName *string

	// Strategy to use for copy.
	CopyMode *CopyMode

	// A description for the Job Definition.
	Description *string
}

JobDefinitionUpdateProperties - Job definition properties.

func (JobDefinitionUpdateProperties) MarshalJSON

func (j JobDefinitionUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateProperties.

func (*JobDefinitionUpdateProperties) UnmarshalJSON

func (j *JobDefinitionUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateProperties.

type JobDefinitionsClient

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

JobDefinitionsClient contains the methods for the JobDefinitions group. Don't use this type directly, use NewJobDefinitionsClient() instead.

func NewJobDefinitionsClient

func NewJobDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobDefinitionsClient, error)

NewJobDefinitionsClient creates a new instance of JobDefinitionsClient 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 (*JobDefinitionsClient) BeginDelete

func (client *JobDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientBeginDeleteOptions) (*runtime.Poller[JobDefinitionsClientDeleteResponse], error)

BeginDelete - Deletes a Job Definition resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientBeginDeleteOptions contains the optional parameters for the JobDefinitionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewJobDefinitionsClient().BeginDelete(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*JobDefinitionsClient) CreateOrUpdate

func (client *JobDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobDefinition JobDefinition, options *JobDefinitionsClientCreateOrUpdateOptions) (JobDefinitionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the JobDefinitionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobDefinitionsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", armstoragemover.JobDefinition{
	Properties: &armstoragemover.JobDefinitionProperties{
		Description:   to.Ptr("Example Job Definition Description"),
		AgentName:     to.Ptr("migration-agent"),
		CopyMode:      to.Ptr(armstoragemover.CopyModeAdditive),
		SourceName:    to.Ptr("examples-sourceEndpointName"),
		SourceSubpath: to.Ptr("/"),
		TargetName:    to.Ptr("examples-targetEndpointName"),
		TargetSubpath: to.Ptr("/"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobDefinition = armstoragemover.JobDefinition{
// 	Name: to.Ptr("examples-jobDefinitionName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName/jobDefinitionName"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-jobDefinitionName"),
// 	Properties: &armstoragemover.JobDefinitionProperties{
// 		Description: to.Ptr("Example Job Definition Description"),
// 		AgentName: to.Ptr("migration-agent"),
// 		AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
// 		CopyMode: to.Ptr(armstoragemover.CopyModeAdditive),
// 		SourceName: to.Ptr("examples-sourceEndpointName"),
// 		SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-sourceEndpointName"),
// 		SourceSubpath: to.Ptr("/"),
// 		TargetName: to.Ptr("examples-targetEndpointName"),
// 		TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-targetEndpointName"),
// 		TargetSubpath: to.Ptr("/"),
// 	},
// }
Output:

func (*JobDefinitionsClient) Get

func (client *JobDefinitionsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientGetOptions) (JobDefinitionsClientGetResponse, error)

Get - Gets a Job Definition resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientGetOptions contains the optional parameters for the JobDefinitionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobDefinitionsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobDefinition = armstoragemover.JobDefinition{
// 	Name: to.Ptr("examples-jobDefinitionName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName"),
// 	Properties: &armstoragemover.JobDefinitionProperties{
// 		Description: to.Ptr("Example Job Definition Description"),
// 		AgentName: to.Ptr("migration-agent"),
// 		AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
// 		CopyMode: to.Ptr(armstoragemover.CopyModeAdditive),
// 		SourceName: to.Ptr("examples-sourceEndpointName"),
// 		SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-sourceEndpointName"),
// 		SourceSubpath: to.Ptr("/"),
// 		TargetName: to.Ptr("examples-targetEndpointName"),
// 		TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-targetEndpointName"),
// 		TargetSubpath: to.Ptr("/"),
// 	},
// }
Output:

func (*JobDefinitionsClient) NewListPager

func (client *JobDefinitionsClient) NewListPager(resourceGroupName string, storageMoverName string, projectName string, options *JobDefinitionsClientListOptions) *runtime.Pager[JobDefinitionsClientListResponse]

NewListPager - Lists all Job Definitions in a Project.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • options - JobDefinitionsClientListOptions contains the optional parameters for the JobDefinitionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobDefinitionsClient().NewListPager("examples-rg", "examples-storageMoverName", "examples-projectName", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobDefinitionList = armstoragemover.JobDefinitionList{
	// 	Value: []*armstoragemover.JobDefinition{
	// 		{
	// 			Name: to.Ptr("examples-jobDefinitionName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName1"),
	// 			Properties: &armstoragemover.JobDefinitionProperties{
	// 				Description: to.Ptr("Example Job Definition 1 Description"),
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				CopyMode: to.Ptr(armstoragemover.CopyModeAdditive),
	// 				SourceName: to.Ptr("examples-sourceEndpointName1"),
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-sourceEndpointName1"),
	// 				SourceSubpath: to.Ptr("/"),
	// 				TargetName: to.Ptr("examples-targetEndpointName1"),
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-targetEndpointName1"),
	// 				TargetSubpath: to.Ptr("/"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-jobDefinitionName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName2"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Properties: &armstoragemover.JobDefinitionProperties{
	// 				Description: to.Ptr("Example Job Definition 2 Description"),
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				CopyMode: to.Ptr(armstoragemover.CopyModeAdditive),
	// 				SourceName: to.Ptr("examples-sourceEndpointName2"),
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-sourceEndpointName2"),
	// 				SourceSubpath: to.Ptr("/"),
	// 				TargetName: to.Ptr("examples-targetEndpointName2"),
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-targetEndpointName2"),
	// 				TargetSubpath: to.Ptr("/"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-jobDefinitionName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName3"),
	// 			Properties: &armstoragemover.JobDefinitionProperties{
	// 				Description: to.Ptr("Example Job Definition 3 Description"),
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				CopyMode: to.Ptr(armstoragemover.CopyModeMirror),
	// 				SourceName: to.Ptr("examples-sourceEndpointName3"),
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-sourceEndpointName3"),
	// 				SourceSubpath: to.Ptr("/"),
	// 				TargetName: to.Ptr("examples-targetEndpointName3"),
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-targetEndpointName3"),
	// 				TargetSubpath: to.Ptr("/"),
	// 			},
	// 	}},
	// }
}
Output:

func (*JobDefinitionsClient) StartJob

func (client *JobDefinitionsClient) StartJob(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientStartJobOptions) (JobDefinitionsClientStartJobResponse, error)

StartJob - Requests an Agent to start a new instance of this Job Definition, generating a new Job Run resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientStartJobOptions contains the optional parameters for the JobDefinitionsClient.StartJob method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_StartJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobDefinitionsClient().StartJob(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobRunResourceID = armstoragemover.JobRunResourceID{
// 	JobRunResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"),
// }
Output:

func (*JobDefinitionsClient) StopJob

func (client *JobDefinitionsClient) StopJob(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientStopJobOptions) (JobDefinitionsClientStopJobResponse, error)

StopJob - Requests the Agent of any active instance of this Job Definition to stop. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientStopJobOptions contains the optional parameters for the JobDefinitionsClient.StopJob method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_StopJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobDefinitionsClient().StopJob(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobRunResourceID = armstoragemover.JobRunResourceID{
// 	JobRunResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"),
// }
Output:

func (*JobDefinitionsClient) Update

func (client *JobDefinitionsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobDefinition JobDefinitionUpdateParameters, options *JobDefinitionsClientUpdateOptions) (JobDefinitionsClientUpdateResponse, error)

Update - Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobDefinitionsClientUpdateOptions contains the optional parameters for the JobDefinitionsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobDefinitions_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobDefinitionsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", armstoragemover.JobDefinitionUpdateParameters{
	Properties: &armstoragemover.JobDefinitionUpdateProperties{
		Description: to.Ptr("Updated Job Definition Description"),
		AgentName:   to.Ptr("updatedAgentName"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobDefinition = armstoragemover.JobDefinition{
// 	Name: to.Ptr("examples-jobDefinitionName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName/jobDefinitionName"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-jobDefinitionName"),
// 	Properties: &armstoragemover.JobDefinitionProperties{
// 		Description: to.Ptr("Updated Job Definition Description"),
// 		AgentName: to.Ptr("updatedAgentName"),
// 		AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
// 		CopyMode: to.Ptr(armstoragemover.CopyModeAdditive),
// 		SourceName: to.Ptr("updatedSource"),
// 		SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/updatedSource"),
// 		SourceSubpath: to.Ptr("/"),
// 		TargetName: to.Ptr("updatedTarget"),
// 		TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/updatedTarget"),
// 		TargetSubpath: to.Ptr("/"),
// 	},
// }
Output:

type JobDefinitionsClientBeginDeleteOptions

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

JobDefinitionsClientBeginDeleteOptions contains the optional parameters for the JobDefinitionsClient.BeginDelete method.

type JobDefinitionsClientCreateOrUpdateOptions

type JobDefinitionsClientCreateOrUpdateOptions struct {
}

JobDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the JobDefinitionsClient.CreateOrUpdate method.

type JobDefinitionsClientCreateOrUpdateResponse

type JobDefinitionsClientCreateOrUpdateResponse struct {
	// The Job Definition resource.
	JobDefinition
}

JobDefinitionsClientCreateOrUpdateResponse contains the response from method JobDefinitionsClient.CreateOrUpdate.

type JobDefinitionsClientDeleteResponse

type JobDefinitionsClientDeleteResponse struct {
}

JobDefinitionsClientDeleteResponse contains the response from method JobDefinitionsClient.BeginDelete.

type JobDefinitionsClientGetOptions

type JobDefinitionsClientGetOptions struct {
}

JobDefinitionsClientGetOptions contains the optional parameters for the JobDefinitionsClient.Get method.

type JobDefinitionsClientGetResponse

type JobDefinitionsClientGetResponse struct {
	// The Job Definition resource.
	JobDefinition
}

JobDefinitionsClientGetResponse contains the response from method JobDefinitionsClient.Get.

type JobDefinitionsClientListOptions

type JobDefinitionsClientListOptions struct {
}

JobDefinitionsClientListOptions contains the optional parameters for the JobDefinitionsClient.NewListPager method.

type JobDefinitionsClientListResponse

type JobDefinitionsClientListResponse struct {
	// List of Job Definitions.
	JobDefinitionList
}

JobDefinitionsClientListResponse contains the response from method JobDefinitionsClient.NewListPager.

type JobDefinitionsClientStartJobOptions

type JobDefinitionsClientStartJobOptions struct {
}

JobDefinitionsClientStartJobOptions contains the optional parameters for the JobDefinitionsClient.StartJob method.

type JobDefinitionsClientStartJobResponse

type JobDefinitionsClientStartJobResponse struct {
	// Response that identifies a Job Run.
	JobRunResourceID
}

JobDefinitionsClientStartJobResponse contains the response from method JobDefinitionsClient.StartJob.

type JobDefinitionsClientStopJobOptions

type JobDefinitionsClientStopJobOptions struct {
}

JobDefinitionsClientStopJobOptions contains the optional parameters for the JobDefinitionsClient.StopJob method.

type JobDefinitionsClientStopJobResponse

type JobDefinitionsClientStopJobResponse struct {
	// Response that identifies a Job Run.
	JobRunResourceID
}

JobDefinitionsClientStopJobResponse contains the response from method JobDefinitionsClient.StopJob.

type JobDefinitionsClientUpdateOptions

type JobDefinitionsClientUpdateOptions struct {
}

JobDefinitionsClientUpdateOptions contains the optional parameters for the JobDefinitionsClient.Update method.

type JobDefinitionsClientUpdateResponse

type JobDefinitionsClientUpdateResponse struct {
	// The Job Definition resource.
	JobDefinition
}

JobDefinitionsClientUpdateResponse contains the response from method JobDefinitionsClient.Update.

type JobRun

type JobRun struct {
	// Job run properties.
	Properties *JobRunProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

JobRun - The Job Run resource.

func (JobRun) MarshalJSON

func (j JobRun) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobRun.

func (*JobRun) UnmarshalJSON

func (j *JobRun) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobRun.

type JobRunError

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

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

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

JobRunError - Error type

func (JobRunError) MarshalJSON

func (j JobRunError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobRunError.

func (*JobRunError) UnmarshalJSON

func (j *JobRunError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobRunError.

type JobRunList

type JobRunList struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*JobRun
}

JobRunList - List of Job Runs.

func (JobRunList) MarshalJSON

func (j JobRunList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobRunList.

func (*JobRunList) UnmarshalJSON

func (j *JobRunList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobRunList.

type JobRunProperties

type JobRunProperties struct {
	// READ-ONLY; Name of the Agent assigned to this run.
	AgentName *string

	// READ-ONLY; Fully qualified resource id of the Agent assigned to this run.
	AgentResourceID *string

	// READ-ONLY; Bytes of data that will not be transferred, as they are excluded by user configuration.
	BytesExcluded *int64

	// READ-ONLY; Bytes of data that were attempted to transfer and failed.
	BytesFailed *int64

	// READ-ONLY; Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode).
	BytesNoTransferNeeded *int64

	// READ-ONLY; Bytes of data scanned so far in source.
	BytesScanned *int64

	// READ-ONLY; Bytes of data successfully transferred to target.
	BytesTransferred *int64

	// READ-ONLY; Bytes of data that will not be transferred, as they are unsupported on target.
	BytesUnsupported *int64

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

	// READ-ONLY; End time of the run. Null if Agent has not reported that the job has ended.
	ExecutionEndTime *time.Time

	// READ-ONLY; Start time of the run. Null if no Agent reported that the job has started.
	ExecutionStartTime *time.Time

	// READ-ONLY; Number of items that will not be transferred, as they are excluded by user configuration.
	ItemsExcluded *int64

	// READ-ONLY; Number of items that were attempted to transfer and failed.
	ItemsFailed *int64

	// READ-ONLY; Number of items that will not be transferred, as they are already found on target (e.g. mirror mode).
	ItemsNoTransferNeeded *int64

	// READ-ONLY; Number of items scanned so far in source.
	ItemsScanned *int64

	// READ-ONLY; Number of items successfully transferred to target.
	ItemsTransferred *int64

	// READ-ONLY; Number of items that will not be transferred, as they are unsupported on target.
	ItemsUnsupported *int64

	// READ-ONLY; Copy of parent Job Definition's properties at time of Job Run creation.
	JobDefinitionProperties any

	// READ-ONLY; The last updated time of the Job Run.
	LastStatusUpdate *time.Time

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The status of Agent's scanning of source.
	ScanStatus *JobRunScanStatus

	// READ-ONLY; Name of source Endpoint resource. This resource may no longer exist.
	SourceName *string

	// READ-ONLY; Copy of source Endpoint resource's properties at time of Job Run creation.
	SourceProperties any

	// READ-ONLY; Fully qualified resource id of source Endpoint. This id may no longer exist.
	SourceResourceID *string

	// READ-ONLY; The state of the job execution.
	Status *JobRunStatus

	// READ-ONLY; Name of target Endpoint resource. This resource may no longer exist.
	TargetName *string

	// READ-ONLY; Copy of Endpoint resource's properties at time of Job Run creation.
	TargetProperties any

	// READ-ONLY; Fully qualified resource id of of Endpoint. This id may no longer exist.
	TargetResourceID *string
}

JobRunProperties - Job run properties.

func (JobRunProperties) MarshalJSON

func (j JobRunProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobRunProperties.

func (*JobRunProperties) UnmarshalJSON

func (j *JobRunProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobRunProperties.

type JobRunResourceID

type JobRunResourceID struct {
	// READ-ONLY; Fully qualified resource id of the Job Run.
	JobRunResourceID *string
}

JobRunResourceID - Response that identifies a Job Run.

func (JobRunResourceID) MarshalJSON

func (j JobRunResourceID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobRunResourceID.

func (*JobRunResourceID) UnmarshalJSON

func (j *JobRunResourceID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobRunResourceID.

type JobRunScanStatus

type JobRunScanStatus string

JobRunScanStatus - The status of Agent's scanning of source.

const (
	JobRunScanStatusCompleted  JobRunScanStatus = "Completed"
	JobRunScanStatusNotStarted JobRunScanStatus = "NotStarted"
	JobRunScanStatusScanning   JobRunScanStatus = "Scanning"
)

func PossibleJobRunScanStatusValues

func PossibleJobRunScanStatusValues() []JobRunScanStatus

PossibleJobRunScanStatusValues returns the possible values for the JobRunScanStatus const type.

type JobRunStatus

type JobRunStatus string

JobRunStatus - The current status of the Job Run in a non-terminal state, if exists.

const (
	JobRunStatusCancelRequested JobRunStatus = "CancelRequested"
	JobRunStatusCanceled        JobRunStatus = "Canceled"
	JobRunStatusCanceling       JobRunStatus = "Canceling"
	JobRunStatusFailed          JobRunStatus = "Failed"
	JobRunStatusQueued          JobRunStatus = "Queued"
	JobRunStatusRunning         JobRunStatus = "Running"
	JobRunStatusStarted         JobRunStatus = "Started"
	JobRunStatusSucceeded       JobRunStatus = "Succeeded"
)

func PossibleJobRunStatusValues

func PossibleJobRunStatusValues() []JobRunStatus

PossibleJobRunStatusValues returns the possible values for the JobRunStatus const type.

type JobRunsClient

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

JobRunsClient contains the methods for the JobRuns group. Don't use this type directly, use NewJobRunsClient() instead.

func NewJobRunsClient

func NewJobRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobRunsClient, error)

NewJobRunsClient creates a new instance of JobRunsClient 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 (*JobRunsClient) Get

func (client *JobRunsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobRunName string, options *JobRunsClientGetOptions) (JobRunsClientGetResponse, error)

Get - Gets a Job Run resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • jobRunName - The name of the Job Run resource.
  • options - JobRunsClientGetOptions contains the optional parameters for the JobRunsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobRuns_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewJobRunsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", "examples-jobRunName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.JobRun = armstoragemover.JobRun{
// 	Name: to.Ptr("examples-jobRunName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"),
// 	Properties: &armstoragemover.JobRunProperties{
// 		AgentName: to.Ptr("migration-agent"),
// 		AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
// 		BytesExcluded: to.Ptr[int64](995116277760),
// 		BytesFailed: to.Ptr[int64](5116277760),
// 		BytesNoTransferNeeded: to.Ptr[int64](2995116277760),
// 		BytesScanned: to.Ptr[int64](49951162777600),
// 		BytesTransferred: to.Ptr[int64](1995116277760),
// 		BytesUnsupported: to.Ptr[int64](495116277760),
// 		ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.107Z"); return t}()),
// 		ItemsExcluded: to.Ptr[int64](50),
// 		ItemsFailed: to.Ptr[int64](3),
// 		ItemsNoTransferNeeded: to.Ptr[int64](150),
// 		ItemsScanned: to.Ptr[int64](351),
// 		ItemsTransferred: to.Ptr[int64](100),
// 		ItemsUnsupported: to.Ptr[int64](27),
// 		JobDefinitionProperties: map[string]any{
// 		},
// 		LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
// 		ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning),
// 		SourceName: to.Ptr("sourceEndpoint"),
// 		SourceProperties: map[string]any{
// 		},
// 		SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"),
// 		Status: to.Ptr(armstoragemover.JobRunStatusRunning),
// 		TargetName: to.Ptr("targetEndpoint"),
// 		TargetProperties: map[string]any{
// 		},
// 		TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"),
// 	},
// }
Output:

func (*JobRunsClient) NewListPager

func (client *JobRunsClient) NewListPager(resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobRunsClientListOptions) *runtime.Pager[JobRunsClientListResponse]

NewListPager - Lists all Job Runs in a Job Definition.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • jobDefinitionName - The name of the Job Definition resource.
  • options - JobRunsClientListOptions contains the optional parameters for the JobRunsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/JobRuns_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewJobRunsClient().NewListPager("examples-rg", "examples-storageMoverName", "examples-projectName", "examples-jobDefinitionName", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.JobRunList = armstoragemover.JobRunList{
	// 	Value: []*armstoragemover.JobRun{
	// 		{
	// 			Name: to.Ptr("examples-jobRunName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName1"),
	// 			Properties: &armstoragemover.JobRunProperties{
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				BytesExcluded: to.Ptr[int64](995116277760),
	// 				BytesFailed: to.Ptr[int64](5116277760),
	// 				BytesNoTransferNeeded: to.Ptr[int64](2995116277760),
	// 				BytesScanned: to.Ptr[int64](49951162777600),
	// 				BytesTransferred: to.Ptr[int64](1995116277760),
	// 				BytesUnsupported: to.Ptr[int64](495116277760),
	// 				ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.107Z"); return t}()),
	// 				ItemsExcluded: to.Ptr[int64](50),
	// 				ItemsFailed: to.Ptr[int64](3),
	// 				ItemsNoTransferNeeded: to.Ptr[int64](150),
	// 				ItemsScanned: to.Ptr[int64](351),
	// 				ItemsTransferred: to.Ptr[int64](100),
	// 				ItemsUnsupported: to.Ptr[int64](27),
	// 				JobDefinitionProperties: map[string]any{
	// 				},
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning),
	// 				SourceName: to.Ptr("sourceEndpoint"),
	// 				SourceProperties: map[string]any{
	// 				},
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"),
	// 				Status: to.Ptr(armstoragemover.JobRunStatusRunning),
	// 				TargetName: to.Ptr("targetEndpoint"),
	// 				TargetProperties: map[string]any{
	// 				},
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-jobRunName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName2"),
	// 			Properties: &armstoragemover.JobRunProperties{
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				BytesExcluded: to.Ptr[int64](995116277760),
	// 				BytesFailed: to.Ptr[int64](5116277760),
	// 				BytesNoTransferNeeded: to.Ptr[int64](2995116277760),
	// 				BytesScanned: to.Ptr[int64](49951162777600),
	// 				BytesTransferred: to.Ptr[int64](1995116277760),
	// 				BytesUnsupported: to.Ptr[int64](495116277760),
	// 				ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.107Z"); return t}()),
	// 				ItemsExcluded: to.Ptr[int64](50),
	// 				ItemsFailed: to.Ptr[int64](3),
	// 				ItemsNoTransferNeeded: to.Ptr[int64](150),
	// 				ItemsScanned: to.Ptr[int64](351),
	// 				ItemsTransferred: to.Ptr[int64](100),
	// 				ItemsUnsupported: to.Ptr[int64](27),
	// 				JobDefinitionProperties: map[string]any{
	// 				},
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning),
	// 				SourceName: to.Ptr("sourceEndpoint"),
	// 				SourceProperties: map[string]any{
	// 				},
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"),
	// 				Status: to.Ptr(armstoragemover.JobRunStatusFailed),
	// 				TargetName: to.Ptr("targetEndpoint"),
	// 				TargetProperties: map[string]any{
	// 				},
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-jobRunName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName3"),
	// 			Properties: &armstoragemover.JobRunProperties{
	// 				AgentName: to.Ptr("migration-agent"),
	// 				AgentResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/migration-agent"),
	// 				BytesExcluded: to.Ptr[int64](995116277760),
	// 				BytesFailed: to.Ptr[int64](5116277760),
	// 				BytesNoTransferNeeded: to.Ptr[int64](2995116277760),
	// 				BytesScanned: to.Ptr[int64](49951162777600),
	// 				BytesTransferred: to.Ptr[int64](1995116277760),
	// 				BytesUnsupported: to.Ptr[int64](495116277760),
	// 				ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.107Z"); return t}()),
	// 				ItemsExcluded: to.Ptr[int64](50),
	// 				ItemsFailed: to.Ptr[int64](3),
	// 				ItemsNoTransferNeeded: to.Ptr[int64](150),
	// 				ItemsScanned: to.Ptr[int64](351),
	// 				ItemsTransferred: to.Ptr[int64](100),
	// 				ItemsUnsupported: to.Ptr[int64](27),
	// 				JobDefinitionProperties: map[string]any{
	// 				},
	// 				LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.107Z"); return t}()),
	// 				ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning),
	// 				SourceName: to.Ptr("sourceEndpoint"),
	// 				SourceProperties: map[string]any{
	// 				},
	// 				SourceResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"),
	// 				Status: to.Ptr(armstoragemover.JobRunStatusFailed),
	// 				TargetName: to.Ptr("targetEndpoint"),
	// 				TargetProperties: map[string]any{
	// 				},
	// 				TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"),
	// 			},
	// 	}},
	// }
}
Output:

type JobRunsClientGetOptions

type JobRunsClientGetOptions struct {
}

JobRunsClientGetOptions contains the optional parameters for the JobRunsClient.Get method.

type JobRunsClientGetResponse

type JobRunsClientGetResponse struct {
	// The Job Run resource.
	JobRun
}

JobRunsClientGetResponse contains the response from method JobRunsClient.Get.

type JobRunsClientListOptions

type JobRunsClientListOptions struct {
}

JobRunsClientListOptions contains the optional parameters for the JobRunsClient.NewListPager method.

type JobRunsClientListResponse

type JobRunsClientListResponse struct {
	// List of Job Runs.
	JobRunList
}

JobRunsClientListResponse contains the response from method JobRunsClient.NewListPager.

type List

type List struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*StorageMover
}

List of Storage Movers.

func (List) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type List.

func (*List) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type List.

type NfsMountEndpointProperties

type NfsMountEndpointProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// REQUIRED; The directory being exported from the server.
	Export *string

	// REQUIRED; The host name or IP address of the server exporting the file system.
	Host *string

	// A description for the Endpoint.
	Description *string

	// The NFS protocol version.
	NfsVersion *NfsVersion

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

NfsMountEndpointProperties - The properties of NFS share endpoint.

func (*NfsMountEndpointProperties) GetEndpointBaseProperties

func (n *NfsMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties

GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type NfsMountEndpointProperties.

func (NfsMountEndpointProperties) MarshalJSON

func (n NfsMountEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointProperties.

func (*NfsMountEndpointProperties) UnmarshalJSON

func (n *NfsMountEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointProperties.

type NfsMountEndpointUpdateProperties

type NfsMountEndpointUpdateProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// A description for the Endpoint.
	Description *string
}

func (*NfsMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties

func (n *NfsMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties

GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type NfsMountEndpointUpdateProperties.

func (NfsMountEndpointUpdateProperties) MarshalJSON

func (n NfsMountEndpointUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointUpdateProperties.

func (*NfsMountEndpointUpdateProperties) UnmarshalJSON

func (n *NfsMountEndpointUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointUpdateProperties.

type NfsVersion

type NfsVersion string

NfsVersion - The NFS protocol version.

const (
	NfsVersionNFSauto NfsVersion = "NFSauto"
	NfsVersionNFSv3   NfsVersion = "NFSv3"
	NfsVersionNFSv4   NfsVersion = "NFSv4"
)

func PossibleNfsVersionValues

func PossibleNfsVersionValues() []NfsVersion

PossibleNfsVersionValues returns the possible values for the NfsVersion const type.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Lists all the supported operations for the Azure Storage Mover REST API.

Generated from API version 2023-10-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Operations_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.OperationListResult = armstoragemover.OperationListResult{
	// 	Value: []*armstoragemover.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.StorageMover/storageMovers/read"),
	// 			Display: &armstoragemover.OperationDisplay{
	// 				Description: to.Ptr("Gets or Lists existing StorageMover resource(s)."),
	// 				Operation: to.Ptr("Get or List StorageMover resource(s)."),
	// 				Provider: to.Ptr("Microsoft StorageMover"),
	// 				Resource: to.Ptr("StorageMovers"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.StorageMover/storageMovers/write"),
	// 			Display: &armstoragemover.OperationDisplay{
	// 				Description: to.Ptr("Creates or Updates StorageMover resource."),
	// 				Operation: to.Ptr("Create or Update StorageMover resource."),
	// 				Provider: to.Ptr("Microsoft StorageMover"),
	// 				Resource: to.Ptr("StorageMovers"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.StorageMover/storageMovers/delete"),
	// 			Display: &armstoragemover.OperationDisplay{
	// 				Description: to.Ptr("Deletes StorageMover resource."),
	// 				Operation: to.Ptr("Delete StorageMover resource."),
	// 				Provider: to.Ptr("Microsoft StorageMover"),
	// 				Resource: to.Ptr("StorageMovers"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type Project

type Project struct {
	// Project properties.
	Properties *ProjectProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

Project - The Project resource.

func (Project) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Project.

func (*Project) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Project.

type ProjectList

type ProjectList struct {
	// READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers
	// exceed maximum page size.
	NextLink *string

	// READ-ONLY
	Value []*Project
}

ProjectList - List of Project resources.

func (ProjectList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProjectList.

func (*ProjectList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectList.

type ProjectProperties

type ProjectProperties struct {
	// A description for the Project.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

ProjectProperties - Project properties.

func (ProjectProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProjectProperties.

func (*ProjectProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectProperties.

type ProjectUpdateParameters

type ProjectUpdateParameters struct {
	// Project properties.
	Properties *ProjectUpdateProperties
}

ProjectUpdateParameters - The Project resource.

func (ProjectUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProjectUpdateParameters.

func (*ProjectUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateParameters.

type ProjectUpdateProperties

type ProjectUpdateProperties struct {
	// A description for the Project.
	Description *string
}

ProjectUpdateProperties - Project properties.

func (ProjectUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProjectUpdateProperties.

func (*ProjectUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateProperties.

type ProjectsClient

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

ProjectsClient contains the methods for the Projects group. Don't use this type directly, use NewProjectsClient() instead.

func NewProjectsClient

func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectsClient, error)

NewProjectsClient creates a new instance of ProjectsClient 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 (*ProjectsClient) BeginDelete

func (client *ProjectsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, options *ProjectsClientBeginDeleteOptions) (*runtime.Poller[ProjectsClientDeleteResponse], error)

BeginDelete - Deletes a Project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • options - ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Projects_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginDelete(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*ProjectsClient) CreateOrUpdate

func (client *ProjectsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, project Project, options *ProjectsClientCreateOrUpdateOptions) (ProjectsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a Project resource, which is a logical grouping of related jobs. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • options - ProjectsClientCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Projects_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", armstoragemover.Project{
	Properties: &armstoragemover.ProjectProperties{
		Description: to.Ptr("Example Project Description"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Project = armstoragemover.Project{
// 	Name: to.Ptr("examples-projectName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName"),
// 	Properties: &armstoragemover.ProjectProperties{
// 		Description: to.Ptr("Example Project Description"),
// 	},
// }
Output:

func (*ProjectsClient) Get

func (client *ProjectsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, options *ProjectsClientGetOptions) (ProjectsClientGetResponse, error)

Get - Gets a Project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • options - ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Projects_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectsClient().Get(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Project = armstoragemover.Project{
// 	Name: to.Ptr("examples-projectName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName"),
// 	Properties: &armstoragemover.ProjectProperties{
// 		Description: to.Ptr("Example Project Description"),
// 	},
// }
Output:

func (*ProjectsClient) NewListPager

func (client *ProjectsClient) NewListPager(resourceGroupName string, storageMoverName string, options *ProjectsClientListOptions) *runtime.Pager[ProjectsClientListResponse]

NewListPager - Lists all Projects in a Storage Mover.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Projects_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectsClient().NewListPager("examples-rg", "examples-storageMoverName", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ProjectList = armstoragemover.ProjectList{
	// 	Value: []*armstoragemover.Project{
	// 		{
	// 			Name: to.Ptr("examples-projectName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName1"),
	// 			Properties: &armstoragemover.ProjectProperties{
	// 				Description: to.Ptr("Example Project 1 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-projectName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName2"),
	// 			Properties: &armstoragemover.ProjectProperties{
	// 				Description: to.Ptr("Example Project 2 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-projectName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName2"),
	// 			Properties: &armstoragemover.ProjectProperties{
	// 				Description: to.Ptr("Example Project 3 Description"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ProjectsClient) Update

func (client *ProjectsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, project ProjectUpdateParameters, options *ProjectsClientUpdateOptions) (ProjectsClientUpdateResponse, error)

Update - Updates properties for a Project resource. Properties not specified in the request body will be unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • projectName - The name of the Project resource.
  • options - ProjectsClientUpdateOptions contains the optional parameters for the ProjectsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/Projects_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-projectName", armstoragemover.ProjectUpdateParameters{
	Properties: &armstoragemover.ProjectUpdateProperties{
		Description: to.Ptr("Example Project Description"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Project = armstoragemover.Project{
// 	Name: to.Ptr("examples-projectName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-projectName"),
// 	Properties: &armstoragemover.ProjectProperties{
// 		Description: to.Ptr("Example Project Description"),
// 	},
// }
Output:

type ProjectsClientBeginDeleteOptions

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

ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method.

type ProjectsClientCreateOrUpdateOptions

type ProjectsClientCreateOrUpdateOptions struct {
}

ProjectsClientCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.CreateOrUpdate method.

type ProjectsClientCreateOrUpdateResponse

type ProjectsClientCreateOrUpdateResponse struct {
	// The Project resource.
	Project
}

ProjectsClientCreateOrUpdateResponse contains the response from method ProjectsClient.CreateOrUpdate.

type ProjectsClientDeleteResponse

type ProjectsClientDeleteResponse struct {
}

ProjectsClientDeleteResponse contains the response from method ProjectsClient.BeginDelete.

type ProjectsClientGetOptions

type ProjectsClientGetOptions struct {
}

ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method.

type ProjectsClientGetResponse

type ProjectsClientGetResponse struct {
	// The Project resource.
	Project
}

ProjectsClientGetResponse contains the response from method ProjectsClient.Get.

type ProjectsClientListOptions

type ProjectsClientListOptions struct {
}

ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method.

type ProjectsClientListResponse

type ProjectsClientListResponse struct {
	// List of Project resources.
	ProjectList
}

ProjectsClientListResponse contains the response from method ProjectsClient.NewListPager.

type ProjectsClientUpdateOptions

type ProjectsClientUpdateOptions struct {
}

ProjectsClientUpdateOptions contains the optional parameters for the ProjectsClient.Update method.

type ProjectsClientUpdateResponse

type ProjectsClientUpdateResponse struct {
	// The Project resource.
	Project
}

ProjectsClientUpdateResponse contains the response from method ProjectsClient.Update.

type Properties

type Properties struct {
	// A description for the Storage Mover.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

Properties - The resource specific properties for the Storage Mover resource.

func (Properties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioning state of this resource.

const (
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type SmbMountEndpointProperties

type SmbMountEndpointProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// REQUIRED; The host name or IP address of the server exporting the file system.
	Host *string

	// REQUIRED; The name of the SMB share being exported from the server.
	ShareName *string

	// The Azure Key Vault secret URIs which store the required credentials to access the SMB share.
	Credentials *AzureKeyVaultSmbCredentials

	// A description for the Endpoint.
	Description *string

	// READ-ONLY; The provisioning state of this resource.
	ProvisioningState *ProvisioningState
}

SmbMountEndpointProperties - The properties of SMB share endpoint.

func (*SmbMountEndpointProperties) GetEndpointBaseProperties

func (s *SmbMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties

GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type SmbMountEndpointProperties.

func (SmbMountEndpointProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointProperties.

func (*SmbMountEndpointProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointProperties.

type SmbMountEndpointUpdateProperties

type SmbMountEndpointUpdateProperties struct {
	// REQUIRED; The Endpoint resource type.
	EndpointType *EndpointType

	// The Azure Key Vault secret URIs which store the required credentials to access the SMB share.
	Credentials *AzureKeyVaultSmbCredentials

	// A description for the Endpoint.
	Description *string
}

SmbMountEndpointUpdateProperties - The properties of SMB share endpoint to update.

func (*SmbMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties

func (s *SmbMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties

GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type SmbMountEndpointUpdateProperties.

func (SmbMountEndpointUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointUpdateProperties.

func (*SmbMountEndpointUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointUpdateProperties.

type StorageMover

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

	// The resource specific properties for the Storage Mover resource.
	Properties *Properties

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

StorageMover - The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.

func (StorageMover) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageMover.

func (*StorageMover) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageMover.

type StorageMoversClient

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

StorageMoversClient contains the methods for the StorageMovers group. Don't use this type directly, use NewStorageMoversClient() instead.

func NewStorageMoversClient

func NewStorageMoversClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageMoversClient, error)

NewStorageMoversClient creates a new instance of StorageMoversClient 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 (*StorageMoversClient) BeginDelete

func (client *StorageMoversClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, options *StorageMoversClientBeginDeleteOptions) (*runtime.Poller[StorageMoversClientDeleteResponse], error)

BeginDelete - Deletes a Storage Mover resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - StorageMoversClientBeginDeleteOptions contains the optional parameters for the StorageMoversClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_Delete.json

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

func (*StorageMoversClient) CreateOrUpdate

func (client *StorageMoversClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, storageMover StorageMover, options *StorageMoversClientCreateOrUpdateOptions) (StorageMoversClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a top-level Storage Mover resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - StorageMoversClientCreateOrUpdateOptions contains the optional parameters for the StorageMoversClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStorageMoversClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", armstoragemover.StorageMover{
	Location: to.Ptr("eastus2"),
	Tags: map[string]*string{
		"key1": to.Ptr("value1"),
		"key2": to.Ptr("value2"),
	},
	Properties: &armstoragemover.Properties{
		Description: to.Ptr("Example Storage Mover Description"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StorageMover = armstoragemover.StorageMover{
// 	Name: to.Ptr("examples-storageMoverName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"),
// 	SystemData: &armstoragemover.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Properties: &armstoragemover.Properties{
// 		Description: to.Ptr("Example Storage Mover Description"),
// 	},
// }
Output:

func (*StorageMoversClient) Get

func (client *StorageMoversClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, options *StorageMoversClientGetOptions) (StorageMoversClientGetResponse, error)

Get - Gets a Storage Mover resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - StorageMoversClientGetOptions contains the optional parameters for the StorageMoversClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStorageMoversClient().Get(ctx, "examples-rg", "examples-storageMoverName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StorageMover = armstoragemover.StorageMover{
// 	Name: to.Ptr("examples-storageMoverName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"),
// 	SystemData: &armstoragemover.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Properties: &armstoragemover.Properties{
// 		Description: to.Ptr("Example Storage Mover Description"),
// 	},
// }
Output:

func (*StorageMoversClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all Storage Movers in a subscription.

Generated from API version 2023-10-01

  • options - StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewStorageMoversClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.List = armstoragemover.List{
	// 	Value: []*armstoragemover.StorageMover{
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName1"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 1 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg2/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName2"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 2 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName3"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 3 Description"),
	// 			},
	// 	}},
	// }
}
Output:

func (*StorageMoversClient) NewListPager

func (client *StorageMoversClient) NewListPager(resourceGroupName string, options *StorageMoversClientListOptions) *runtime.Pager[StorageMoversClientListResponse]

NewListPager - Lists all Storage Movers in a resource group.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewStorageMoversClient().NewListPager("examples-rg", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.List = armstoragemover.List{
	// 	Value: []*armstoragemover.StorageMover{
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName1"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName1"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 1 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName2"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName2"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 2 Description"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("examples-storageMoverResourceName3"),
	// 			Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
	// 			ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName3"),
	// 			SystemData: &armstoragemover.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"key1": to.Ptr("value1"),
	// 				"key2": to.Ptr("value2"),
	// 			},
	// 			Properties: &armstoragemover.Properties{
	// 				Description: to.Ptr("Example Storage Mover 3 Description"),
	// 			},
	// 	}},
	// }
}
Output:

func (*StorageMoversClient) Update

func (client *StorageMoversClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, storageMover UpdateParameters, options *StorageMoversClientUpdateOptions) (StorageMoversClientUpdateResponse, error)

Update - Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • storageMoverName - The name of the Storage Mover resource.
  • options - StorageMoversClientUpdateOptions contains the optional parameters for the StorageMoversClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3066a973f4baf2e2bf072a013b585a820bb10146/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-10-01/examples/StorageMovers_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstoragemover.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewStorageMoversClient().Update(ctx, "examples-rg", "examples-storageMoverName", armstoragemover.UpdateParameters{
	Properties: &armstoragemover.UpdateProperties{
		Description: to.Ptr("Updated Storage Mover Description"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.StorageMover = armstoragemover.StorageMover{
// 	Name: to.Ptr("examples-storageMoverName"),
// 	Type: to.Ptr("Microsoft.StorageMover/storageMovers"),
// 	ID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"),
// 	SystemData: &armstoragemover.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.107Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"key1": to.Ptr("value1"),
// 		"key2": to.Ptr("value2"),
// 	},
// 	Properties: &armstoragemover.Properties{
// 		Description: to.Ptr("Updated Storage Mover Description"),
// 	},
// }
Output:

type StorageMoversClientBeginDeleteOptions

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

StorageMoversClientBeginDeleteOptions contains the optional parameters for the StorageMoversClient.BeginDelete method.

type StorageMoversClientCreateOrUpdateOptions

type StorageMoversClientCreateOrUpdateOptions struct {
}

StorageMoversClientCreateOrUpdateOptions contains the optional parameters for the StorageMoversClient.CreateOrUpdate method.

type StorageMoversClientCreateOrUpdateResponse

type StorageMoversClientCreateOrUpdateResponse struct {
	// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.
	StorageMover
}

StorageMoversClientCreateOrUpdateResponse contains the response from method StorageMoversClient.CreateOrUpdate.

type StorageMoversClientDeleteResponse

type StorageMoversClientDeleteResponse struct {
}

StorageMoversClientDeleteResponse contains the response from method StorageMoversClient.BeginDelete.

type StorageMoversClientGetOptions

type StorageMoversClientGetOptions struct {
}

StorageMoversClientGetOptions contains the optional parameters for the StorageMoversClient.Get method.

type StorageMoversClientGetResponse

type StorageMoversClientGetResponse struct {
	// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.
	StorageMover
}

StorageMoversClientGetResponse contains the response from method StorageMoversClient.Get.

type StorageMoversClientListBySubscriptionOptions

type StorageMoversClientListBySubscriptionOptions struct {
}

StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager method.

type StorageMoversClientListBySubscriptionResponse

type StorageMoversClientListBySubscriptionResponse struct {
	// List of Storage Movers.
	List
}

StorageMoversClientListBySubscriptionResponse contains the response from method StorageMoversClient.NewListBySubscriptionPager.

type StorageMoversClientListOptions

type StorageMoversClientListOptions struct {
}

StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method.

type StorageMoversClientListResponse

type StorageMoversClientListResponse struct {
	// List of Storage Movers.
	List
}

StorageMoversClientListResponse contains the response from method StorageMoversClient.NewListPager.

type StorageMoversClientUpdateOptions

type StorageMoversClientUpdateOptions struct {
}

StorageMoversClientUpdateOptions contains the optional parameters for the StorageMoversClient.Update method.

type StorageMoversClientUpdateResponse

type StorageMoversClientUpdateResponse struct {
	// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.
	StorageMover
}

StorageMoversClientUpdateResponse contains the response from method StorageMoversClient.Update.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UpdateParameters

type UpdateParameters struct {
	// The resource specific properties for the Storage Mover resource.
	Properties *UpdateProperties

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

UpdateParameters - The Storage Mover resource.

func (UpdateParameters) MarshalJSON

func (u UpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateParameters.

func (*UpdateParameters) UnmarshalJSON

func (u *UpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters.

type UpdateProperties

type UpdateProperties struct {
	// A description for the Storage Mover.
	Description *string
}

UpdateProperties - The resource specific properties for the Storage Mover resource.

func (UpdateProperties) MarshalJSON

func (u UpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateProperties.

func (*UpdateProperties) UnmarshalJSON

func (u *UpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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