From 417e9b03d89e6d1f43621fe88375dc901978ea8c Mon Sep 17 00:00:00 2001 From: Peng Jiahui <46921893+Alancere@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:50:47 +0800 Subject: [PATCH] [Release] sdk/resourcemanager/storagemover/armstoragemover/2.0.0-beta.1 generation from spec commit: c53808ba54beef57059371708f1fa6949a11a280 (#21138) --- .../storagemover/armstoragemover/CHANGELOG.md | 27 ++ .../armstoragemover/agents_client.go | 22 +- .../agents_client_example_test.go | 104 ++--- .../storagemover/armstoragemover/autorest.md | 8 +- .../storagemover/armstoragemover/constants.go | 20 +- .../armstoragemover/endpoints_client.go | 22 +- .../endpoints_client_example_test.go | 423 ++++++++++++++++-- .../storagemover/armstoragemover/go.mod | 18 +- .../storagemover/armstoragemover/go.sum | 36 +- .../armstoragemover/jobdefinitions_client.go | 30 +- .../jobdefinitions_client_example_test.go | 84 ++-- .../armstoragemover/jobruns_client.go | 8 +- .../jobruns_client_example_test.go | 54 +-- .../storagemover/armstoragemover/models.go | 200 ++++++++- .../armstoragemover/models_serde.go | 286 +++++++++++- .../armstoragemover/operations_client.go | 4 +- .../operations_client_example_test.go | 4 +- .../armstoragemover/polymorphic_helpers.go | 28 ++ .../armstoragemover/projects_client.go | 22 +- .../projects_client_example_test.go | 24 +- .../armstoragemover/storagemovers_client.go | 26 +- .../storagemovers_client_example_test.go | 160 +++---- 22 files changed, 1255 insertions(+), 355 deletions(-) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md b/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md index 51f145192b68..c447623d1399 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md +++ b/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 2.0.0-beta.1 (2023-07-28) +### Breaking Changes + +- Type of `EndpointBaseUpdateParameters.Properties` has been changed from `*EndpointBaseUpdateProperties` to `EndpointBaseUpdatePropertiesClassification` + +### Features Added + +- New value `EndpointTypeAzureStorageSmbFileShare`, `EndpointTypeSmbMount` added to enum type `EndpointType` +- New enum type `CredentialType` with values `CredentialTypeAzureKeyVaultSmb` +- New function `*AzureKeyVaultSmbCredentials.GetCredentials() *Credentials` +- New function `*AzureStorageBlobContainerEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*AzureStorageSmbFileShareEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*AzureStorageSmbFileShareEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*Credentials.GetCredentials() *Credentials` +- New function `*EndpointBaseUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*SmbMountEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*SmbMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*NfsMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New struct `AzureKeyVaultSmbCredentials` +- New struct `AzureStorageBlobContainerEndpointUpdateProperties` +- New struct `AzureStorageSmbFileShareEndpointProperties` +- New struct `AzureStorageSmbFileShareEndpointUpdateProperties` +- New struct `NfsMountEndpointUpdateProperties` +- New struct `SmbMountEndpointProperties` +- New struct `SmbMountEndpointUpdateProperties` + + ## 1.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go b/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go index 96c525787b86..3e3085be5ec6 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go @@ -47,7 +47,7 @@ func NewAgentsClient(subscriptionID string, credential azcore.TokenCredential, o // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -91,7 +91,7 @@ func (client *AgentsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agent) @@ -109,7 +109,7 @@ func (client *AgentsClient) createOrUpdateHandleResponse(resp *http.Response) (A // BeginDelete - Deletes an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -131,7 +131,7 @@ func (client *AgentsClient) BeginDelete(ctx context.Context, resourceGroupName s // Delete - Deletes an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview func (client *AgentsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, options *AgentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, agentName, options) if err != nil { @@ -171,7 +171,7 @@ func (client *AgentsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *AgentsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -224,7 +224,7 @@ func (client *AgentsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +241,7 @@ func (client *AgentsClient) getHandleResponse(resp *http.Response) (AgentsClient // NewListPager - Lists all Agents in a Storage Mover. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -293,7 +293,7 @@ func (client *AgentsClient) listCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *AgentsClient) listHandleResponse(resp *http.Response) (AgentsClien // Update - Creates or updates an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -355,7 +355,7 @@ func (client *AgentsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, agent) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/agents_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/agents_client_example_test.go index 1afa0f932c2d..b7d5badc9afd 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/agents_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/agents_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Agents_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Agents_List.json func ExampleAgentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,87 +45,87 @@ func ExampleAgentsClient_NewListPager() { // { // Name: to.Ptr("examples-agentName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName1"), + // 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.1075056Z"); 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.1075056Z"); 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName1"), + // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-agentName2"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName2"), // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName2"), + // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-agentName3"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName3"), // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName3"), + // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // LocalIPAddress: to.Ptr("192.168.0.0"), // MemoryInMB: to.Ptr[int64](100024), // NumberOfCores: to.Ptr[int64](32), // UptimeInSeconds: to.Ptr[int64](522), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Agents_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Agents_Get.json func ExampleAgentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,31 +146,31 @@ func ExampleAgentsClient_Get() { // res.Agent = armstoragemover.Agent{ // Name: to.Ptr("examples-agentName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"), + // 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.1075056Z"); 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.1075056Z"); 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"), + // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // LocalIPAddress: to.Ptr("192.168.0.0"), // MemoryInMB: to.Ptr[int64](100024), // NumberOfCores: to.Ptr[int64](32), // UptimeInSeconds: to.Ptr[int64](522), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Agents_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Agents_CreateOrUpdate.json func ExampleAgentsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,7 +184,7 @@ func ExampleAgentsClient_CreateOrUpdate() { 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"), + 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) @@ -197,18 +197,18 @@ func ExampleAgentsClient_CreateOrUpdate() { // res.Agent = armstoragemover.Agent{ // Name: to.Ptr("examples-agentName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"), + // 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Agents_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Agents_Update.json func ExampleAgentsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -233,14 +233,14 @@ func ExampleAgentsClient_Update() { // res.Agent = armstoragemover.Agent{ // Name: to.Ptr("examples-agentName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/agents"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-agentName"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName"), + // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // LocalIPAddress: to.Ptr("192.168.0.0"), // MemoryInMB: to.Ptr[int64](100024), // NumberOfCores: to.Ptr[int64](32), @@ -249,7 +249,7 @@ func ExampleAgentsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Agents_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Agents_Delete.json func ExampleAgentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagemover/armstoragemover/autorest.md b/sdk/resourcemanager/storagemover/armstoragemover/autorest.md index fa15823f827d..a4f2eea7c13a 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/autorest.md +++ b/sdk/resourcemanager/storagemover/armstoragemover/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 - +module-version: 2.0.0-beta.1 +tag: package-preview-2023-07 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/storagemover/armstoragemover/constants.go b/sdk/resourcemanager/storagemover/armstoragemover/constants.go index c8e25c4428fa..bd7bca441de5 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/constants.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/constants.go @@ -11,7 +11,7 @@ package armstoragemover const ( moduleName = "armstoragemover" - moduleVersion = "v1.1.1" + moduleVersion = "v2.0.0-beta.1" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -88,19 +88,37 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } +// CredentialType - The Credentials type. +type CredentialType string + +const ( + CredentialTypeAzureKeyVaultSmb CredentialType = "AzureKeyVaultSmb" +) + +// PossibleCredentialTypeValues returns the possible values for the CredentialType const type. +func PossibleCredentialTypeValues() []CredentialType { + return []CredentialType{ + CredentialTypeAzureKeyVaultSmb, + } +} + // EndpointType - The Endpoint resource type. type EndpointType string const ( EndpointTypeAzureStorageBlobContainer EndpointType = "AzureStorageBlobContainer" + EndpointTypeAzureStorageSmbFileShare EndpointType = "AzureStorageSmbFileShare" EndpointTypeNfsMount EndpointType = "NfsMount" + EndpointTypeSmbMount EndpointType = "SmbMount" ) // PossibleEndpointTypeValues returns the possible values for the EndpointType const type. func PossibleEndpointTypeValues() []EndpointType { return []EndpointType{ EndpointTypeAzureStorageBlobContainer, + EndpointTypeAzureStorageSmbFileShare, EndpointTypeNfsMount, + EndpointTypeSmbMount, } } diff --git a/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go b/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go index 4c3d2db1d9dd..e906ea20da69 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go @@ -47,7 +47,7 @@ func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -92,7 +92,7 @@ func (client *EndpointsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, endpoint) @@ -110,7 +110,7 @@ func (client *EndpointsClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes an Endpoint resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -132,7 +132,7 @@ func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes an Endpoint resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview func (client *EndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, options) if err != nil { @@ -172,7 +172,7 @@ func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets an Endpoint resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -225,7 +225,7 @@ func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -242,7 +242,7 @@ func (client *EndpointsClient) getHandleResponse(resp *http.Response) (Endpoints // NewListPager - Lists all Endpoints in a Storage Mover. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -294,7 +294,7 @@ func (client *EndpointsClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +312,7 @@ func (client *EndpointsClient) listHandleResponse(resp *http.Response) (Endpoint // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -356,7 +356,7 @@ func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, endpoint) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client_example_test.go index 0b8a6215bb89..0bc5dc772ee6 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Endpoints_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_List.json func ExampleEndpointsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,21 +45,23 @@ func ExampleEndpointsClient_NewListPager() { // { // Name: to.Ptr("examples-endpointName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName1"), + // 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), - // BlobContainerName: to.Ptr("examples-blobContainerName1"), - // StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName2"), + // 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), @@ -68,20 +70,21 @@ func ExampleEndpointsClient_NewListPager() { // { // Name: to.Ptr("examples-endpointName3"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName3"), + // 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), - // BlobContainerName: to.Ptr("examples-blobContainerName3"), - // StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + // 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"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Endpoints_Get.json -func ExampleEndpointsClient_Get() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Get_AzureStorageBlobContainer.json +func ExampleEndpointsClient_Get_endpointsGetAzureStorageBlobContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -101,18 +104,121 @@ func ExampleEndpointsClient_Get() { // res.Endpoint = armstoragemover.Endpoint{ // Name: to.Ptr("examples-endpointName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"), + // 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 Container Endpoint Description"), + // Description: to.Ptr("Example Storage Blob Container Endpoint Description"), // EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer), - // BlobContainerName: to.Ptr("examples-blobContainerName"), - // StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + // 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Endpoints_CreateOrUpdate.json -func ExampleEndpointsClient_CreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Get_AzureStorageSmbFileShare.json +func ExampleEndpointsClient_Get_endpointsGetAzureStorageSmbFileShare() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Get_NfsMount.json +func ExampleEndpointsClient_Get_endpointsGetNfsMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Get_SmbMount.json +func ExampleEndpointsClient_Get_endpointsGetSmbMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_CreateOrUpdate_AzureStorageBlobContainer.json +func ExampleEndpointsClient_CreateOrUpdate_endpointsCreateOrUpdateAzureStorageBlobContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -124,10 +230,10 @@ func ExampleEndpointsClient_CreateOrUpdate() { } res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.Endpoint{ Properties: &armstoragemover.AzureStorageBlobContainerEndpointProperties{ - Description: to.Ptr("Example Storage Container Endpoint Description"), + Description: to.Ptr("Example Storage Blob Container Endpoint Description"), EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer), - BlobContainerName: to.Ptr("examples-blobContainerName"), - StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + 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 { @@ -139,18 +245,147 @@ func ExampleEndpointsClient_CreateOrUpdate() { // res.Endpoint = armstoragemover.Endpoint{ // Name: to.Ptr("examples-endpointName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"), + // 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 Container Endpoint Description"), + // Description: to.Ptr("Example Storage Blob Container Endpoint Description"), // EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer), - // BlobContainerName: to.Ptr("examples-blobContainerName"), - // StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + // 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_CreateOrUpdate_AzureStorageSmbFileShare.json +func ExampleEndpointsClient_CreateOrUpdate_endpointsCreateOrUpdateAzureStorageSmbFileShare() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_CreateOrUpdate_NfsMount.json +func ExampleEndpointsClient_CreateOrUpdate_endpointsCreateOrUpdateNfsMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_CreateOrUpdate_SmbMount.json +func ExampleEndpointsClient_CreateOrUpdate_endpointsCreateOrUpdateSmbMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Endpoints_Update.json -func ExampleEndpointsClient_Update() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Update_AzureStorageBlobContainer.json +func ExampleEndpointsClient_Update_endpointsUpdateAzureStorageBlobContainer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -161,8 +396,9 @@ func ExampleEndpointsClient_Update() { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEndpointsClient().Update(ctx, "examples-rg", "examples-storageMoverName", "examples-endpointName", armstoragemover.EndpointBaseUpdateParameters{ - Properties: &armstoragemover.EndpointBaseUpdateProperties{ - Description: to.Ptr("Updated Endpoint Description"), + Properties: &armstoragemover.AzureStorageBlobContainerEndpointUpdateProperties{ + Description: to.Ptr("Updated Endpoint Description"), + EndpointType: to.Ptr(armstoragemover.EndpointTypeAzureStorageBlobContainer), }, }, nil) if err != nil { @@ -174,17 +410,140 @@ func ExampleEndpointsClient_Update() { // res.Endpoint = armstoragemover.Endpoint{ // Name: to.Ptr("examples-endpointName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/endpoints"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/examples-endpointName"), + // 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), - // BlobContainerName: to.Ptr("examples-blobContainerName"), - // StorageAccountResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.Storage/storageAccounts/examples-storageAccountName/"), + // 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Update_AzureStorageSmbFileShare.json +func ExampleEndpointsClient_Update_endpointsUpdateAzureStorageSmbFileShare() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Update_NfsMount.json +func ExampleEndpointsClient_Update_endpointsUpdateNfsMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Update_SmbMount.json +func ExampleEndpointsClient_Update_endpointsUpdateSmbMount() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armstoragemover.NewClientFactory("", 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Endpoints_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Endpoints_Delete.json func ExampleEndpointsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagemover/armstoragemover/go.mod b/sdk/resourcemanager/storagemover/armstoragemover/go.mod index d02f31e6a854..f0c384896786 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/go.mod +++ b/sdk/resourcemanager/storagemover/armstoragemover/go.mod @@ -1,21 +1,21 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect ) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/go.sum b/sdk/resourcemanager/storagemover/armstoragemover/go.sum index 8ba445a8c4da..21718b486698 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/go.sum +++ b/sdk/resourcemanager/storagemover/armstoragemover/go.sum @@ -1,13 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go b/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go index 4dde3e76d8ee..327f63684123 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go @@ -48,7 +48,7 @@ func NewJobDefinitionsClient(subscriptionID string, credential azcore.TokenCrede // data transfer. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -98,7 +98,7 @@ func (client *JobDefinitionsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, jobDefinition) @@ -116,7 +116,7 @@ func (client *JobDefinitionsClient) createOrUpdateHandleResponse(resp *http.Resp // BeginDelete - Deletes a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -140,7 +140,7 @@ func (client *JobDefinitionsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview func (client *JobDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) if err != nil { @@ -184,7 +184,7 @@ func (client *JobDefinitionsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ func (client *JobDefinitionsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -242,7 +242,7 @@ func (client *JobDefinitionsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *JobDefinitionsClient) getHandleResponse(resp *http.Response) (JobD // NewListPager - Lists all Job Definitions in a Project. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -316,7 +316,7 @@ func (client *JobDefinitionsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -334,7 +334,7 @@ func (client *JobDefinitionsClient) listHandleResponse(resp *http.Response) (Job // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -383,7 +383,7 @@ func (client *JobDefinitionsClient) startJobCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,7 @@ func (client *JobDefinitionsClient) startJobHandleResponse(resp *http.Response) // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -450,7 +450,7 @@ func (client *JobDefinitionsClient) stopJobCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -468,7 +468,7 @@ func (client *JobDefinitionsClient) stopJobHandleResponse(resp *http.Response) ( // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -517,7 +517,7 @@ func (client *JobDefinitionsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, jobDefinition) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client_example_test.go index 5f86a80cfb6a..83fce319c1ec 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_List.json func ExampleJobDefinitionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,59 +45,59 @@ func ExampleJobDefinitionsClient_NewListPager() { // { // Name: to.Ptr("examples-jobDefinitionName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName1"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName2"), + // 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.1075056Z"); 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.1075056Z"); 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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("/"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // }, // { // Name: to.Ptr("examples-jobDefinitionName3"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName3"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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("/"), // }, // }}, @@ -105,7 +105,7 @@ func ExampleJobDefinitionsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_Get.json func ExampleJobDefinitionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,23 +126,23 @@ func ExampleJobDefinitionsClient_Get() { // res.JobDefinition = armstoragemover.JobDefinition{ // Name: to.Ptr("examples-jobDefinitionName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/jobDefinitions"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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("/"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_CreateOrUpdate.json func ExampleJobDefinitionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -173,23 +173,23 @@ func ExampleJobDefinitionsClient_CreateOrUpdate() { // res.JobDefinition = armstoragemover.JobDefinition{ // Name: to.Ptr("examples-jobDefinitionName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName/jobDefinitionName"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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("/"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_Update.json func ExampleJobDefinitionsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -215,23 +215,23 @@ func ExampleJobDefinitionsClient_Update() { // res.JobDefinition = armstoragemover.JobDefinition{ // Name: to.Ptr("examples-jobDefinitionName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName/jobDefinitionName"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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("updatedSource"), - // SourceResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/updatedTarget"), + // TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/updatedTarget"), // TargetSubpath: to.Ptr("/"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_Delete.json func ExampleJobDefinitionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -252,7 +252,7 @@ func ExampleJobDefinitionsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_StartJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_StartJob.json func ExampleJobDefinitionsClient_StartJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -271,11 +271,11 @@ func ExampleJobDefinitionsClient_StartJob() { _ = 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"), + // JobRunResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"), // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobDefinitions_StopJob.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobDefinitions_StopJob.json func ExampleJobDefinitionsClient_StopJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -294,6 +294,6 @@ func ExampleJobDefinitionsClient_StopJob() { _ = 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"), + // JobRunResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"), // } } diff --git a/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go b/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go index af7eb40976fc..7df642e86c8c 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go @@ -47,7 +47,7 @@ func NewJobRunsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Gets a Job Run resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -101,7 +101,7 @@ func (client *JobRunsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *JobRunsClient) getHandleResponse(resp *http.Response) (JobRunsClie // NewListPager - Lists all Job Runs in a Job Definition. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -180,7 +180,7 @@ func (client *JobRunsClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client_example_test.go index bac31786b9e4..70a838f8c8a7 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobRuns_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobRuns_List.json func ExampleJobRunsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -44,17 +44,17 @@ func ExampleJobRunsClient_NewListPager() { // { // Name: to.Ptr("examples-jobRunName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName1"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.1075056Z"); return t}()), // ItemsExcluded: to.Ptr[int64](50), // ItemsFailed: to.Ptr[int64](3), // ItemsNoTransferNeeded: to.Ptr[int64](150), @@ -63,33 +63,33 @@ func ExampleJobRunsClient_NewListPager() { // ItemsUnsupported: to.Ptr[int64](27), // JobDefinitionProperties: map[string]any{ // }, - // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:31:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning), // SourceName: to.Ptr("sourceEndpoint"), // SourceProperties: map[string]any{ // }, - // SourceResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName2"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.1075056Z"); return t}()), // ItemsExcluded: to.Ptr[int64](50), // ItemsFailed: to.Ptr[int64](3), // ItemsNoTransferNeeded: to.Ptr[int64](150), @@ -98,33 +98,33 @@ func ExampleJobRunsClient_NewListPager() { // ItemsUnsupported: to.Ptr[int64](27), // JobDefinitionProperties: map[string]any{ // }, - // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:31:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning), // SourceName: to.Ptr("sourceEndpoint"), // SourceProperties: map[string]any{ // }, - // SourceResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projectName/examples-projectName/jobDefinitions/examples-jobDefinitionName1/jobRuns/examples-jobRunName3"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.1075056Z"); return t}()), // ItemsExcluded: to.Ptr[int64](50), // ItemsFailed: to.Ptr[int64](3), // ItemsNoTransferNeeded: to.Ptr[int64](150), @@ -133,24 +133,24 @@ func ExampleJobRunsClient_NewListPager() { // ItemsUnsupported: to.Ptr[int64](27), // JobDefinitionProperties: map[string]any{ // }, - // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:31:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning), // SourceName: to.Ptr("sourceEndpoint"), // SourceProperties: map[string]any{ // }, - // SourceResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), + // TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/JobRuns_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/JobRuns_Get.json func ExampleJobRunsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,17 +171,17 @@ func ExampleJobRunsClient_Get() { // res.JobRun = armstoragemover.JobRun{ // Name: to.Ptr("examples-jobRunName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects/jobDefinitions/jobRuns"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName/jobDefinitions/examples-jobDefinitionName/jobRuns/examples-jobRunName"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // ExecutionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:11:01.1075056Z"); return t}()), // ItemsExcluded: to.Ptr[int64](50), // ItemsFailed: to.Ptr[int64](3), // ItemsNoTransferNeeded: to.Ptr[int64](150), @@ -190,17 +190,17 @@ func ExampleJobRunsClient_Get() { // ItemsUnsupported: to.Ptr[int64](27), // JobDefinitionProperties: map[string]any{ // }, - // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:31:01.1075056Z"); return t}()), + // LastStatusUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:21:01.1075056Z"); return t}()), // ScanStatus: to.Ptr(armstoragemover.JobRunScanStatusScanning), // SourceName: to.Ptr("sourceEndpoint"), // SourceProperties: map[string]any{ // }, - // SourceResourceID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/sourceEndpoint"), + // 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/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), + // TargetResourceID: to.Ptr("/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/endpoints/targetEndpoint"), // }, // } } diff --git a/sdk/resourcemanager/storagemover/armstoragemover/models.go b/sdk/resourcemanager/storagemover/armstoragemover/models.go index 4fb900f40554..25046e0280ef 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/models.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/models.go @@ -22,7 +22,7 @@ type Agent struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" @@ -121,6 +121,26 @@ type AgentsClientUpdateOptions struct { // placeholder for future optional parameters } +// AzureKeyVaultSmbCredentials - The Azure Key Vault secret URIs which store the credentials. +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 +} + +// GetCredentials implements the CredentialsClassification interface for type AzureKeyVaultSmbCredentials. +func (a *AzureKeyVaultSmbCredentials) GetCredentials() *Credentials { + return &Credentials{ + Type: a.Type, + } +} + +// AzureStorageBlobContainerEndpointProperties - The properties of Azure Storage blob container endpoint. type AzureStorageBlobContainerEndpointProperties struct { // REQUIRED; The name of the Storage blob container that is the target destination. BlobContainerName *string @@ -147,6 +167,84 @@ func (a *AzureStorageBlobContainerEndpointProperties) GetEndpointBaseProperties( } } +type AzureStorageBlobContainerEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a *AzureStorageBlobContainerEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + EndpointType: a.EndpointType, + Description: a.Description, + } +} + +// AzureStorageSmbFileShareEndpointProperties - The properties of Azure Storage SMB file share endpoint. +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 +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageSmbFileShareEndpointProperties. +func (a *AzureStorageSmbFileShareEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + EndpointType: a.EndpointType, + Description: a.Description, + ProvisioningState: a.ProvisioningState, + } +} + +// AzureStorageSmbFileShareEndpointUpdateProperties - The properties of Azure Storage SMB file share endpoint to update. +type AzureStorageSmbFileShareEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a *AzureStorageSmbFileShareEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + EndpointType: a.EndpointType, + Description: a.Description, + } +} + +// 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 CredentialsClassification interface { + // GetCredentials returns the Credentials content of the underlying type. + GetCredentials() *Credentials +} + +// Credentials - The Credentials. +type Credentials struct { + // REQUIRED; The Credentials type. + Type *CredentialType +} + +// GetCredentials implements the CredentialsClassification interface for type Credentials. +func (c *Credentials) GetCredentials() *Credentials { return c } + // Endpoint - The Endpoint resource, which contains information about file sources and targets. type Endpoint struct { // REQUIRED; The resource specific properties for the Storage Mover resource. @@ -158,7 +256,7 @@ type Endpoint struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" @@ -168,7 +266,8 @@ type Endpoint struct { // 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, *EndpointBaseProperties, *NfsMountEndpointProperties +// - *AzureStorageBlobContainerEndpointProperties, *AzureStorageSmbFileShareEndpointProperties, *EndpointBaseProperties, *NfsMountEndpointProperties, +// - *SmbMountEndpointProperties type EndpointBasePropertiesClassification interface { // GetEndpointBaseProperties returns the EndpointBaseProperties content of the underlying type. GetEndpointBaseProperties() *EndpointBaseProperties @@ -192,15 +291,33 @@ func (e *EndpointBaseProperties) GetEndpointBaseProperties() *EndpointBaseProper // EndpointBaseUpdateParameters - The Endpoint resource. type EndpointBaseUpdateParameters struct { // The Endpoint resource, which contains information about file sources and targets. - Properties *EndpointBaseUpdateProperties + Properties EndpointBaseUpdatePropertiesClassification +} + +// 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 EndpointBaseUpdatePropertiesClassification interface { + // GetEndpointBaseUpdateProperties returns the EndpointBaseUpdateProperties content of the underlying type. + GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties } // EndpointBaseUpdateProperties - The Endpoint resource, which contains information about file sources and targets. type EndpointBaseUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + // A description for the Endpoint. Description *string } +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type EndpointBaseUpdateProperties. +func (e *EndpointBaseUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return e +} + // EndpointList - List of Endpoints. type EndpointList struct { // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers @@ -248,7 +365,7 @@ type JobDefinition struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" @@ -376,7 +493,7 @@ type JobRun struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" @@ -518,6 +635,7 @@ type List struct { Value []*StorageMover } +// NfsMountEndpointProperties - The properties of NFS share endpoint. type NfsMountEndpointProperties struct { // REQUIRED; The Endpoint resource type. EndpointType *EndpointType @@ -547,6 +665,22 @@ func (n *NfsMountEndpointProperties) GetEndpointBaseProperties() *EndpointBasePr } } +type NfsMountEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type NfsMountEndpointUpdateProperties. +func (n *NfsMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + EndpointType: n.EndpointType, + Description: n.Description, + } +} + // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { // Localized display information for this particular operation. @@ -612,7 +746,7 @@ type Project struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" @@ -685,6 +819,56 @@ type Properties struct { ProvisioningState *ProvisioningState } +// SmbMountEndpointProperties - The properties of SMB share endpoint. +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 +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type SmbMountEndpointProperties. +func (s *SmbMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + EndpointType: s.EndpointType, + Description: s.Description, + ProvisioningState: s.ProvisioningState, + } +} + +// SmbMountEndpointUpdateProperties - The properties of SMB share endpoint to update. +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 +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type SmbMountEndpointUpdateProperties. +func (s *SmbMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + EndpointType: s.EndpointType, + Description: s.Description, + } +} + // StorageMover - The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. type StorageMover struct { // REQUIRED; The geo-location where the resource lives @@ -702,7 +886,7 @@ type StorageMover struct { // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Resource system metadata. + // 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" diff --git a/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go b/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go index 4ecf536096be..a9feda7368e3 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go @@ -246,6 +246,41 @@ func (a *AgentUpdateProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AzureKeyVaultSmbCredentials. +func (a AzureKeyVaultSmbCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "passwordUri", a.PasswordURI) + objectMap["type"] = CredentialTypeAzureKeyVaultSmb + populate(objectMap, "usernameUri", a.UsernameURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureKeyVaultSmbCredentials. +func (a *AzureKeyVaultSmbCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "passwordUri": + err = unpopulate(val, "PasswordURI", &a.PasswordURI) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "usernameUri": + err = unpopulate(val, "UsernameURI", &a.UsernameURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointProperties. func (a AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -289,6 +324,138 @@ func (a *AzureStorageBlobContainerEndpointProperties) UnmarshalJSON(data []byte) return nil } +// MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageBlobContainer + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a *AzureStorageBlobContainerEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointProperties. +func (a AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageSmbFileShare + populate(objectMap, "fileShareName", a.FileShareName) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "storageAccountResourceId", a.StorageAccountResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointProperties. +func (a *AzureStorageSmbFileShareEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + case "fileShareName": + err = unpopulate(val, "FileShareName", &a.FileShareName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &a.StorageAccountResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageSmbFileShare + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a *AzureStorageSmbFileShareEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Credentials. +func (c Credentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Credentials. +func (c *Credentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Endpoint. func (e Endpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -384,7 +551,7 @@ func (e *EndpointBaseUpdateParameters) UnmarshalJSON(data []byte) error { var err error switch key { case "properties": - err = unpopulate(val, "Properties", &e.Properties) + e.Properties, err = unmarshalEndpointBaseUpdatePropertiesClassification(val) delete(rawMsg, key) } if err != nil { @@ -398,6 +565,7 @@ func (e *EndpointBaseUpdateParameters) UnmarshalJSON(data []byte) error { func (e EndpointBaseUpdateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "description", e.Description) + objectMap["endpointType"] = e.EndpointType return json.Marshal(objectMap) } @@ -413,6 +581,9 @@ func (e *EndpointBaseUpdateProperties) UnmarshalJSON(data []byte) error { case "description": err = unpopulate(val, "Description", &e.Description) delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &e.EndpointType) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", e, err) @@ -1016,6 +1187,37 @@ func (n *NfsMountEndpointProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointUpdateProperties. +func (n NfsMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", n.Description) + objectMap["endpointType"] = EndpointTypeNfsMount + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointUpdateProperties. +func (n *NfsMountEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &n.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &n.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1319,6 +1521,88 @@ func (p *Properties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointProperties. +func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "description", s.Description) + objectMap["endpointType"] = EndpointTypeSmbMount + populate(objectMap, "host", s.Host) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "shareName", s.ShareName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointProperties. +func (s *SmbMountEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &s.EndpointType) + delete(rawMsg, key) + case "host": + err = unpopulate(val, "Host", &s.Host) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &s.ShareName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointUpdateProperties. +func (s SmbMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "description", s.Description) + objectMap["endpointType"] = EndpointTypeSmbMount + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointUpdateProperties. +func (s *SmbMountEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &s.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StorageMover. func (s StorageMover) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go b/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go index d64433148f0d..7bfd671eca4b 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go @@ -40,7 +40,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all the supported operations for the Azure Storage Mover REST API. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +78,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/storagemover/armstoragemover/operations_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/operations_client_example_test.go index b0fe52af0717..bcb3c58c730f 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/operations_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/operations_client_example_test.go @@ -14,10 +14,10 @@ import ( "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go b/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go index f7805272493b..305a562fc471 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go @@ -23,10 +23,38 @@ func unmarshalEndpointBasePropertiesClassification(rawMsg json.RawMessage) (Endp switch m["endpointType"] { case string(EndpointTypeAzureStorageBlobContainer): b = &AzureStorageBlobContainerEndpointProperties{} + case string(EndpointTypeAzureStorageSmbFileShare): + b = &AzureStorageSmbFileShareEndpointProperties{} case string(EndpointTypeNfsMount): b = &NfsMountEndpointProperties{} + case string(EndpointTypeSmbMount): + b = &SmbMountEndpointProperties{} default: b = &EndpointBaseProperties{} } return b, json.Unmarshal(rawMsg, b) } + +func unmarshalEndpointBaseUpdatePropertiesClassification(rawMsg json.RawMessage) (EndpointBaseUpdatePropertiesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EndpointBaseUpdatePropertiesClassification + switch m["endpointType"] { + case string(EndpointTypeAzureStorageBlobContainer): + b = &AzureStorageBlobContainerEndpointUpdateProperties{} + case string(EndpointTypeAzureStorageSmbFileShare): + b = &AzureStorageSmbFileShareEndpointUpdateProperties{} + case string(EndpointTypeNfsMount): + b = &NfsMountEndpointUpdateProperties{} + case string(EndpointTypeSmbMount): + b = &SmbMountEndpointUpdateProperties{} + default: + b = &EndpointBaseUpdateProperties{} + } + return b, json.Unmarshal(rawMsg, b) +} diff --git a/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go b/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go index 75732d9b7ade..ab43c335de04 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go @@ -47,7 +47,7 @@ func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -91,7 +91,7 @@ func (client *ProjectsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, project) @@ -109,7 +109,7 @@ func (client *ProjectsClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -131,7 +131,7 @@ func (client *ProjectsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview func (client *ProjectsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, options *ProjectsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, options) if err != nil { @@ -171,7 +171,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -224,7 +224,7 @@ func (client *ProjectsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +241,7 @@ func (client *ProjectsClient) getHandleResponse(resp *http.Response) (ProjectsCl // NewListPager - Lists all Projects in a Storage Mover. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -293,7 +293,7 @@ func (client *ProjectsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *ProjectsClient) listHandleResponse(resp *http.Response) (ProjectsC // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -355,7 +355,7 @@ func (client *ProjectsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, project) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/projects_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/projects_client_example_test.go index f4660943ecb3..dc9c0f19616a 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/projects_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/projects_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Projects_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Projects_List.json func ExampleProjectsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleProjectsClient_NewListPager() { // { // Name: to.Ptr("examples-projectName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName1"), + // 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"), // }, @@ -53,7 +53,7 @@ func ExampleProjectsClient_NewListPager() { // { // Name: to.Ptr("examples-projectName2"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName2"), + // 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"), // }, @@ -61,7 +61,7 @@ func ExampleProjectsClient_NewListPager() { // { // Name: to.Ptr("examples-projectName3"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName2"), + // 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"), // }, @@ -70,7 +70,7 @@ func ExampleProjectsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Projects_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Projects_Get.json func ExampleProjectsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -91,14 +91,14 @@ func ExampleProjectsClient_Get() { // res.Project = armstoragemover.Project{ // Name: to.Ptr("examples-projectName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/projects/examples-projectName"), + // 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Projects_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Projects_CreateOrUpdate.json func ExampleProjectsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -123,14 +123,14 @@ func ExampleProjectsClient_CreateOrUpdate() { // res.Project = armstoragemover.Project{ // Name: to.Ptr("examples-projectName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projects"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-projectName"), + // 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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Projects_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Projects_Update.json func ExampleProjectsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -155,14 +155,14 @@ func ExampleProjectsClient_Update() { // res.Project = armstoragemover.Project{ // Name: to.Ptr("examples-projectName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers/projectName"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName/agents/examples-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"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/Projects_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/Projects_Delete.json func ExampleProjectsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go b/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go index e72b042d7d5e..da2b4e22d7ef 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go @@ -47,7 +47,7 @@ func NewStorageMoversClient(subscriptionID string, credential azcore.TokenCreden // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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 @@ -87,7 +87,7 @@ func (client *StorageMoversClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageMover) @@ -105,7 +105,7 @@ func (client *StorageMoversClient) createOrUpdateHandleResponse(resp *http.Respo // BeginDelete - Deletes a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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 @@ -127,7 +127,7 @@ func (client *StorageMoversClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview func (client *StorageMoversClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, options *StorageMoversClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, options) if err != nil { @@ -163,7 +163,7 @@ func (client *StorageMoversClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *StorageMoversClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -211,7 +211,7 @@ func (client *StorageMoversClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +228,7 @@ func (client *StorageMoversClient) getHandleResponse(resp *http.Response) (Stora // NewListPager - Lists all Storage Movers in a resource group. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method. func (client *StorageMoversClient) NewListPager(resourceGroupName string, options *StorageMoversClientListOptions) *runtime.Pager[StorageMoversClientListResponse] { @@ -275,7 +275,7 @@ func (client *StorageMoversClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,7 +292,7 @@ func (client *StorageMoversClient) listHandleResponse(resp *http.Response) (Stor // NewListBySubscriptionPager - Lists all Storage Movers in a subscription. // -// Generated from API version 2023-03-01 +// Generated from API version 2023-07-01-preview // - options - StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager // method. func (client *StorageMoversClient) NewListBySubscriptionPager(options *StorageMoversClientListBySubscriptionOptions) *runtime.Pager[StorageMoversClientListBySubscriptionResponse] { @@ -335,7 +335,7 @@ func (client *StorageMoversClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,7 +353,7 @@ func (client *StorageMoversClient) listBySubscriptionHandleResponse(resp *http.R // 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-03-01 +// Generated from API version 2023-07-01-preview // - 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. @@ -392,7 +392,7 @@ func (client *StorageMoversClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2023-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageMover) diff --git a/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client_example_test.go b/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client_example_test.go index fe2b697c87c7..3d3c09a77b56 100644 --- a/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client_example_test.go +++ b/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client_example_test.go @@ -15,10 +15,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_ListBySubscription.json func ExampleStorageMoversClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,15 @@ func ExampleStorageMoversClient_NewListBySubscriptionPager() { // { // Name: to.Ptr("examples-storageMoverResourceName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName1"), + // 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.1075056Z"); 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.1075056Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), + // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -54,19 +62,19 @@ func ExampleStorageMoversClient_NewListBySubscriptionPager() { // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-storageMoverResourceName2"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg2/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName2"), // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -75,19 +83,19 @@ func ExampleStorageMoversClient_NewListBySubscriptionPager() { // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-storageMoverResourceName3"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName3"), // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -96,20 +104,12 @@ func ExampleStorageMoversClient_NewListBySubscriptionPager() { // Properties: &armstoragemover.Properties{ // Description: to.Ptr("Example Storage Mover 3 Description"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_List.json func ExampleStorageMoversClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,15 @@ func ExampleStorageMoversClient_NewListPager() { // { // Name: to.Ptr("examples-storageMoverResourceName1"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName1"), + // 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.1075056Z"); 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.1075056Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), + // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -145,19 +153,19 @@ func ExampleStorageMoversClient_NewListPager() { // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-storageMoverResourceName2"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName2"), // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -166,19 +174,19 @@ func ExampleStorageMoversClient_NewListPager() { // 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, "2020-02-01T01:01:01.1075056Z"); return t}()), + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T01:01:01.1075056Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-01T02:01:01.1075056Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), // }, - // }, - // { - // Name: to.Ptr("examples-storageMoverResourceName3"), - // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverResourceName3"), // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -187,20 +195,12 @@ func ExampleStorageMoversClient_NewListPager() { // Properties: &armstoragemover.Properties{ // Description: to.Ptr("Example Storage Mover 3 Description"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_Get.json func ExampleStorageMoversClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -221,7 +221,15 @@ func ExampleStorageMoversClient_Get() { // res.StorageMover = armstoragemover.StorageMover{ // Name: to.Ptr("examples-storageMoverName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"), + // 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.1075056Z"); 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.1075056Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), + // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -230,18 +238,10 @@ func ExampleStorageMoversClient_Get() { // Properties: &armstoragemover.Properties{ // Description: to.Ptr("Example Storage Mover Description"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_CreateOrUpdate.json func ExampleStorageMoversClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -271,7 +271,15 @@ func ExampleStorageMoversClient_CreateOrUpdate() { // res.StorageMover = armstoragemover.StorageMover{ // Name: to.Ptr("examples-storageMoverName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"), + // 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.1075056Z"); 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.1075056Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), + // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -280,18 +288,10 @@ func ExampleStorageMoversClient_CreateOrUpdate() { // Properties: &armstoragemover.Properties{ // Description: to.Ptr("Example Storage Mover Description"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_Update.json func ExampleStorageMoversClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -316,7 +316,15 @@ func ExampleStorageMoversClient_Update() { // res.StorageMover = armstoragemover.StorageMover{ // Name: to.Ptr("examples-storageMoverName"), // Type: to.Ptr("Microsoft.StorageMover/storageMovers"), - // ID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.StorageMover/storageMovers/examples-storageMoverName"), + // 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.1075056Z"); 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.1075056Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), + // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), @@ -325,18 +333,10 @@ func ExampleStorageMoversClient_Update() { // Properties: &armstoragemover.Properties{ // Description: to.Ptr("Updated Storage Mover Description"), // }, - // SystemData: &armstoragemover.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.1075056Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armstoragemover.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/Microsoft.StorageMover/stable/2023-03-01/examples/StorageMovers_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/storagemover/resource-manager/Microsoft.StorageMover/preview/2023-07-01-preview/examples/StorageMovers_Delete.json func ExampleStorageMoversClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {