From f0fd5bd88293444727561d69e2ed85c34b60de9d Mon Sep 17 00:00:00 2001 From: Azure-Fluent <57352629+Azure-Fluent@users.noreply.github.com> Date: Fri, 31 Mar 2023 08:08:33 +0800 Subject: [PATCH] [Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/machinelearning/armmachinelearning/v3.1.0 Co-authored-by: azure-sdk --- .../BatchDeployment/createOrUpdate.go | 87 +++- .../BatchDeployment/createOrUpdate.json | 2 +- .../examples-go/BatchDeployment/delete.go | 6 +- .../examples-go/BatchDeployment/delete.json | 2 +- .../examples-go/BatchDeployment/get.go | 83 +++- .../examples-go/BatchDeployment/get.json | 2 +- .../examples-go/BatchDeployment/list.go | 90 +++- .../examples-go/BatchDeployment/list.json | 2 +- .../examples-go/BatchDeployment/update.go | 83 +++- .../examples-go/BatchDeployment/update.json | 2 +- .../BatchEndpoint/createOrUpdate.go | 57 ++- .../BatchEndpoint/createOrUpdate.json | 2 +- .../examples-go/BatchEndpoint/delete.go | 6 +- .../examples-go/BatchEndpoint/delete.json | 2 +- .../examples-go/BatchEndpoint/get.go | 56 ++- .../examples-go/BatchEndpoint/get.json | 2 +- .../examples-go/BatchEndpoint/list.go | 63 ++- .../examples-go/BatchEndpoint/list.json | 2 +- .../examples-go/BatchEndpoint/listKeys.go | 13 +- .../examples-go/BatchEndpoint/listKeys.json | 2 +- .../examples-go/BatchEndpoint/update.go | 61 ++- .../examples-go/BatchEndpoint/update.json | 2 +- .../CodeContainer/createOrUpdate.go | 29 +- .../CodeContainer/createOrUpdate.json | 2 +- .../examples-go/CodeContainer/delete.go | 6 +- .../examples-go/CodeContainer/delete.json | 2 +- .../examples-go/CodeContainer/get.go | 29 +- .../examples-go/CodeContainer/get.json | 2 +- .../examples-go/CodeContainer/list.go | 56 ++- .../examples-go/CodeContainer/list.json | 2 +- .../examples-go/CodeVersion/createOrUpdate.go | 33 +- .../CodeVersion/createOrUpdate.json | 2 +- .../examples-go/CodeVersion/delete.go | 6 +- .../examples-go/CodeVersion/delete.json | 2 +- .../2022-10-01/examples-go/CodeVersion/get.go | 33 +- .../examples-go/CodeVersion/get.json | 2 +- .../examples-go/CodeVersion/list.go | 40 +- .../examples-go/CodeVersion/list.json | 2 +- .../ComponentContainer/createOrUpdate.go | 31 +- .../ComponentContainer/createOrUpdate.json | 2 +- .../examples-go/ComponentContainer/delete.go | 6 +- .../ComponentContainer/delete.json | 2 +- .../examples-go/ComponentContainer/get.go | 31 +- .../examples-go/ComponentContainer/get.json | 2 +- .../examples-go/ComponentContainer/list.go | 38 +- .../examples-go/ComponentContainer/list.json | 2 +- .../ComponentVersion/createOrUpdate.go | 37 +- .../ComponentVersion/createOrUpdate.json | 2 +- .../examples-go/ComponentVersion/delete.go | 6 +- .../examples-go/ComponentVersion/delete.json | 2 +- .../examples-go/ComponentVersion/get.go | 35 +- .../examples-go/ComponentVersion/get.json | 2 +- .../examples-go/ComponentVersion/list.go | 42 +- .../examples-go/ComponentVersion/list.json | 2 +- .../Compute/createOrUpdate/AKSCompute.go | 24 +- .../Compute/createOrUpdate/AKSCompute.json | 2 +- .../Compute/createOrUpdate/AmlCompute.go | 50 ++- .../Compute/createOrUpdate/AmlCompute.json | 2 +- .../Compute/createOrUpdate/BasicAKSCompute.go | 19 +- .../createOrUpdate/BasicAKSCompute.json | 2 +- .../Compute/createOrUpdate/BasicAmlCompute.go | 19 +- .../createOrUpdate/BasicAmlCompute.json | 2 +- .../createOrUpdate/BasicDataFactoryCompute.go | 19 +- .../BasicDataFactoryCompute.json | 2 +- .../Compute/createOrUpdate/ComputeInstance.go | 19 +- .../createOrUpdate/ComputeInstance.json | 2 +- .../createOrUpdate/ComputeInstanceMinimal.go | 19 +- .../ComputeInstanceMinimal.json | 2 +- .../ComputeInstanceWithSchedules.go | 19 +- .../ComputeInstanceWithSchedules.json | 2 +- .../createOrUpdate/KubernetesCompute.go | 42 +- .../createOrUpdate/KubernetesCompute.json | 2 +- .../2022-10-01/examples-go/Compute/delete.go | 6 +- .../examples-go/Compute/delete.json | 2 +- .../examples-go/Compute/get/AKSCompute.go | 23 +- .../examples-go/Compute/get/AKSCompute.json | 2 +- .../examples-go/Compute/get/AmlCompute.go | 50 ++- .../examples-go/Compute/get/AmlCompute.json | 2 +- .../Compute/get/ComputeInstance.go | 56 ++- .../Compute/get/ComputeInstance.json | 2 +- .../Compute/get/KubernetesCompute.go | 45 +- .../Compute/get/KubernetesCompute.json | 2 +- .../2022-10-01/examples-go/Compute/list.go | 44 +- .../2022-10-01/examples-go/Compute/list.json | 2 +- .../examples-go/Compute/listKeys.go | 17 +- .../examples-go/Compute/listKeys.json | 2 +- .../examples-go/Compute/listNodes.go | 31 +- .../examples-go/Compute/listNodes.json | 2 +- .../2022-10-01/examples-go/Compute/patch.go | 20 +- .../2022-10-01/examples-go/Compute/patch.json | 2 +- .../2022-10-01/examples-go/Compute/restart.go | 6 +- .../examples-go/Compute/restart.json | 2 +- .../2022-10-01/examples-go/Compute/start.go | 6 +- .../2022-10-01/examples-go/Compute/start.json | 2 +- .../2022-10-01/examples-go/Compute/stop.go | 6 +- .../2022-10-01/examples-go/Compute/stop.json | 2 +- .../DataContainer/createOrUpdate.go | 34 +- .../DataContainer/createOrUpdate.json | 2 +- .../examples-go/DataContainer/delete.go | 6 +- .../examples-go/DataContainer/delete.json | 2 +- .../examples-go/DataContainer/get.go | 34 +- .../examples-go/DataContainer/get.json | 2 +- .../examples-go/DataContainer/list.go | 66 ++- .../examples-go/DataContainer/list.json | 2 +- .../DataVersionBase/createOrUpdate.go | 34 +- .../DataVersionBase/createOrUpdate.json | 2 +- .../examples-go/DataVersionBase/delete.go | 6 +- .../examples-go/DataVersionBase/delete.json | 2 +- .../examples-go/DataVersionBase/get.go | 34 +- .../examples-go/DataVersionBase/get.json | 2 +- .../examples-go/DataVersionBase/list.go | 41 +- .../examples-go/DataVersionBase/list.json | 2 +- .../AzureBlobWAccountKey/createOrUpdate.go | 37 +- .../AzureBlobWAccountKey/createOrUpdate.json | 2 +- .../createOrUpdate.go | 37 +- .../createOrUpdate.json | 2 +- .../createOrUpdate.go | 40 +- .../createOrUpdate.json | 2 +- .../AzureFileWAccountKey/createOrUpdate.go | 36 +- .../AzureFileWAccountKey/createOrUpdate.json | 2 +- .../examples-go/Datastore/delete.go | 6 +- .../examples-go/Datastore/delete.json | 2 +- .../2022-10-01/examples-go/Datastore/get.go | 37 +- .../2022-10-01/examples-go/Datastore/get.json | 2 +- .../2022-10-01/examples-go/Datastore/list.go | 44 +- .../examples-go/Datastore/list.json | 2 +- .../examples-go/Datastore/listSecrets.go | 15 +- .../examples-go/Datastore/listSecrets.json | 2 +- .../EnvironmentContainer/createOrUpdate.go | 35 +- .../EnvironmentContainer/createOrUpdate.json | 2 +- .../EnvironmentContainer/delete.go | 6 +- .../EnvironmentContainer/delete.json | 2 +- .../examples-go/EnvironmentContainer/get.go | 29 +- .../examples-go/EnvironmentContainer/get.json | 2 +- .../examples-go/EnvironmentContainer/list.go | 36 +- .../EnvironmentContainer/list.json | 2 +- .../EnvironmentVersion/createOrUpdate.go | 53 ++- .../EnvironmentVersion/createOrUpdate.json | 2 +- .../examples-go/EnvironmentVersion/delete.go | 6 +- .../EnvironmentVersion/delete.json | 2 +- .../examples-go/EnvironmentVersion/get.go | 53 ++- .../examples-go/EnvironmentVersion/get.json | 2 +- .../examples-go/EnvironmentVersion/list.go | 60 ++- .../examples-go/EnvironmentVersion/list.json | 2 +- .../examples-go/ExternalFQDN/get.go | 38 +- .../examples-go/ExternalFQDN/get.json | 2 +- .../Job/AutoMLJob/createOrUpdate.go | 95 +++- .../Job/AutoMLJob/createOrUpdate.json | 2 +- .../examples-go/Job/AutoMLJob/get.go | 91 +++- .../examples-go/Job/AutoMLJob/get.json | 2 +- .../examples-go/Job/AutoMLJob/list.go | 98 ++++- .../examples-go/Job/AutoMLJob/list.json | 2 +- .../Job/CommandJob/createOrUpdate.go | 97 +++- .../Job/CommandJob/createOrUpdate.json | 2 +- .../examples-go/Job/CommandJob/get.go | 93 +++- .../examples-go/Job/CommandJob/get.json | 2 +- .../examples-go/Job/CommandJob/list.go | 100 ++++- .../examples-go/Job/CommandJob/list.json | 2 +- .../Job/PipelineJob/createOrUpdate.go | 67 ++- .../Job/PipelineJob/createOrUpdate.json | 2 +- .../examples-go/Job/PipelineJob/get.go | 65 ++- .../examples-go/Job/PipelineJob/get.json | 2 +- .../examples-go/Job/PipelineJob/list.go | 72 ++- .../examples-go/Job/PipelineJob/list.json | 2 +- .../Job/SweepJob/createOrUpdate.go | 99 ++++- .../Job/SweepJob/createOrUpdate.json | 2 +- .../examples-go/Job/SweepJob/get.go | 91 +++- .../examples-go/Job/SweepJob/get.json | 2 +- .../examples-go/Job/SweepJob/list.go | 98 ++++- .../examples-go/Job/SweepJob/list.json | 2 +- .../2022-10-01/examples-go/Job/cancel.go | 6 +- .../2022-10-01/examples-go/Job/cancel.json | 2 +- .../2022-10-01/examples-go/Job/delete.go | 6 +- .../2022-10-01/examples-go/Job/delete.json | 2 +- .../ModelContainer/createOrUpdate.go | 29 +- .../ModelContainer/createOrUpdate.json | 2 +- .../examples-go/ModelContainer/delete.go | 6 +- .../examples-go/ModelContainer/delete.json | 2 +- .../examples-go/ModelContainer/get.go | 29 +- .../examples-go/ModelContainer/get.json | 2 +- .../examples-go/ModelContainer/list.go | 36 +- .../examples-go/ModelContainer/list.json | 2 +- .../ModelVersion/createOrUpdate.go | 41 +- .../ModelVersion/createOrUpdate.json | 2 +- .../examples-go/ModelVersion/delete.go | 6 +- .../examples-go/ModelVersion/delete.json | 2 +- .../examples-go/ModelVersion/get.go | 41 +- .../examples-go/ModelVersion/get.json | 2 +- .../examples-go/ModelVersion/list.go | 48 +- .../examples-go/ModelVersion/list.json | 2 +- .../examples-go/Notebook/listKeys.go | 11 +- .../examples-go/Notebook/listKeys.json | 2 +- .../examples-go/Notebook/prepare.go | 17 +- .../examples-go/Notebook/prepare.json | 2 +- .../createOrUpdate.go | 91 +++- .../createOrUpdate.json | 2 +- .../KubernetesOnlineDeployment/get.go | 91 +++- .../KubernetesOnlineDeployment/get.json | 2 +- .../KubernetesOnlineDeployment/listSkus.go | 29 +- .../KubernetesOnlineDeployment/listSkus.json | 2 +- .../KubernetesOnlineDeployment/update.go | 91 +++- .../KubernetesOnlineDeployment/update.json | 2 +- .../ManagedOnlineDeployment/createOrUpdate.go | 86 +++- .../createOrUpdate.json | 2 +- .../ManagedOnlineDeployment/get.go | 86 +++- .../ManagedOnlineDeployment/get.json | 2 +- .../ManagedOnlineDeployment/listSkus.go | 29 +- .../ManagedOnlineDeployment/listSkus.json | 2 +- .../ManagedOnlineDeployment/update.go | 86 +++- .../ManagedOnlineDeployment/update.json | 2 +- .../examples-go/OnlineDeployment/delete.go | 6 +- .../examples-go/OnlineDeployment/delete.json | 2 +- .../examples-go/OnlineDeployment/getLogs.go | 12 +- .../examples-go/OnlineDeployment/getLogs.json | 2 +- .../examples-go/OnlineDeployment/list.go | 98 ++++- .../examples-go/OnlineDeployment/list.json | 2 +- .../OnlineEndpoint/createOrUpdate.go | 58 ++- .../OnlineEndpoint/createOrUpdate.json | 2 +- .../examples-go/OnlineEndpoint/delete.go | 6 +- .../examples-go/OnlineEndpoint/delete.json | 2 +- .../examples-go/OnlineEndpoint/get.go | 58 ++- .../examples-go/OnlineEndpoint/get.json | 2 +- .../examples-go/OnlineEndpoint/getToken.go | 15 +- .../examples-go/OnlineEndpoint/getToken.json | 2 +- .../examples-go/OnlineEndpoint/list.go | 65 ++- .../examples-go/OnlineEndpoint/list.json | 2 +- .../examples-go/OnlineEndpoint/listKeys.go | 13 +- .../examples-go/OnlineEndpoint/listKeys.json | 2 +- .../OnlineEndpoint/regenerateKeys.go | 6 +- .../OnlineEndpoint/regenerateKeys.json | 2 +- .../examples-go/OnlineEndpoint/update.go | 62 ++- .../examples-go/OnlineEndpoint/update.json | 2 +- .../createOrUpdate.go | 25 +- .../createOrUpdate.json | 2 +- .../PrivateEndpointConnection/delete.go | 6 +- .../PrivateEndpointConnection/delete.json | 2 +- .../PrivateEndpointConnection/get.go | 25 +- .../PrivateEndpointConnection/get.json | 2 +- .../PrivateEndpointConnection/list.go | 48 +- .../PrivateEndpointConnection/list.json | 2 +- .../examples-go/PrivateLinkResource/list.go | 22 +- .../examples-go/PrivateLinkResource/list.json | 2 +- .../2022-10-01/examples-go/Quota/list.go | 416 +++++++++++++++++- .../2022-10-01/examples-go/Quota/list.json | 2 +- .../2022-10-01/examples-go/Quota/update.go | 26 +- .../2022-10-01/examples-go/Quota/update.json | 2 +- .../examples-go/Schedule/createOrUpdate.go | 49 ++- .../examples-go/Schedule/createOrUpdate.json | 2 +- .../2022-10-01/examples-go/Schedule/delete.go | 6 +- .../examples-go/Schedule/delete.json | 2 +- .../2022-10-01/examples-go/Schedule/get.go | 47 +- .../2022-10-01/examples-go/Schedule/get.json | 2 +- .../2022-10-01/examples-go/Schedule/list.go | 54 ++- .../2022-10-01/examples-go/Schedule/list.json | 2 +- .../2022-10-01/examples-go/Usage/list.go | 401 ++++++++++++++++- .../2022-10-01/examples-go/Usage/list.json | 2 +- .../examples-go/VirtualMachineSize/list.go | 367 ++++++++++++++- .../examples-go/VirtualMachineSize/list.json | 2 +- .../examples-go/Workspace/create.go | 59 ++- .../examples-go/Workspace/create.json | 2 +- .../examples-go/Workspace/delete.go | 6 +- .../examples-go/Workspace/delete.json | 2 +- .../examples-go/Workspace/diagnose.go | 53 ++- .../examples-go/Workspace/diagnose.json | 2 +- .../2022-10-01/examples-go/Workspace/get.go | 79 +++- .../2022-10-01/examples-go/Workspace/get.json | 2 +- .../Workspace/listByResourceGroup.go | 46 +- .../Workspace/listByResourceGroup.json | 2 +- .../Workspace/listBySubscription.go | 46 +- .../Workspace/listBySubscription.json | 2 +- .../examples-go/Workspace/listKeys.go | 26 +- .../examples-go/Workspace/listKeys.json | 2 +- .../Workspace/listNotebookAccessToken.go | 17 +- .../Workspace/listNotebookAccessToken.json | 2 +- .../Workspace/listStorageAccountKeys.go | 11 +- .../Workspace/listStorageAccountKeys.json | 2 +- .../examples-go/Workspace/operationsList.go | 40 +- .../examples-go/Workspace/operationsList.json | 2 +- .../examples-go/Workspace/resyncKeys.go | 6 +- .../examples-go/Workspace/resyncKeys.json | 2 +- .../examples-go/Workspace/update.go | 30 +- .../examples-go/Workspace/update.json | 2 +- .../examples-go/WorkspaceConnection/create.go | 19 +- .../WorkspaceConnection/create.json | 2 +- .../examples-go/WorkspaceConnection/delete.go | 6 +- .../WorkspaceConnection/delete.json | 2 +- .../examples-go/WorkspaceConnection/get.go | 19 +- .../examples-go/WorkspaceConnection/get.json | 2 +- .../examples-go/WorkspaceConnection/list.go | 36 +- .../examples-go/WorkspaceConnection/list.json | 2 +- .../examples-go/WorkspaceFeature/list.go | 26 +- .../examples-go/WorkspaceFeature/list.json | 2 +- 292 files changed, 6272 insertions(+), 793 deletions(-) diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.go index 7555fd4699..eb84b9c694 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.BatchDeployment{ + poller, err := clientFactory.NewBatchDeploymentsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.BatchDeployment{ Location: to.Ptr("string"), Tags: map[string]*string{}, Identity: &armmachinelearning.ManagedServiceIdentity{ @@ -57,8 +57,8 @@ func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() { Resources: &armmachinelearning.DeploymentResourceConfiguration{ InstanceCount: to.Ptr[int32](1), InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ + Properties: map[string]any{ + "string": map[string]any{ "cd3c37dc-2876-4ca4-8a54-21bd7619724a": nil, }, }, @@ -83,6 +83,81 @@ func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.BatchDeployment = armmachinelearning.BatchDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchDeploymentProperties{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Compute: to.Ptr("string"), + // ErrorThreshold: to.Ptr[int32](1), + // LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo), + // MaxConcurrencyPerInstance: to.Ptr[int32](1), + // MiniBatchSize: to.Ptr[int64](1), + // Model: &armmachinelearning.IDAssetReference{ + // ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID), + // AssetID: to.Ptr("string"), + // }, + // OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly), + // OutputFileName: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // Resources: &armmachinelearning.DeploymentResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "4939850d-8eae-4343-8566-0826259a2ad1": nil, + // }, + // }, + // }, + // RetrySettings: &armmachinelearning.BatchRetrySettings{ + // MaxRetries: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.go index c6d046c1b1..bc4a6dc4dd 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json func ExampleBatchDeploymentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) + poller, err := clientFactory.NewBatchDeploymentsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.go index 26a706f00a..e471bc2ad7 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.go @@ -8,21 +8,96 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json func ExampleBatchDeploymentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) + res, err := clientFactory.NewBatchDeploymentsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.BatchDeployment = armmachinelearning.BatchDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchDeploymentProperties{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Compute: to.Ptr("string"), + // ErrorThreshold: to.Ptr[int32](1), + // LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo), + // MaxConcurrencyPerInstance: to.Ptr[int32](1), + // MiniBatchSize: to.Ptr[int64](1), + // Model: &armmachinelearning.IDAssetReference{ + // ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID), + // AssetID: to.Ptr("string"), + // }, + // OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly), + // OutputFileName: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // Resources: &armmachinelearning.DeploymentResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "843c2bb4-e5f1-4267-98c8-ba22a99dbb00": nil, + // }, + // }, + // }, + // RetrySettings: &armmachinelearning.BatchRetrySettings{ + // MaxRetries: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.go index fb9e0a321d..c8d2a3982d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.go @@ -9,29 +9,107 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json func ExampleBatchDeploymentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.BatchDeploymentsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewBatchDeploymentsClient().NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.BatchDeploymentsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.BatchDeploymentTrackedResourceArmPaginatedResult = armmachinelearning.BatchDeploymentTrackedResourceArmPaginatedResult{ + // Value: []*armmachinelearning.BatchDeployment{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchDeploymentProperties{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Compute: to.Ptr("string"), + // ErrorThreshold: to.Ptr[int32](1), + // LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo), + // MaxConcurrencyPerInstance: to.Ptr[int32](1), + // MiniBatchSize: to.Ptr[int64](1), + // Model: &armmachinelearning.IDAssetReference{ + // ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID), + // AssetID: to.Ptr("string"), + // }, + // OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly), + // OutputFileName: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // Resources: &armmachinelearning.DeploymentResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "a3c13e2e-a213-4cac-9f5a-b49966906ad6": nil, + // }, + // }, + // }, + // RetrySettings: &armmachinelearning.BatchRetrySettings{ + // MaxRetries: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.go index 0f43d9356e..4c39e65d96 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json func ExampleBatchDeploymentsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{ + poller, err := clientFactory.NewBatchDeploymentsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{ Properties: &armmachinelearning.PartialBatchDeployment{ Description: to.Ptr("string"), }, @@ -33,6 +33,81 @@ func ExampleBatchDeploymentsClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.BatchDeployment = armmachinelearning.BatchDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchDeploymentProperties{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Compute: to.Ptr("string"), + // ErrorThreshold: to.Ptr[int32](1), + // LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo), + // MaxConcurrencyPerInstance: to.Ptr[int32](1), + // MiniBatchSize: to.Ptr[int64](1), + // Model: &armmachinelearning.IDAssetReference{ + // ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID), + // AssetID: to.Ptr("string"), + // }, + // OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly), + // OutputFileName: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // Resources: &armmachinelearning.DeploymentResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "1e5e1cf9-b0ea-4cf6-9764-e750bf85c10a": nil, + // }, + // }, + // }, + // RetrySettings: &armmachinelearning.BatchRetrySettings{ + // MaxRetries: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchDeployment/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.go index da1b83142c..67353c5d5f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json func ExampleBatchEndpointsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.BatchEndpoint{ + poller, err := clientFactory.NewBatchEndpointsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.BatchEndpoint{ Location: to.Ptr("string"), Tags: map[string]*string{}, Identity: &armmachinelearning.ManagedServiceIdentity{ @@ -55,6 +55,55 @@ func ExampleBatchEndpointsClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.BatchEndpoint = armmachinelearning.BatchEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Defaults: &armmachinelearning.BatchEndpointDefaults{ + // DeploymentName: to.Ptr("string"), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.go index f549852410..07b408c999 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json func ExampleBatchEndpointsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "resourceGroup-1234", "testworkspace", "testBatchEndpoint", nil) + poller, err := clientFactory.NewBatchEndpointsClient().BeginDelete(ctx, "resourceGroup-1234", "testworkspace", "testBatchEndpoint", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.go index cb33032996..fc36563ce4 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.go @@ -8,21 +8,69 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json func ExampleBatchEndpointsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + res, err := clientFactory.NewBatchEndpointsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.BatchEndpoint = armmachinelearning.BatchEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Defaults: &armmachinelearning.BatchEndpointDefaults{ + // DeploymentName: to.Ptr("string"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.go index 49b617aeb3..ac22096cde 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.go @@ -9,28 +9,79 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json func ExampleBatchEndpointsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1), + pager := clientFactory.NewBatchEndpointsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.BatchEndpointTrackedResourceArmPaginatedResult = armmachinelearning.BatchEndpointTrackedResourceArmPaginatedResult{ + // Value: []*armmachinelearning.BatchEndpoint{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Defaults: &armmachinelearning.BatchEndpointDefaults{ + // DeploymentName: to.Ptr("string"), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.go index a6feb4f344..95cdef3331 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.go @@ -8,21 +8,26 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json func ExampleBatchEndpointsClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + res, err := clientFactory.NewBatchEndpointsClient().ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EndpointAuthKeys = armmachinelearning.EndpointAuthKeys{ + // PrimaryKey: to.Ptr("string"), + // SecondaryKey: to.Ptr("string"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/listKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.go index e38c82ef9a..4402aaf256 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.go @@ -9,23 +9,23 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json func ExampleBatchEndpointsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ + poller, err := clientFactory.NewBatchEndpointsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ Tags: map[string]*string{}, Identity: &armmachinelearning.PartialManagedServiceIdentity{ Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]interface{}{ - "string": map[string]interface{}{}, + UserAssignedIdentities: map[string]any{ + "string": map[string]any{}, }, }, }, nil) @@ -36,6 +36,55 @@ func ExampleBatchEndpointsClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.BatchEndpoint = armmachinelearning.BatchEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.BatchEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Defaults: &armmachinelearning.BatchEndpointDefaults{ + // DeploymentName: to.Ptr("string"), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/BatchEndpoint/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.go index 0b04895706..01f63bc5f0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json func ExampleCodeContainersClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "testrg123", "testworkspace", "testContainer", armmachinelearning.CodeContainer{ + res, err := clientFactory.NewCodeContainersClient().CreateOrUpdate(ctx, "testrg123", "testworkspace", "testContainer", armmachinelearning.CodeContainer{ Properties: &armmachinelearning.CodeContainerProperties{ Description: to.Ptr("string"), Tags: map[string]*string{ @@ -32,6 +32,27 @@ func ExampleCodeContainersClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.CodeContainer = armmachinelearning.CodeContainer{ + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "property1": to.Ptr("string"), + // "property2": to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.go index c4fb5bfaf0..8e4d7a3e84 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json func ExampleCodeContainersClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) + _, err = clientFactory.NewCodeContainersClient().Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.go index 3bab2bee91..e9bc996c8e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.go @@ -8,21 +8,42 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json func ExampleCodeContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "testworkspace", "testContainer", nil) + res, err := clientFactory.NewCodeContainersClient().Get(ctx, "testrg123", "testworkspace", "testContainer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.CodeContainer = armmachinelearning.CodeContainer{ + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "property1": to.Ptr("string"), + // "property2": to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.go index 2eef582203..616ae6c248 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.go @@ -8,26 +8,70 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json func ExampleCodeContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("testrg123", "testworkspace", &armmachinelearning.CodeContainersClientListOptions{Skip: nil}) + pager := clientFactory.NewCodeContainersClient().NewListPager("testrg123", "testworkspace", &armmachinelearning.CodeContainersClientListOptions{Skip: nil}) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.CodeContainerResourceArmPaginatedResult = armmachinelearning.CodeContainerResourceArmPaginatedResult{ + // Value: []*armmachinelearning.CodeContainer{ + // { + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "property1": to.Ptr("string"), + // "property2": to.Ptr("string"), + // }, + // }, + // }, + // { + // Name: to.Ptr("testContainer2"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer2"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "property1": to.Ptr("string"), + // "property2": to.Ptr("string"), + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeContainer/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.go index fb3508ddfa..479f352852 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json func ExampleCodeVersionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.CodeVersion{ + res, err := clientFactory.NewCodeVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.CodeVersion{ Properties: &armmachinelearning.CodeVersionProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -36,6 +36,31 @@ func ExampleCodeVersionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.CodeVersion = armmachinelearning.CodeVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // CodeURI: to.Ptr("https://blobStorage/folderName"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.go index 2683c2e501..3a6abea58c 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json func ExampleCodeVersionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + _, err = clientFactory.NewCodeVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.go index d8aa7c58f3..2f20924d94 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.go @@ -8,21 +8,46 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json func ExampleCodeVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + res, err := clientFactory.NewCodeVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.CodeVersion = armmachinelearning.CodeVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // CodeURI: to.Ptr("https://blobStorage/folderName"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.go index 1836bb11f3..4dbfb8e75c 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.go @@ -9,29 +9,57 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json func ExampleCodeVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewCodeVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.CodeVersionResourceArmPaginatedResult = armmachinelearning.CodeVersionResourceArmPaginatedResult{ + // Value: []*armmachinelearning.CodeVersion{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CodeVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // CodeURI: to.Ptr("https://blobStorage/folderName"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/CodeVersion/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.go index 777e79b5e7..452af76600 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json func ExampleComponentContainersClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.ComponentContainer{ + res, err := clientFactory.NewComponentContainersClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.ComponentContainer{ Properties: &armmachinelearning.ComponentContainerProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -34,6 +34,29 @@ func ExampleComponentContainersClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComponentContainer = armmachinelearning.ComponentContainer{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.go index 6bd84d2162..c2b3be55e9 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json func ExampleComponentContainersClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) + _, err = clientFactory.NewComponentContainersClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.go index 648fffc331..63bd52e0e3 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.go @@ -8,21 +8,44 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json func ExampleComponentContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewComponentContainersClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComponentContainer = armmachinelearning.ComponentContainer{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.go index 1105b36e96..d57875ce6c 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.go @@ -8,28 +8,54 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json func ExampleComponentContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ComponentContainersClientListOptions{Skip: nil, + pager := clientFactory.NewComponentContainersClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ComponentContainersClientListOptions{Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ComponentContainerResourceArmPaginatedResult = armmachinelearning.ComponentContainerResourceArmPaginatedResult{ + // Value: []*armmachinelearning.ComponentContainer{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentContainer/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.go index bf5c71be98..45e54f9ae5 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json func ExampleComponentVersionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ComponentVersion{ + res, err := clientFactory.NewComponentVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ComponentVersion{ Properties: &armmachinelearning.ComponentVersionProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -30,7 +30,7 @@ func ExampleComponentVersionsClient_CreateOrUpdate() { "string": to.Ptr("string"), }, IsAnonymous: to.Ptr(false), - ComponentSpec: map[string]interface{}{ + ComponentSpec: map[string]any{ "8ced901b-d826-477d-bfef-329da9672513": nil, }, }, @@ -38,6 +38,33 @@ func ExampleComponentVersionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComponentVersion = armmachinelearning.ComponentVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // ComponentSpec: map[string]any{ + // "2de2e74e-457d-4447-a581-933abc2b9d96": nil, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.go index 715ffac816..b00e7529f5 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json func ExampleComponentVersionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + _, err = clientFactory.NewComponentVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.go index 77794fa15b..d1f22bd0ea 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.go @@ -8,21 +8,48 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json func ExampleComponentVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + res, err := clientFactory.NewComponentVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComponentVersion = armmachinelearning.ComponentVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // ComponentSpec: map[string]any{ + // "1a7c40b5-2029-4f5f-a8d6-fd0822038773": nil, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.go index 65a0e1cc96..c983cb744a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.go @@ -9,30 +9,60 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json func ExampleComponentVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ComponentVersionsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewComponentVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ComponentVersionsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ComponentVersionResourceArmPaginatedResult = armmachinelearning.ComponentVersionResourceArmPaginatedResult{ + // Value: []*armmachinelearning.ComponentVersion{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ComponentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // ComponentSpec: map[string]any{ + // "50acbce5-cccc-475a-8ac6-c4da402afbd8": nil, + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ComponentVersion/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.go index 97207a9749..18ec91222b 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json func ExampleComputeClient_BeginCreateOrUpdate_updateAnAksCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.AKS{ Properties: &armmachinelearning.AKSSchemaProperties{ AgentCount: to.Ptr[int32](4), @@ -38,6 +38,22 @@ func ExampleComputeClient_BeginCreateOrUpdate_updateAnAksCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AKS{ + // Properties: &armmachinelearning.AKSSchemaProperties{ + // AgentCount: to.Ptr[int32](4), + // }, + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AKSCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.go index 4a6cb202d9..815f6927a2 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json func ExampleComputeClient_BeginCreateOrUpdate_updateAAmlCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.AmlCompute{ Properties: &armmachinelearning.AmlComputeProperties{ ScaleSettings: &armmachinelearning.ScaleSettings{ @@ -41,6 +41,48 @@ func ExampleComputeClient_BeginCreateOrUpdate_updateAAmlCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AmlCompute{ + // Properties: &armmachinelearning.AmlComputeProperties{ + // AllocationState: to.Ptr(armmachinelearning.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-27T22:28:08.998Z"); return t}()), + // CurrentNodeCount: to.Ptr[int32](0), + // EnableNodePublicIP: to.Ptr(true), + // IsolatedNetwork: to.Ptr(false), + // NodeStateCounts: &armmachinelearning.NodeStateCounts{ + // IdleNodeCount: to.Ptr[int32](0), + // LeavingNodeCount: to.Ptr[int32](0), + // PreemptedNodeCount: to.Ptr[int32](0), + // PreparingNodeCount: to.Ptr[int32](0), + // RunningNodeCount: to.Ptr[int32](0), + // UnusableNodeCount: to.Ptr[int32](0), + // }, + // OSType: to.Ptr(armmachinelearning.OsTypeWindows), + // RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessEnabled), + // ScaleSettings: &armmachinelearning.ScaleSettings{ + // MaxNodeCount: to.Ptr[int32](1), + // MinNodeCount: to.Ptr[int32](0), + // NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), + // }, + // Subnet: &armmachinelearning.ResourceID{ + // ID: to.Ptr("test-subnet-resource-id"), + // }, + // TargetNodeCount: to.Ptr[int32](1), + // VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated), + // VMSize: to.Ptr("STANDARD_NC6"), + // }, + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus2"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/AmlCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.go index 596e1060a6..442ee003c8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json func ExampleComputeClient_BeginCreateOrUpdate_createAnAksCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.AKS{ ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), }, @@ -33,6 +33,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnAksCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AKS{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAKSCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.go index 39be5a6c56..9b812d1f49 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json func ExampleComputeClient_BeginCreateOrUpdate_createAAmlCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.AmlCompute{ Properties: &armmachinelearning.AmlComputeProperties{ EnableNodePublicIP: to.Ptr(true), @@ -49,6 +49,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAAmlCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AmlCompute{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicAmlCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.go index db618ef9c1..f3601624eb 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json func ExampleComputeClient_BeginCreateOrUpdate_createADataFactoryCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.DataFactory{ ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory), }, @@ -33,6 +33,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createADataFactoryCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.DataFactory{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/BasicDataFactoryCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.go index 1373edc8e1..8188674097 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.ComputeInstance{ ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), Properties: &armmachinelearning.ComputeInstanceProperties{ @@ -50,6 +50,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.ComputeInstance{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstance.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.go index 2888cd2095..9cccae2997 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithMinimalInputs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.ComputeInstance{ ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), Properties: &armmachinelearning.ComputeInstanceProperties{ @@ -36,6 +36,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWith if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.ComputeInstance{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceMinimal.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.go index 3b026850e4..cadfbb415a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithSchedules() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.ComputeInstance{ ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), Properties: &armmachinelearning.ComputeInstanceProperties{ @@ -60,6 +60,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWith if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.ComputeInstance{ + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/ComputeInstanceWithSchedules.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.go index a3ef13c759..b7f58fc5a5 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json func ExampleComputeClient_BeginCreateOrUpdate_attachAKubernetesCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ + poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ Properties: &armmachinelearning.Kubernetes{ Description: to.Ptr("some compute"), ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes), @@ -55,6 +55,40 @@ func ExampleComputeClient_BeginCreateOrUpdate_attachAKubernetesCompute() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.Kubernetes{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), + // Properties: &armmachinelearning.KubernetesProperties{ + // DefaultInstanceType: to.Ptr("defaultInstanceType"), + // ExtensionInstanceReleaseTrain: to.Ptr("stable"), + // InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{ + // "defaultInstanceType": &armmachinelearning.InstanceTypeSchema{ + // Resources: &armmachinelearning.InstanceTypeSchemaResources{ + // Limits: map[string]*string{ + // "cpu": to.Ptr("1"), + // "memory": to.Ptr("4Gi"), + // "nvidia.com/gpu": nil, + // }, + // Requests: map[string]*string{ + // "cpu": to.Ptr("1"), + // "memory": to.Ptr("4Gi"), + // "nvidia.com/gpu": nil, + // }, + // }, + // }, + // }, + // Namespace: to.Ptr("default"), + // }, + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/createOrUpdate/KubernetesCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.go index 22c437c257..1e3230397f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json func ExampleComputeClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.UnderlyingResourceActionDelete, nil) + poller, err := clientFactory.NewComputeClient().BeginDelete(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.UnderlyingResourceActionDelete, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.go index d0e34f72b4..db0ea90a41 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.go @@ -8,21 +8,36 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json func ExampleComputeClient_Get_getAAksCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil) + res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AKS{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AKSCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.go index 8f854739b8..27832e88e1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.go @@ -8,21 +8,63 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json func ExampleComputeClient_Get_getAAmlCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil) + res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AmlCompute{ + // Properties: &armmachinelearning.AmlComputeProperties{ + // AllocationState: to.Ptr(armmachinelearning.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-27T22:28:08.998Z"); return t}()), + // CurrentNodeCount: to.Ptr[int32](0), + // EnableNodePublicIP: to.Ptr(true), + // IsolatedNetwork: to.Ptr(false), + // NodeStateCounts: &armmachinelearning.NodeStateCounts{ + // IdleNodeCount: to.Ptr[int32](0), + // LeavingNodeCount: to.Ptr[int32](0), + // PreemptedNodeCount: to.Ptr[int32](0), + // PreparingNodeCount: to.Ptr[int32](0), + // RunningNodeCount: to.Ptr[int32](0), + // UnusableNodeCount: to.Ptr[int32](0), + // }, + // OSType: to.Ptr(armmachinelearning.OsTypeWindows), + // RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessEnabled), + // ScaleSettings: &armmachinelearning.ScaleSettings{ + // MaxNodeCount: to.Ptr[int32](1), + // MinNodeCount: to.Ptr[int32](0), + // NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), + // }, + // Subnet: &armmachinelearning.ResourceID{ + // ID: to.Ptr("test-subnet-resource-id"), + // }, + // TargetNodeCount: to.Ptr[int32](1), + // VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated), + // VMSize: to.Ptr("STANDARD_NC6"), + // }, + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus2"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/AmlCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.go index 207a83e29a..40c021fba2 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.go @@ -8,21 +8,69 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json func ExampleComputeClient_Get_getAnComputeInstance() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil) + res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.ComputeInstance{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // Properties: &armmachinelearning.ComputeInstanceProperties{ + // ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyShared), + // Applications: []*armmachinelearning.ComputeInstanceApplication{ + // { + // DisplayName: to.Ptr("Jupyter"), + // EndpointURI: to.Ptr("https://compute123.eastus2.azureml.net/jupyter"), + // }}, + // ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal), + // ConnectivityEndpoints: &armmachinelearning.ComputeInstanceConnectivityEndpoints{ + // PrivateIPAddress: to.Ptr("10.0.0.1"), + // PublicIPAddress: to.Ptr("10.0.0.1"), + // }, + // CreatedBy: &armmachinelearning.ComputeInstanceCreatedBy{ + // UserID: to.Ptr("00000000-0000-0000-0000-000000000000"), + // UserName: to.Ptr("foobar@microsoft.com"), + // UserOrgID: to.Ptr("00000000-0000-0000-0000-000000000000"), + // }, + // PersonalComputeInstanceSettings: &armmachinelearning.PersonalComputeInstanceSettings{ + // AssignedUser: &armmachinelearning.AssignedUser{ + // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), + // TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), + // }, + // }, + // SSHSettings: &armmachinelearning.ComputeInstanceSSHSettings{ + // AdminUserName: to.Ptr("azureuser"), + // SSHPort: to.Ptr[int32](22), + // SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessEnabled), + // }, + // State: to.Ptr(armmachinelearning.ComputeInstanceStateRunning), + // Subnet: &armmachinelearning.ResourceID{ + // ID: to.Ptr("test-subnet-resource-id"), + // }, + // VMSize: to.Ptr("STANDARD_NC6"), + // }, + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus2"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/ComputeInstance.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.go index c54442e590..141fa2dfe0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.go @@ -8,21 +8,58 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json func ExampleComputeClient_Get_getAKubernetesCompute() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil) + res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.Kubernetes{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // IsAttachedCompute: to.Ptr(true), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), + // Properties: &armmachinelearning.KubernetesProperties{ + // DefaultInstanceType: to.Ptr("defaultInstanceType"), + // ExtensionInstanceReleaseTrain: to.Ptr("stable"), + // InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{ + // "defaultInstanceType": &armmachinelearning.InstanceTypeSchema{ + // Resources: &armmachinelearning.InstanceTypeSchemaResources{ + // Limits: map[string]*string{ + // "cpu": to.Ptr("1"), + // "memory": to.Ptr("4Gi"), + // "nvidia.com/gpu": nil, + // }, + // Requests: map[string]*string{ + // "cpu": to.Ptr("1"), + // "memory": to.Ptr("4Gi"), + // "nvidia.com/gpu": nil, + // }, + // }, + // }, + // }, + // Namespace: to.Ptr("default"), + // }, + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/get/KubernetesCompute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.go index 2fda10ece4..2a78cc2990 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.go @@ -8,26 +8,58 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json func ExampleComputeClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("testrg123", "workspaces123", &armmachinelearning.ComputeClientListOptions{Skip: nil}) + pager := clientFactory.NewComputeClient().NewListPager("testrg123", "workspaces123", &armmachinelearning.ComputeClientListOptions{Skip: nil}) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.PaginatedComputeResourcesList = armmachinelearning.PaginatedComputeResourcesList{ + // Value: []*armmachinelearning.ComputeResource{ + // { + // Properties: &armmachinelearning.AKS{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus"), + // }, + // { + // Properties: &armmachinelearning.AKS{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute1234-56826-c9b00420020b2"), + // }, + // Name: to.Ptr("compute1234"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute1234"), + // Location: to.Ptr("eastus"), + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.go index fefe8d13f8..76c34a3ae8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.go @@ -8,21 +8,30 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json func ExampleComputeClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListKeys(ctx, "testrg123", "workspaces123", "compute123", nil) + res, err := clientFactory.NewComputeClient().ListKeys(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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 = armmachinelearning.ComputeClientListKeysResponse{ + // ComputeSecretsClassification: &armmachinelearning.AksComputeSecrets{ + // AdminKubeConfig: to.Ptr("admin kube config..."), + // ImagePullSecretName: to.Ptr("the image pull secret name"), + // UserKubeConfig: to.Ptr("user kube config..."), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.go index 68afdff832..57253af9ea 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.go @@ -8,26 +8,45 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json func ExampleComputeClient_NewListNodesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListNodesPager("testrg123", "workspaces123", "compute123", nil) + pager := clientFactory.NewComputeClient().NewListNodesPager("testrg123", "workspaces123", "compute123", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Nodes { - // TODO: use page item + for _, v := range page.Nodes { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.AmlComputeNodesInformation = armmachinelearning.AmlComputeNodesInformation{ + // Nodes: []*armmachinelearning.AmlComputeNodeInformation{ + // { + // NodeID: to.Ptr("tvm-3601533753_1-20170719t162906z"), + // NodeState: to.Ptr(armmachinelearning.NodeStateRunning), + // Port: to.Ptr[int32](50000), + // PrivateIPAddress: to.Ptr("13.84.190.124"), + // PublicIPAddress: to.Ptr("13.84.190.134"), + // RunID: to.Ptr("2f378a44-38f2-443a-9f0d-9909d0b47890"), + // }, + // { + // NodeID: to.Ptr("tvm-3601533753_2-20170719t162906z"), + // NodeState: to.Ptr(armmachinelearning.NodeStateIdle), + // Port: to.Ptr[int32](50001), + // PrivateIPAddress: to.Ptr("13.84.190.124"), + // PublicIPAddress: to.Ptr("13.84.190.134"), + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/listNodes.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.go index d422714c07..7cb89f12e2 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json func ExampleComputeClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ClusterUpdateParameters{ + poller, err := clientFactory.NewComputeClient().BeginUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ClusterUpdateParameters{ Properties: &armmachinelearning.ClusterUpdateProperties{ Properties: &armmachinelearning.ScaleSettingsInformation{ ScaleSettings: &armmachinelearning.ScaleSettings{ @@ -38,6 +38,18 @@ func ExampleComputeClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.ComputeResource = armmachinelearning.ComputeResource{ + // Properties: &armmachinelearning.AmlCompute{ + // Description: to.Ptr("some compute"), + // ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), + // ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded), + // }, + // Name: to.Ptr("compute123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"), + // Location: to.Ptr("eastus2"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/patch.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.go index ddf7d45a78..cea6b27cb7 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json func ExampleComputeClient_BeginRestart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginRestart(ctx, "testrg123", "workspaces123", "compute123", nil) + poller, err := clientFactory.NewComputeClient().BeginRestart(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/restart.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.go index 2c765f0df0..c82708f49d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json func ExampleComputeClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginStart(ctx, "testrg123", "workspaces123", "compute123", nil) + poller, err := clientFactory.NewComputeClient().BeginStart(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/start.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.go index 865b164c5e..976dc8f201 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json func ExampleComputeClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginStop(ctx, "testrg123", "workspaces123", "compute123", nil) + poller, err := clientFactory.NewComputeClient().BeginStop(ctx, "testrg123", "workspaces123", "compute123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Compute/stop.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.go index e2f6d41d16..1ae9db4d86 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json func ExampleDataContainersClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "testrg123", "workspace123", "datacontainer123", armmachinelearning.DataContainer{ + res, err := clientFactory.NewDataContainersClient().CreateOrUpdate(ctx, "testrg123", "workspace123", "datacontainer123", armmachinelearning.DataContainer{ Properties: &armmachinelearning.DataContainerProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -37,6 +37,32 @@ func ExampleDataContainersClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.DataContainer = armmachinelearning.DataContainer{ + // Name: to.Ptr("datacontainer123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/data"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/data/datacontainer123"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.DataContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "properties1": to.Ptr("value1"), + // "properties2": to.Ptr("value2"), + // }, + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // DataType: to.Ptr(armmachinelearning.DataType("UriFile")), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.go index eae2f75f8c..4ad50de203 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json func ExampleDataContainersClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "testrg123", "workspace123", "datacontainer123", nil) + _, err = clientFactory.NewDataContainersClient().Delete(ctx, "testrg123", "workspace123", "datacontainer123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.go index 8dfff48aa0..3749555cad 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.go @@ -8,21 +8,47 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json func ExampleDataContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspace123", "datacontainer123", nil) + res, err := clientFactory.NewDataContainersClient().Get(ctx, "testrg123", "workspace123", "datacontainer123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.DataContainer = armmachinelearning.DataContainer{ + // Name: to.Ptr("datacontainer123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/data"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/data/datacontainer123"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.DataContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "properties1": to.Ptr("value1"), + // "properties2": to.Ptr("value2"), + // }, + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // DataType: to.Ptr(armmachinelearning.DataType("UriFile")), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.go index f940eb9ab5..022cf2ad14 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.go @@ -8,28 +8,82 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/list.json func ExampleDataContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("testrg123", "workspace123", &armmachinelearning.DataContainersClientListOptions{Skip: nil, + pager := clientFactory.NewDataContainersClient().NewListPager("testrg123", "workspace123", &armmachinelearning.DataContainersClientListOptions{Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.DataContainerResourceArmPaginatedResult = armmachinelearning.DataContainerResourceArmPaginatedResult{ + // Value: []*armmachinelearning.DataContainer{ + // { + // Name: to.Ptr("datastore123"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/data"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/data/datacontainer123"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.DataContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "properties1": to.Ptr("value1"), + // "properties2": to.Ptr("value2"), + // }, + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // DataType: to.Ptr(armmachinelearning.DataType("UriFile")), + // }, + // }, + // { + // Name: to.Ptr("datastore124"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/data"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/data/datacontainer124"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.DataContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "properties1": to.Ptr("value1"), + // "properties2": to.Ptr("value2"), + // }, + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // DataType: to.Ptr(armmachinelearning.DataType("UriFile")), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataContainer/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.go index fe5cb30465..1f8481b992 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json func ExampleDataVersionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DataVersionBase{ + res, err := clientFactory.NewDataVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DataVersionBase{ Properties: &armmachinelearning.URIFileDataVersion{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -37,6 +37,32 @@ func ExampleDataVersionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.DataVersionBase = armmachinelearning.DataVersionBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.URIFileDataVersion{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // DataType: to.Ptr(armmachinelearning.DataTypeURIFile), + // DataURI: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.go index 6233fd3931..e02f7287a7 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/delete.json func ExampleDataVersionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + _, err = clientFactory.NewDataVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.go index eb14f0eedc..7c2e94433b 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.go @@ -8,21 +8,47 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json func ExampleDataVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + res, err := clientFactory.NewDataVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.DataVersionBase = armmachinelearning.DataVersionBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.URIFileDataVersion{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // DataType: to.Ptr(armmachinelearning.DataTypeURIFile), + // DataURI: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.go index 4f7ad3fa0f..7482f44c3a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.go @@ -9,31 +9,60 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/list.json func ExampleDataVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.DataVersionsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewDataVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.DataVersionsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, Tags: to.Ptr("string"), ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.DataVersionBaseResourceArmPaginatedResult = armmachinelearning.DataVersionBaseResourceArmPaginatedResult{ + // Value: []*armmachinelearning.DataVersionBase{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.URIFileDataVersion{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // DataType: to.Ptr(armmachinelearning.DataTypeURIFile), + // DataURI: to.Ptr("string"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/DataVersionBase/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.go index cc91d19a29..1866ad2b8a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureBlobWAccountKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ + res, err := clientFactory.NewDatastoresClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ Properties: &armmachinelearning.AzureBlobDatastore{ Description: to.Ptr("string"), Tags: map[string]*string{ @@ -43,6 +43,35 @@ func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureBlobWAcc if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Datastore = armmachinelearning.Datastore{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureBlobDatastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureBlob), + // IsDefault: to.Ptr(false), + // AccountName: to.Ptr("string"), + // ContainerName: to.Ptr("string"), + // Endpoint: to.Ptr("core.windows.net"), + // Protocol: to.Ptr("https"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureBlobWAccountKey/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.go index b542bede44..2b0a33be74 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ + res, err := clientFactory.NewDatastoresClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ Properties: &armmachinelearning.AzureDataLakeGen1Datastore{ Description: to.Ptr("string"), Tags: map[string]*string{ @@ -44,6 +44,35 @@ func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLake if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Datastore = armmachinelearning.Datastore{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureDataLakeGen1Datastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.ServicePrincipalDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeServicePrincipal), + // AuthorityURL: to.Ptr("string"), + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // ResourceURL: to.Ptr("string"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureDataLakeGen1), + // StoreName: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.go index e5195dfceb..b591d2cec3 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ + res, err := clientFactory.NewDatastoresClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ Properties: &armmachinelearning.AzureDataLakeGen2Datastore{ Description: to.Ptr("string"), Tags: map[string]*string{ @@ -47,6 +47,38 @@ func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLake if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Datastore = armmachinelearning.Datastore{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureDataLakeGen2Datastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.ServicePrincipalDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeServicePrincipal), + // AuthorityURL: to.Ptr("string"), + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // ResourceURL: to.Ptr("string"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureDataLakeGen2), + // AccountName: to.Ptr("string"), + // Endpoint: to.Ptr("string"), + // Filesystem: to.Ptr("string"), + // Protocol: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.go index 2b0b467d65..afcb9a6e92 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureFileStoreWAccountKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ + res, err := clientFactory.NewDatastoresClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Datastore{ Properties: &armmachinelearning.AzureFileDatastore{ Description: to.Ptr("string"), Tags: map[string]*string{ @@ -43,6 +43,34 @@ func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureFileStor if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Datastore = armmachinelearning.Datastore{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureFileDatastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureFile), + // AccountName: to.Ptr("string"), + // Endpoint: to.Ptr("string"), + // FileShareName: to.Ptr("string"), + // Protocol: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/AzureFileWAccountKey/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.go index fe8acdd1a1..31566839bd 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json func ExampleDatastoresClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) + _, err = clientFactory.NewDatastoresClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.go index ac2224a8fe..2292234023 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.go @@ -8,21 +8,50 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json func ExampleDatastoresClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewDatastoresClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Datastore = armmachinelearning.Datastore{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureBlobDatastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureBlob), + // IsDefault: to.Ptr(false), + // AccountName: to.Ptr("string"), + // ContainerName: to.Ptr("string"), + // Endpoint: to.Ptr("core.windows.net"), + // Protocol: to.Ptr("https"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.go index a1c93d72bb..a0ab75c7ff 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/list.json func ExampleDatastoresClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.DatastoresClientListOptions{Skip: nil, + pager := clientFactory.NewDatastoresClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.DatastoresClientListOptions{Skip: nil, Count: to.Ptr[int32](1), IsDefault: to.Ptr(false), Names: []string{ @@ -30,13 +30,45 @@ func ExampleDatastoresClient_NewListPager() { OrderByAsc: to.Ptr(false), }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.DatastoreResourceArmPaginatedResult = armmachinelearning.DatastoreResourceArmPaginatedResult{ + // Value: []*armmachinelearning.Datastore{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.AzureBlobDatastore{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ + // CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), + // }, + // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureBlob), + // IsDefault: to.Ptr(false), + // AccountName: to.Ptr("string"), + // ContainerName: to.Ptr("string"), + // Endpoint: to.Ptr("core.windows.net"), + // Protocol: to.Ptr("https"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.go index bb0ad40abe..345cd517ff 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.go @@ -8,21 +8,28 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json func ExampleDatastoresClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListSecrets(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewDatastoresClient().ListSecrets(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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 = armmachinelearning.DatastoresClientListSecretsResponse{ + // DatastoreSecretsClassification: &armmachinelearning.AccountKeyDatastoreSecrets{ + // SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), + // Key: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Datastore/listSecrets.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.go index 38e6de544f..f47fa29630 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json func ExampleEnvironmentContainersClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "testrg123", "testworkspace", "testEnvironment", armmachinelearning.EnvironmentContainer{ + res, err := clientFactory.NewEnvironmentContainersClient().CreateOrUpdate(ctx, "testrg123", "testworkspace", "testEnvironment", armmachinelearning.EnvironmentContainer{ Properties: &armmachinelearning.EnvironmentContainerProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -38,6 +38,33 @@ func ExampleEnvironmentContainersClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EnvironmentContainer = armmachinelearning.EnvironmentContainer{ + // Name: to.Ptr("testEnvironment"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/environments"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/environments/testEnvironment"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-04T03:39:11.300Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-04T03:39:11.300Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentContainerProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "additionalProp1": to.Ptr("string"), + // "additionalProp2": to.Ptr("string"), + // "additionalProp3": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "additionalProp1": to.Ptr("string"), + // "additionalProp2": to.Ptr("string"), + // "additionalProp3": to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.go index 6f911845bd..106ad20ebc 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/delete.json func ExampleEnvironmentContainersClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) + _, err = clientFactory.NewEnvironmentContainersClient().Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.go index 0b1c3b97d1..d35434584e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.go @@ -8,21 +8,42 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json func ExampleEnvironmentContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "testworkspace", "testEnvironment", nil) + res, err := clientFactory.NewEnvironmentContainersClient().Get(ctx, "testrg123", "testworkspace", "testEnvironment", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EnvironmentContainer = armmachinelearning.EnvironmentContainer{ + // Name: to.Ptr("testEnvironment"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/environments"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/environments/testEnvironment"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.go index 349690bd44..a1e888b557 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.go @@ -8,28 +8,52 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/list.json func ExampleEnvironmentContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("testrg123", "testworkspace", &armmachinelearning.EnvironmentContainersClientListOptions{Skip: nil, + pager := clientFactory.NewEnvironmentContainersClient().NewListPager("testrg123", "testworkspace", &armmachinelearning.EnvironmentContainersClientListOptions{Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.EnvironmentContainerResourceArmPaginatedResult = armmachinelearning.EnvironmentContainerResourceArmPaginatedResult{ + // Value: []*armmachinelearning.EnvironmentContainer{ + // { + // Name: to.Ptr("testEnvironment"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/environments"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/environments/testEnvironment"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentContainerProperties{ + // Description: to.Ptr("string"), + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentContainer/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.go index 38434f8633..8aa28efef1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json func ExampleEnvironmentVersionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.EnvironmentVersion{ + res, err := clientFactory.NewEnvironmentVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.EnvironmentVersion{ Properties: &armmachinelearning.EnvironmentVersionProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -55,6 +55,51 @@ func ExampleEnvironmentVersionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EnvironmentVersion = armmachinelearning.EnvironmentVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Build: &armmachinelearning.BuildContext{ + // ContextURI: to.Ptr("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/"), + // DockerfilePath: to.Ptr("prod/Dockerfile"), + // }, + // CondaFile: to.Ptr("string"), + // EnvironmentType: to.Ptr(armmachinelearning.EnvironmentTypeCurated), + // Image: to.Ptr("docker.io/tensorflow/serving:latest"), + // InferenceConfig: &armmachinelearning.InferenceContainerProperties{ + // LivenessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ReadinessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ScoringRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.go index 43a6644367..fc31c733c0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/delete.json func ExampleEnvironmentVersionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + _, err = clientFactory.NewEnvironmentVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.go index c5db60516d..06741416e0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.go @@ -8,21 +8,66 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json func ExampleEnvironmentVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + res, err := clientFactory.NewEnvironmentVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EnvironmentVersion = armmachinelearning.EnvironmentVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Build: &armmachinelearning.BuildContext{ + // ContextURI: to.Ptr("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/"), + // DockerfilePath: to.Ptr("prod/Dockerfile"), + // }, + // CondaFile: to.Ptr("string"), + // EnvironmentType: to.Ptr(armmachinelearning.EnvironmentTypeCurated), + // Image: to.Ptr("docker.io/tensorflow/serving:latest"), + // InferenceConfig: &armmachinelearning.InferenceContainerProperties{ + // LivenessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ReadinessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ScoringRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.go index 599e56ef40..f758b4f42d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.go @@ -9,30 +9,78 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/list.json func ExampleEnvironmentVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.EnvironmentVersionsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewEnvironmentVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.EnvironmentVersionsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.EnvironmentVersionResourceArmPaginatedResult = armmachinelearning.EnvironmentVersionResourceArmPaginatedResult{ + // Value: []*armmachinelearning.EnvironmentVersion{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.EnvironmentVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Build: &armmachinelearning.BuildContext{ + // ContextURI: to.Ptr("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/"), + // DockerfilePath: to.Ptr("prod/Dockerfile"), + // }, + // CondaFile: to.Ptr("string"), + // EnvironmentType: to.Ptr(armmachinelearning.EnvironmentTypeCurated), + // Image: to.Ptr("docker.io/tensorflow/serving:latest"), + // InferenceConfig: &armmachinelearning.InferenceContainerProperties{ + // LivenessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ReadinessRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // ScoringRoute: &armmachinelearning.Route{ + // Path: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // }, + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/EnvironmentVersion/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.go index a48269e73e..6ff18e9e94 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.go @@ -8,21 +8,51 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json func ExampleWorkspacesClient_ListOutboundNetworkDependenciesEndpoints() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListOutboundNetworkDependenciesEndpoints(ctx, "workspace-1234", "testworkspace", nil) + res, err := clientFactory.NewWorkspacesClient().ListOutboundNetworkDependenciesEndpoints(ctx, "workspace-1234", "testworkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ExternalFQDNResponse = armmachinelearning.ExternalFQDNResponse{ + // Value: []*armmachinelearning.FQDNEndpoints{ + // { + // Properties: &armmachinelearning.FQDNEndpointsProperties{ + // Category: to.Ptr("Azure Active Directory"), + // Endpoints: []*armmachinelearning.FQDNEndpoint{ + // { + // DomainName: to.Ptr("login.microsoftonline.com"), + // EndpointDetails: []*armmachinelearning.FQDNEndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // }, + // { + // Properties: &armmachinelearning.FQDNEndpointsProperties{ + // Category: to.Ptr("Azure portal"), + // Endpoints: []*armmachinelearning.FQDNEndpoint{ + // { + // DomainName: to.Ptr("management.azure.com"), + // EndpointDetails: []*armmachinelearning.FQDNEndpointDetail{ + // { + // Port: to.Ptr[int32](443), + // }}, + // }}, + // }, + // }}, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ExternalFQDN/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.go index 90b4fcdc0e..90015993ae 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json func ExampleJobsClient_CreateOrUpdate_createOrUpdateAutoMlJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ + res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ Properties: &armmachinelearning.AutoMLJob{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -62,8 +62,8 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateAutoMlJob() { Resources: &armmachinelearning.JobResourceConfiguration{ InstanceCount: to.Ptr[int32](1), InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ + Properties: map[string]any{ + "string": map[string]any{ "9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad": nil, }, }, @@ -91,6 +91,89 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateAutoMlJob() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), + // }, + // Properties: &armmachinelearning.AutoMLJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // IsArchived: to.Ptr(false), + // JobType: to.Ptr(armmachinelearning.JobTypeAutoML), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")), + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad": nil, + // }, + // }, + // }, + // TaskDetails: &armmachinelearning.ImageClassification{ + // TargetColumnName: to.Ptr("string"), + // TaskType: to.Ptr(armmachinelearning.TaskTypeImageClassification), + // TrainingData: &armmachinelearning.MLTableJobInput{ + // URI: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeMltable), + // }, + // LimitSettings: &armmachinelearning.ImageLimitSettings{ + // MaxTrials: to.Ptr[int32](2), + // }, + // ModelSettings: &armmachinelearning.ImageModelSettingsClassification{ + // ValidationCropSize: to.Ptr[int32](2), + // }, + // SearchSpace: []*armmachinelearning.ImageModelDistributionSettingsClassification{ + // { + // ValidationCropSize: to.Ptr("choice(2, 360)"), + // }}, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.go index e987b0e8d6..2998d4297a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.go @@ -8,21 +8,104 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json func ExampleJobsClient_Get_getAutoMlJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), + // }, + // Properties: &armmachinelearning.AutoMLJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // IsArchived: to.Ptr(false), + // JobType: to.Ptr(armmachinelearning.JobTypeAutoML), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")), + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad": nil, + // }, + // }, + // }, + // TaskDetails: &armmachinelearning.ImageClassification{ + // TargetColumnName: to.Ptr("string"), + // TaskType: to.Ptr(armmachinelearning.TaskTypeImageClassification), + // TrainingData: &armmachinelearning.MLTableJobInput{ + // URI: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeMltable), + // }, + // LimitSettings: &armmachinelearning.ImageLimitSettings{ + // MaxTrials: to.Ptr[int32](2), + // }, + // ModelSettings: &armmachinelearning.ImageModelSettingsClassification{ + // ValidationCropSize: to.Ptr[int32](2), + // }, + // SearchSpace: []*armmachinelearning.ImageModelDistributionSettingsClassification{ + // { + // ValidationCropSize: to.Ptr("choice(2, 360)"), + // }}, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.go index bedfa2b4da..674754cba8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.go @@ -8,30 +8,116 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json func ExampleJobsClient_NewListPager_listAutoMlJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, + pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, JobType: nil, Tag: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{ + // Value: []*armmachinelearning.JobBase{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), + // }, + // Properties: &armmachinelearning.AutoMLJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // IsArchived: to.Ptr(false), + // JobType: to.Ptr(armmachinelearning.JobTypeAutoML), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")), + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad": nil, + // }, + // }, + // }, + // TaskDetails: &armmachinelearning.ImageClassification{ + // TargetColumnName: to.Ptr("string"), + // TaskType: to.Ptr(armmachinelearning.TaskTypeImageClassification), + // TrainingData: &armmachinelearning.MLTableJobInput{ + // URI: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeMltable), + // }, + // LimitSettings: &armmachinelearning.ImageLimitSettings{ + // MaxTrials: to.Ptr[int32](2), + // }, + // ModelSettings: &armmachinelearning.ImageModelSettingsClassification{ + // ValidationCropSize: to.Ptr[int32](2), + // }, + // SearchSpace: []*armmachinelearning.ImageModelDistributionSettingsClassification{ + // { + // ValidationCropSize: to.Ptr("choice(2, 360)"), + // }}, + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/AutoMLJob/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.go index 274b9196a2..bc449f3691 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json func ExampleJobsClient_CreateOrUpdate_createOrUpdateCommandJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ + res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ Properties: &armmachinelearning.CommandJob{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -79,8 +79,8 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateCommandJob() { Resources: &armmachinelearning.JobResourceConfiguration{ InstanceCount: to.Ptr[int32](1), InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ + Properties: map[string]any{ + "string": map[string]any{ "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, }, }, @@ -90,6 +90,91 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateCommandJob() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CommandJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // JobType: to.Ptr(armmachinelearning.JobTypeCommand), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.TensorFlow{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeTensorFlow), + // ParameterServerCount: to.Ptr[int32](1), + // WorkerCount: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Limits: &armmachinelearning.CommandJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeCommand), + // Timeout: to.Ptr("PT5M"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Parameters: map[string]any{ + // "string": "string", + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "a0847709-f5aa-4561-8ba5-d915d403fdcf": nil, + // }, + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.go index 6d3a63c058..1b5a1993a5 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.go @@ -8,21 +8,106 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json func ExampleJobsClient_Get_getCommandJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CommandJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // JobType: to.Ptr(armmachinelearning.JobTypeCommand), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.TensorFlow{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeTensorFlow), + // ParameterServerCount: to.Ptr[int32](1), + // WorkerCount: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Limits: &armmachinelearning.CommandJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeCommand), + // Timeout: to.Ptr("PT5M"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Parameters: map[string]any{ + // "string": "string", + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "8385cf05-78c0-41ef-b31d-36796a678e19": nil, + // }, + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.go index 724b0fc322..685bdd9fdc 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.go @@ -9,30 +9,118 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json func ExampleJobsClient_NewListPager_listCommandJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, + pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, JobType: to.Ptr("string"), Tag: to.Ptr("string"), ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{ + // Value: []*armmachinelearning.JobBase{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.CommandJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // Identity: &armmachinelearning.AmlToken{ + // IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), + // }, + // JobType: to.Ptr(armmachinelearning.JobTypeCommand), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.TensorFlow{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeTensorFlow), + // ParameterServerCount: to.Ptr[int32](1), + // WorkerCount: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Limits: &armmachinelearning.CommandJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeCommand), + // Timeout: to.Ptr("PT5M"), + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Parameters: map[string]any{ + // "string": "string", + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "7aad5998-6c83-4ca9-b50a-b44dfc43f420": nil, + // }, + // }, + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/CommandJob/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.go index 30fca2f8e8..0da7ab57ed 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json func ExampleJobsClient_CreateOrUpdate_createOrUpdatePipelineJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ + res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ Properties: &armmachinelearning.PipelineJob{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -58,12 +58,69 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdatePipelineJob() { JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), }, }, - Settings: map[string]interface{}{}, + Settings: map[string]any{}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.PipelineJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypePipeline), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeUpload), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Settings: map[string]any{ + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.go index 159fdbae4e..ce02c28dc6 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.go @@ -8,21 +8,78 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json func ExampleJobsClient_Get_getPipelineJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.PipelineJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypePipeline), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeUpload), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Settings: map[string]any{ + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.go index e784dcfaf1..dd61d8fa03 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.go @@ -9,30 +9,90 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json func ExampleJobsClient_NewListPager_listPipelineJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, + pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, JobType: to.Ptr("string"), Tag: to.Ptr("string"), ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{ + // Value: []*armmachinelearning.JobBase{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.PipelineJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypePipeline), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // Inputs: map[string]armmachinelearning.JobInputClassification{ + // "string": &armmachinelearning.LiteralJobInput{ + // Description: to.Ptr("string"), + // JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), + // Value: to.Ptr("string"), + // }, + // }, + // Outputs: map[string]armmachinelearning.JobOutputClassification{ + // "string": &armmachinelearning.URIFileJobOutput{ + // Mode: to.Ptr(armmachinelearning.OutputDeliveryModeUpload), + // URI: to.Ptr("string"), + // Description: to.Ptr("string"), + // JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), + // }, + // }, + // Settings: map[string]any{ + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/PipelineJob/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.go index 0017ed3054..86a744f717 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json func ExampleJobsClient_CreateOrUpdate_createOrUpdateSweepJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ + res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.JobBase{ Properties: &armmachinelearning.SweepJob{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -61,8 +61,8 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateSweepJob() { SamplingAlgorithm: &armmachinelearning.GridSamplingAlgorithm{ SamplingAlgorithmType: to.Ptr(armmachinelearning.SamplingAlgorithmTypeGrid), }, - SearchSpace: map[string]interface{}{ - "string": map[string]interface{}{}, + SearchSpace: map[string]any{ + "string": map[string]any{}, }, Trial: &armmachinelearning.TrialComponent{ CodeID: to.Ptr("string"), @@ -78,8 +78,8 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateSweepJob() { Resources: &armmachinelearning.JobResourceConfiguration{ InstanceCount: to.Ptr[int32](1), InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ + Properties: map[string]any{ + "string": map[string]any{ "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, }, }, @@ -90,6 +90,89 @@ func ExampleJobsClient_CreateOrUpdate_createOrUpdateSweepJob() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.SweepJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypeSweep), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // EarlyTermination: &armmachinelearning.MedianStoppingPolicy{ + // DelayEvaluation: to.Ptr[int32](1), + // EvaluationInterval: to.Ptr[int32](1), + // PolicyType: to.Ptr(armmachinelearning.EarlyTerminationPolicyTypeMedianStopping), + // }, + // Limits: &armmachinelearning.SweepJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeSweep), + // MaxConcurrentTrials: to.Ptr[int32](1), + // MaxTotalTrials: to.Ptr[int32](1), + // TrialTimeout: to.Ptr("PT1S"), + // }, + // Objective: &armmachinelearning.Objective{ + // Goal: to.Ptr(armmachinelearning.GoalMinimize), + // PrimaryMetric: to.Ptr("string"), + // }, + // SamplingAlgorithm: &armmachinelearning.GridSamplingAlgorithm{ + // SamplingAlgorithmType: to.Ptr(armmachinelearning.SamplingAlgorithmTypeGrid), + // }, + // SearchSpace: map[string]any{ + // "string":map[string]any{ + // }, + // }, + // Trial: &armmachinelearning.TrialComponent{ + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.Mpi{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeMpi), + // ProcessCountPerInstance: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, + // }, + // }, + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.go index bb76a49345..b12e06cfab 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.go @@ -8,21 +8,104 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json func ExampleJobsClient_Get_getSweepJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.JobBase = armmachinelearning.JobBase{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.SweepJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypeSweep), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // EarlyTermination: &armmachinelearning.MedianStoppingPolicy{ + // DelayEvaluation: to.Ptr[int32](1), + // EvaluationInterval: to.Ptr[int32](1), + // PolicyType: to.Ptr(armmachinelearning.EarlyTerminationPolicyTypeMedianStopping), + // }, + // Limits: &armmachinelearning.SweepJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeSweep), + // MaxConcurrentTrials: to.Ptr[int32](1), + // MaxTotalTrials: to.Ptr[int32](1), + // TrialTimeout: to.Ptr("PT1S"), + // }, + // Objective: &armmachinelearning.Objective{ + // Goal: to.Ptr(armmachinelearning.GoalMinimize), + // PrimaryMetric: to.Ptr("string"), + // }, + // SamplingAlgorithm: &armmachinelearning.GridSamplingAlgorithm{ + // SamplingAlgorithmType: to.Ptr(armmachinelearning.SamplingAlgorithmTypeGrid), + // }, + // SearchSpace: map[string]any{ + // "string":map[string]any{ + // }, + // }, + // Trial: &armmachinelearning.TrialComponent{ + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.Mpi{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeMpi), + // ProcessCountPerInstance: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, + // }, + // }, + // }, + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.go index 0065ad39b9..df70b865ad 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.go @@ -9,30 +9,116 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json func ExampleJobsClient_NewListPager_listSweepJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, + pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, JobType: to.Ptr("string"), Tag: to.Ptr("string"), ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{ + // Value: []*armmachinelearning.JobBase{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.SweepJob{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ComputeID: to.Ptr("string"), + // DisplayName: to.Ptr("string"), + // ExperimentName: to.Ptr("string"), + // JobType: to.Ptr(armmachinelearning.JobTypeSweep), + // Services: map[string]*armmachinelearning.JobService{ + // "string": &armmachinelearning.JobService{ + // Endpoint: to.Ptr("string"), + // ErrorMessage: to.Ptr("string"), + // JobServiceType: to.Ptr("string"), + // Port: to.Ptr[int32](1), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Status: to.Ptr("string"), + // }, + // }, + // Status: to.Ptr(armmachinelearning.JobStatusNotStarted), + // EarlyTermination: &armmachinelearning.MedianStoppingPolicy{ + // DelayEvaluation: to.Ptr[int32](1), + // EvaluationInterval: to.Ptr[int32](1), + // PolicyType: to.Ptr(armmachinelearning.EarlyTerminationPolicyTypeMedianStopping), + // }, + // Limits: &armmachinelearning.SweepJobLimits{ + // JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeSweep), + // MaxConcurrentTrials: to.Ptr[int32](1), + // MaxTotalTrials: to.Ptr[int32](1), + // TrialTimeout: to.Ptr("PT1S"), + // }, + // Objective: &armmachinelearning.Objective{ + // Goal: to.Ptr(armmachinelearning.GoalMinimize), + // PrimaryMetric: to.Ptr("string"), + // }, + // SamplingAlgorithm: &armmachinelearning.GridSamplingAlgorithm{ + // SamplingAlgorithmType: to.Ptr(armmachinelearning.SamplingAlgorithmTypeGrid), + // }, + // SearchSpace: map[string]any{ + // "string":map[string]any{ + // }, + // }, + // Trial: &armmachinelearning.TrialComponent{ + // CodeID: to.Ptr("string"), + // Command: to.Ptr("string"), + // Distribution: &armmachinelearning.Mpi{ + // DistributionType: to.Ptr(armmachinelearning.DistributionTypeMpi), + // ProcessCountPerInstance: to.Ptr[int32](1), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Resources: &armmachinelearning.JobResourceConfiguration{ + // InstanceCount: to.Ptr[int32](1), + // InstanceType: to.Ptr("string"), + // Properties: map[string]any{ + // "string": map[string]any{ + // "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, + // }, + // }, + // }, + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/SweepJob/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.go index a186ce4b6c..e3433e1308 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json func ExampleJobsClient_BeginCancel() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCancel(ctx, "test-rg", "my-aml-workspace", "string", nil) + poller, err := clientFactory.NewJobsClient().BeginCancel(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/cancel.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.go index be1ac22c24..0d62c49d2e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json func ExampleJobsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) + poller, err := clientFactory.NewJobsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Job/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.go index a559b564d7..adc435b67e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json func ExampleModelContainersClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "testrg123", "workspace123", "testContainer", armmachinelearning.ModelContainer{ + res, err := clientFactory.NewModelContainersClient().CreateOrUpdate(ctx, "testrg123", "workspace123", "testContainer", armmachinelearning.ModelContainer{ Properties: &armmachinelearning.ModelContainerProperties{ Description: to.Ptr("Model container description"), Tags: map[string]*string{ @@ -32,6 +32,27 @@ func ExampleModelContainersClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ModelContainer = armmachinelearning.ModelContainer{ + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/models"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/models/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelContainerProperties{ + // Description: to.Ptr("Model container description"), + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.go index 14fa8d4940..6782c63074 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/delete.json func ExampleModelContainersClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "testrg123", "workspace123", "testContainer", nil) + _, err = clientFactory.NewModelContainersClient().Delete(ctx, "testrg123", "workspace123", "testContainer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.go index 04e42e6ed5..d3af28385b 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.go @@ -8,21 +8,42 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json func ExampleModelContainersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "testrg123", "workspace123", "testContainer", nil) + res, err := clientFactory.NewModelContainersClient().Get(ctx, "testrg123", "workspace123", "testContainer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ModelContainer = armmachinelearning.ModelContainer{ + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/models"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/models/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelContainerProperties{ + // Description: to.Ptr("Model container description"), + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.go index 2064a9cfe2..7d5e24790b 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.go @@ -8,29 +8,53 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/list.json func ExampleModelContainersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("testrg123", "workspace123", &armmachinelearning.ModelContainersClientListOptions{Skip: nil, + pager := clientFactory.NewModelContainersClient().NewListPager("testrg123", "workspace123", &armmachinelearning.ModelContainersClientListOptions{Skip: nil, Count: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ModelContainerResourceArmPaginatedResult = armmachinelearning.ModelContainerResourceArmPaginatedResult{ + // Value: []*armmachinelearning.ModelContainer{ + // { + // Name: to.Ptr("testContainer"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/models"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/models/testContainer"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // CreatedBy: to.Ptr("John Smith"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()), + // LastModifiedBy: to.Ptr("John Smith"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelContainerProperties{ + // Description: to.Ptr("Model container description"), + // Tags: map[string]*string{ + // "tag1": to.Ptr("value1"), + // "tag2": to.Ptr("value2"), + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelContainer/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.go index defc928743..3f2b5a16f9 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json func ExampleModelVersionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ModelVersion{ + res, err := clientFactory.NewModelVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ModelVersion{ Properties: &armmachinelearning.ModelVersionProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -44,6 +44,39 @@ func ExampleModelVersionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ModelVersion = armmachinelearning.ModelVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Flavors: map[string]*armmachinelearning.FlavorData{ + // "string": &armmachinelearning.FlavorData{ + // Data: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // }, + // ModelType: to.Ptr("CustomModel"), + // ModelURI: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.go index 1780baebe6..a43f3e43b8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/delete.json func ExampleModelVersionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + _, err = clientFactory.NewModelVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.go index 4d9d021dec..295a5de5f4 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.go @@ -8,21 +8,54 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json func ExampleModelVersionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) + res, err := clientFactory.NewModelVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ModelVersion = armmachinelearning.ModelVersion{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Flavors: map[string]*armmachinelearning.FlavorData{ + // "string": &armmachinelearning.FlavorData{ + // Data: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // }, + // ModelType: to.Ptr("CustomModel"), + // ModelURI: to.Ptr("string"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.go index ba55ed6928..a3a3e84521 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/list.json func ExampleModelVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ModelVersionsClientListOptions{Skip: nil, + pager := clientFactory.NewModelVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ModelVersionsClientListOptions{Skip: nil, OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Version: to.Ptr("string"), @@ -32,13 +32,49 @@ func ExampleModelVersionsClient_NewListPager() { ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ModelVersionResourceArmPaginatedResult = armmachinelearning.ModelVersionResourceArmPaginatedResult{ + // Value: []*armmachinelearning.ModelVersion{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Properties: &armmachinelearning.ModelVersionProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // IsAnonymous: to.Ptr(false), + // Flavors: map[string]*armmachinelearning.FlavorData{ + // "string": &armmachinelearning.FlavorData{ + // Data: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // }, + // }, + // ModelType: to.Ptr("CustomModel"), + // ModelURI: to.Ptr("string"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/ModelVersion/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.go index 41fff60e51..49620bedae 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.go @@ -8,21 +8,24 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json func ExampleWorkspacesClient_ListNotebookKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListNotebookKeys(ctx, "testrg123", "workspaces123", nil) + res, err := clientFactory.NewWorkspacesClient().ListNotebookKeys(ctx, "testrg123", "workspaces123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ListNotebookKeysResult = armmachinelearning.ListNotebookKeysResult{ + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/listKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.go index 53c3153ad5..9f15383554 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json func ExampleWorkspacesClient_BeginPrepareNotebook() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginPrepareNotebook(ctx, "testrg123", "workspaces123", nil) + poller, err := clientFactory.NewWorkspacesClient().BeginPrepareNotebook(ctx, "testrg123", "workspaces123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -27,6 +27,15 @@ func ExampleWorkspacesClient_BeginPrepareNotebook() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.NotebookResourceInfo = armmachinelearning.NotebookResourceInfo{ + // Fqdn: to.Ptr("testnotebook.notebooks.azure.com"), + // NotebookPreparationError: &armmachinelearning.NotebookPreparationError{ + // ErrorMessage: to.Ptr("general error"), + // StatusCode: to.Ptr[int32](500), + // }, + // ResourceID: to.Ptr("aabbccddee112233445566778899"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Notebook/prepare.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.go index bae51743ee..4690434782 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateKubernetesOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.OnlineDeployment{ + poller, err := clientFactory.NewOnlineDeploymentsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.OnlineDeployment{ Location: to.Ptr("string"), Tags: map[string]*string{}, Identity: &armmachinelearning.ManagedServiceIdentity{ @@ -91,6 +91,89 @@ func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateKubernetes if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.KubernetesOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeKubernetes), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // ContainerResourceRequirements: &armmachinelearning.ContainerResourceRequirements{ + // ContainerResourceLimits: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // ContainerResourceRequests: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.go index f2a6bf3bf5..2a3112148f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.go @@ -8,21 +8,104 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json func ExampleOnlineDeploymentsClient_Get_getKubernetesOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) + res, err := clientFactory.NewOnlineDeploymentsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.KubernetesOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeKubernetes), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // ContainerResourceRequirements: &armmachinelearning.ContainerResourceRequirements{ + // ContainerResourceLimits: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // ContainerResourceRequests: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.go index 2033d446a8..011d3ee83e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.go @@ -9,28 +9,45 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json func ExampleOnlineDeploymentsClient_NewListSKUsPager_listKubernetesOnlineDeploymentSkus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), + pager := clientFactory.NewOnlineDeploymentsClient().NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.SKUResourceArmPaginatedResult = armmachinelearning.SKUResourceArmPaginatedResult{ + // Value: []*armmachinelearning.SKUResource{ + // { + // Capacity: &armmachinelearning.SKUCapacity{ + // Default: to.Ptr[int32](1), + // Maximum: to.Ptr[int32](1), + // Minimum: to.Ptr[int32](1), + // ScaleType: to.Ptr(armmachinelearning.SKUScaleTypeAutomatic), + // }, + // ResourceType: to.Ptr("Microsoft.MachineLearning.Services/endpoints/deployments"), + // SKU: &armmachinelearning.SKUSetting{ + // Name: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.go index 11a92936c8..f5ac57f9be 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json func ExampleOnlineDeploymentsClient_BeginUpdate_updateKubernetesOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialMinimalTrackedResourceWithSKU{ + poller, err := clientFactory.NewOnlineDeploymentsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialMinimalTrackedResourceWithSKU{ Tags: map[string]*string{}, SKU: &armmachinelearning.PartialSKU{ Name: to.Ptr("string"), @@ -37,6 +37,89 @@ func ExampleOnlineDeploymentsClient_BeginUpdate_updateKubernetesOnlineDeployment if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.KubernetesOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeKubernetes), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // ContainerResourceRequirements: &armmachinelearning.ContainerResourceRequirements{ + // ContainerResourceLimits: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // ContainerResourceRequests: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/KubernetesOnlineDeployment/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.go index 9dfcc8ef81..be3cf0ca2d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateManagedOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.OnlineDeployment{ + poller, err := clientFactory.NewOnlineDeploymentsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.OnlineDeployment{ Location: to.Ptr("string"), Tags: map[string]*string{}, Identity: &armmachinelearning.ManagedServiceIdentity{ @@ -86,6 +86,84 @@ func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateManagedOnl if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.ManagedOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeManaged), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // ReadinessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](30), + // InitialDelay: to.Ptr("PT1S"), + // Period: to.Ptr("PT10S"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT2S"), + // }, + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.go index 63536091e4..dff3aef4d1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.go @@ -8,21 +8,99 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json func ExampleOnlineDeploymentsClient_Get_getManagedOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) + res, err := clientFactory.NewOnlineDeploymentsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.ManagedOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeManaged), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // ReadinessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](30), + // InitialDelay: to.Ptr("PT1S"), + // Period: to.Ptr("PT10S"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT2S"), + // }, + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.go index 6f2e28ae8f..c239cbb9b1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.go @@ -9,28 +9,45 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json func ExampleOnlineDeploymentsClient_NewListSKUsPager_listManagedOnlineDeploymentSkus() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), + pager := clientFactory.NewOnlineDeploymentsClient().NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.SKUResourceArmPaginatedResult = armmachinelearning.SKUResourceArmPaginatedResult{ + // Value: []*armmachinelearning.SKUResource{ + // { + // Capacity: &armmachinelearning.SKUCapacity{ + // Default: to.Ptr[int32](1), + // Maximum: to.Ptr[int32](1), + // Minimum: to.Ptr[int32](1), + // ScaleType: to.Ptr(armmachinelearning.SKUScaleTypeAutomatic), + // }, + // ResourceType: to.Ptr("Microsoft.MachineLearning.Services/endpoints/deployments"), + // SKU: &armmachinelearning.SKUSetting{ + // Name: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/listSkus.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.go index 86d00a1120..76f9a69310 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json func ExampleOnlineDeploymentsClient_BeginUpdate_updateManagedOnlineDeployment() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialMinimalTrackedResourceWithSKU{ + poller, err := clientFactory.NewOnlineDeploymentsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialMinimalTrackedResourceWithSKU{ Tags: map[string]*string{}, SKU: &armmachinelearning.PartialSKU{ Name: to.Ptr("string"), @@ -37,6 +37,84 @@ func ExampleOnlineDeploymentsClient_BeginUpdate_updateManagedOnlineDeployment() if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineDeployment = armmachinelearning.OnlineDeployment{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.ManagedOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeManaged), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // ReadinessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](30), + // InitialDelay: to.Ptr("PT1S"), + // Period: to.Ptr("PT10S"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT2S"), + // }, + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/ManagedOnlineDeployment/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.go index 9825b5597a..d74eb42546 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/delete.json func ExampleOnlineDeploymentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "testrg123", "workspace123", "testEndpoint", "testDeployment", nil) + poller, err := clientFactory.NewOnlineDeploymentsClient().BeginDelete(ctx, "testrg123", "workspace123", "testEndpoint", "testDeployment", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.go index b3a48c7217..f3b01fafe9 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.go @@ -9,24 +9,28 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json func ExampleOnlineDeploymentsClient_GetLogs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.GetLogs(ctx, "testrg123", "workspace123", "testEndpoint", "testDeployment", armmachinelearning.DeploymentLogsRequest{ + res, err := clientFactory.NewOnlineDeploymentsClient().GetLogs(ctx, "testrg123", "workspace123", "testEndpoint", "testDeployment", armmachinelearning.DeploymentLogsRequest{ ContainerType: to.Ptr(armmachinelearning.ContainerTypeStorageInitializer), Tail: to.Ptr[int32](0), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.DeploymentLogs = armmachinelearning.DeploymentLogs{ + // Content: to.Ptr("string"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/getLogs.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.go index 356de59812..1ae3d929f8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.go @@ -9,29 +9,115 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json func ExampleOnlineDeploymentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.OnlineDeploymentsClientListOptions{OrderBy: to.Ptr("string"), + pager := clientFactory.NewOnlineDeploymentsClient().NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.OnlineDeploymentsClientListOptions{OrderBy: to.Ptr("string"), Top: to.Ptr[int32](1), Skip: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.OnlineDeploymentTrackedResourceArmPaginatedResult = armmachinelearning.OnlineDeploymentTrackedResourceArmPaginatedResult{ + // Value: []*armmachinelearning.OnlineDeployment{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.KubernetesOnlineDeployment{ + // Description: to.Ptr("string"), + // CodeConfiguration: &armmachinelearning.CodeConfiguration{ + // CodeID: to.Ptr("string"), + // ScoringScript: to.Ptr("string"), + // }, + // EnvironmentID: to.Ptr("string"), + // EnvironmentVariables: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // AppInsightsEnabled: to.Ptr(false), + // EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeKubernetes), + // InstanceType: to.Ptr("string"), + // LivenessProbe: &armmachinelearning.ProbeSettings{ + // FailureThreshold: to.Ptr[int32](1), + // InitialDelay: to.Ptr("PT5M"), + // Period: to.Ptr("PT5M"), + // SuccessThreshold: to.Ptr[int32](1), + // Timeout: to.Ptr("PT5M"), + // }, + // Model: to.Ptr("string"), + // ModelMountPath: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded), + // RequestSettings: &armmachinelearning.OnlineRequestSettings{ + // MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), + // MaxQueueWait: to.Ptr("PT5M"), + // RequestTimeout: to.Ptr("PT5M"), + // }, + // ScaleSettings: &armmachinelearning.DefaultScaleSettings{ + // ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), + // }, + // ContainerResourceRequirements: &armmachinelearning.ContainerResourceRequirements{ + // ContainerResourceLimits: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // ContainerResourceRequests: &armmachinelearning.ContainerResourceSettings{ + // CPU: to.Ptr("\"1\""), + // Gpu: to.Ptr("\"1\""), + // Memory: to.Ptr("\"2Gi\""), + // }, + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineDeployment/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.go index bdf8a5e82f..c6306bdfcd 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json func ExampleOnlineEndpointsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.OnlineEndpoint{ + poller, err := clientFactory.NewOnlineEndpointsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.OnlineEndpoint{ Location: to.Ptr("string"), Tags: map[string]*string{}, Identity: &armmachinelearning.ManagedServiceIdentity{ @@ -56,6 +56,56 @@ func ExampleOnlineEndpointsClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineEndpoint = armmachinelearning.OnlineEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.OnlineEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Compute: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // Traffic: map[string]*int32{ + // "string": to.Ptr[int32](1), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.go index da64d151b6..2fbe8ec3b1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/delete.json func ExampleOnlineEndpointsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + poller, err := clientFactory.NewOnlineEndpointsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.go index a830f8e595..e8afda5ce0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.go @@ -8,21 +8,71 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json func ExampleOnlineEndpointsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + res, err := clientFactory.NewOnlineEndpointsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.OnlineEndpoint = armmachinelearning.OnlineEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.OnlineEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Compute: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // Traffic: map[string]*int32{ + // "string": to.Ptr[int32](1), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.go index f550081e84..57c5d0dd41 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.go @@ -8,21 +8,28 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/getToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/getToken.json func ExampleOnlineEndpointsClient_GetToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.GetToken(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + res, err := clientFactory.NewOnlineEndpointsClient().GetToken(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EndpointAuthToken = armmachinelearning.EndpointAuthToken{ + // AccessToken: to.Ptr("string"), + // ExpiryTimeUTC: to.Ptr[int64](1), + // RefreshAfterTimeUTC: to.Ptr[int64](1), + // TokenType: to.Ptr("string"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/getToken.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.go index e94aa8ecb2..ada3b148a8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/list.json func ExampleOnlineEndpointsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.OnlineEndpointsClientListOptions{Name: to.Ptr("string"), + pager := clientFactory.NewOnlineEndpointsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.OnlineEndpointsClientListOptions{Name: to.Ptr("string"), Count: to.Ptr[int32](1), ComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeManaged), Skip: nil, @@ -29,13 +29,66 @@ func ExampleOnlineEndpointsClient_NewListPager() { OrderBy: to.Ptr(armmachinelearning.OrderStringCreatedAtDesc), }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.OnlineEndpointTrackedResourceArmPaginatedResult = armmachinelearning.OnlineEndpointTrackedResourceArmPaginatedResult{ + // Value: []*armmachinelearning.OnlineEndpoint{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.OnlineEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Compute: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // Traffic: map[string]*int32{ + // "string": to.Ptr[int32](1), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.go index 45406cd3b2..701be36d55 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.go @@ -8,21 +8,26 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/listKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/listKeys.json func ExampleOnlineEndpointsClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) + res, err := clientFactory.NewOnlineEndpointsClient().ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.EndpointAuthKeys = armmachinelearning.EndpointAuthKeys{ + // PrimaryKey: to.Ptr("string"), + // SecondaryKey: to.Ptr("string"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/listKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.go index fe991f5aa0..dd41cade6e 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/regenerateKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/regenerateKeys.json func ExampleOnlineEndpointsClient_BeginRegenerateKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginRegenerateKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.RegenerateEndpointKeysRequest{ + poller, err := clientFactory.NewOnlineEndpointsClient().BeginRegenerateKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.RegenerateEndpointKeysRequest{ KeyType: to.Ptr(armmachinelearning.KeyTypePrimary), KeyValue: to.Ptr("string"), }, nil) diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/regenerateKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.go index da3667e7d6..2c551988d0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.go @@ -9,23 +9,23 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/update.json func ExampleOnlineEndpointsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ + poller, err := clientFactory.NewOnlineEndpointsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ Tags: map[string]*string{}, Identity: &armmachinelearning.PartialManagedServiceIdentity{ Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]interface{}{ - "string": map[string]interface{}{}, + UserAssignedIdentities: map[string]any{ + "string": map[string]any{}, }, }, }, nil) @@ -36,6 +36,56 @@ func ExampleOnlineEndpointsClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.OnlineEndpoint = armmachinelearning.OnlineEndpoint{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), + // }, + // Location: to.Ptr("string"), + // Tags: map[string]*string{ + // }, + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "string": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Kind: to.Ptr("string"), + // Properties: &armmachinelearning.OnlineEndpointProperties{ + // Description: to.Ptr("string"), + // AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // ScoringURI: to.Ptr("https://www.contoso.com/example"), + // SwaggerURI: to.Ptr("https://www.contoso.com/example"), + // Compute: to.Ptr("string"), + // ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded), + // Traffic: map[string]*int32{ + // "string": to.Ptr[int32](1), + // }, + // }, + // SKU: &armmachinelearning.SKU{ + // Name: to.Ptr("string"), + // Capacity: to.Ptr[int32](1), + // Family: to.Ptr("string"), + // Size: to.Ptr("string"), + // Tier: to.Ptr(armmachinelearning.SKUTierFree), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/OnlineEndpoint/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.go index d6157e36b4..91843989a1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.CreateOrUpdate(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", armmachinelearning.PrivateEndpointConnection{ + res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", armmachinelearning.PrivateEndpointConnection{ Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ Description: to.Ptr("Auto-Approved"), @@ -31,6 +31,23 @@ func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // You could use response here. We use blank identifier for just demo purposes. _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.PrivateEndpointConnection = armmachinelearning.PrivateEndpointConnection{ + // Name: to.Ptr("{privateEndpointConnectionName}"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateEndpointConnections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}"), + // Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ + // PrivateEndpoint: &armmachinelearning.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01"), + // }, + // PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Auto-Approved"), + // ActionsRequired: to.Ptr("None"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.PrivateEndpointConnectionProvisioningStateSucceeded), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.go index a22a7cd0b7..cd15bd94cd 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json func ExamplePrivateEndpointConnectionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", nil) + _, err = clientFactory.NewPrivateEndpointConnectionsClient().Delete(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.go index 4e8cbab3ac..b47d0f94f5 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.go @@ -8,21 +8,38 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", nil) + res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // You could use response here. We use blank identifier for just demo purposes. _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.PrivateEndpointConnection = armmachinelearning.PrivateEndpointConnection{ + // Name: to.Ptr("{privateEndpointConnectionName}"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateEndpointConnections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}"), + // Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ + // PrivateEndpoint: &armmachinelearning.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01"), + // }, + // PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Auto-Approved"), + // ActionsRequired: to.Ptr("None"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.PrivateEndpointConnectionProvisioningStateSucceeded), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.go index 51b5388710..78c6081ff3 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.go @@ -8,26 +8,62 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json func ExamplePrivateEndpointConnectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("rg-1234", "testworkspace", nil) + pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("rg-1234", "testworkspace", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.PrivateEndpointConnectionListResult = armmachinelearning.PrivateEndpointConnectionListResult{ + // Value: []*armmachinelearning.PrivateEndpointConnection{ + // { + // Name: to.Ptr("{privateEndpointConnectionName}"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateEndpointConnections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}"), + // Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ + // PrivateEndpoint: &armmachinelearning.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01"), + // }, + // PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Auto-Approved"), + // ActionsRequired: to.Ptr("None"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.PrivateEndpointConnectionProvisioningStateSucceeded), + // }, + // }, + // { + // Name: to.Ptr("{privateEndpointConnectionName}"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateEndpointConnections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}"), + // Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ + // PrivateEndpoint: &armmachinelearning.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01"), + // }, + // PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Auto-Approved"), + // ActionsRequired: to.Ptr("None"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.PrivateEndpointConnectionProvisioningStateSucceeded), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateEndpointConnection/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.go index 088556d2d6..cd78231bdb 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.go @@ -8,21 +8,35 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json func ExamplePrivateLinkResourcesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.List(ctx, "rg-1234", "testworkspace", nil) + res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "rg-1234", "testworkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // You could use response here. We use blank identifier for just demo purposes. _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.PrivateLinkResourceListResult = armmachinelearning.PrivateLinkResourceListResult{ + // Value: []*armmachinelearning.PrivateLinkResource{ + // { + // Name: to.Ptr("amlworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateLinkResources"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateLinkResources/amlworkspace"), + // Properties: &armmachinelearning.PrivateLinkResourceProperties{ + // GroupID: to.Ptr("amlworkspace"), + // RequiredMembers: []*string{ + // to.Ptr("default")}, + // }, + // }}, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/PrivateLinkResource/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.go index ae33b166c4..373439ec72 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.go @@ -8,26 +8,430 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json func ExampleQuotasClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewQuotasClient("00000000-0000-0000-0000-000000000000", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("eastus", nil) + pager := clientFactory.NewQuotasClient().NewListPager("eastus", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ListWorkspaceQuotas = armmachinelearning.ListWorkspaceQuotas{ + // Value: []*armmachinelearning.ResourceQuota{ + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_D_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](48), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_D_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](12), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_D_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](12), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_D_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quota"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](12), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](12), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_Dv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_Dv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_Dv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_Dv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_FSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_FSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_FSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_FSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](12), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_NCv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_NCv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_NCv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_NCv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_NCv3_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_NCv3_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_NCv3_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_NCv3_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_ND_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_ND_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_ND_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_ND_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_NDv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_NDv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_NDv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_NDv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/quotas/Standard_NV_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_NV_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_NV_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Name: &armmachinelearning.ResourceName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace3/quotas/Standard_NV_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.go index 8ae619c4e9..422b82433b 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json func ExampleQuotasClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewQuotasClient("00000000-0000-0000-0000-000000000000", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Update(ctx, "eastus", armmachinelearning.QuotaUpdateParameters{ + res, err := clientFactory.NewQuotasClient().Update(ctx, "eastus", armmachinelearning.QuotaUpdateParameters{ Value: []*armmachinelearning.QuotaBaseProperties{ { Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), @@ -38,6 +38,24 @@ func ExampleQuotasClient_Update() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.UpdateWorkspaceQuotasResult = armmachinelearning.UpdateWorkspaceQuotasResult{ + // Value: []*armmachinelearning.UpdateWorkspaceQuotas{ + // { + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](100), + // Status: to.Ptr(armmachinelearning.StatusSuccess), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }, + // { + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](200), + // Status: to.Ptr(armmachinelearning.StatusSuccess), + // Unit: to.Ptr(armmachinelearning.QuotaUnitCount), + // }}, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Quota/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.go index de27e848ad..f188948fb7 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json func ExampleSchedulesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Schedule{ + poller, err := clientFactory.NewSchedulesClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.Schedule{ Properties: &armmachinelearning.ScheduleProperties{ Description: to.Ptr("string"), Properties: map[string]*string{ @@ -31,7 +31,7 @@ func ExampleSchedulesClient_BeginCreateOrUpdate() { }, Action: &armmachinelearning.EndpointScheduleAction{ ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), - EndpointInvocationDefinition: map[string]interface{}{ + EndpointInvocationDefinition: map[string]any{ "9965593e-526f-4b89-bb36-761138cf2794": nil, }, }, @@ -53,6 +53,45 @@ func ExampleSchedulesClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.Schedule = armmachinelearning.Schedule{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), + // }, + // Properties: &armmachinelearning.ScheduleProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Action: &armmachinelearning.EndpointScheduleAction{ + // ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), + // EndpointInvocationDefinition: map[string]any{ + // "d77a9a9a-4bb5-4c0c-8a77-459be8b82b9f": nil, + // }, + // }, + // DisplayName: to.Ptr("string"), + // IsEnabled: to.Ptr(false), + // ProvisioningState: to.Ptr(armmachinelearning.ScheduleProvisioningStatusSucceeded), + // Trigger: &armmachinelearning.CronTrigger{ + // EndTime: to.Ptr("string"), + // StartTime: to.Ptr("string"), + // TimeZone: to.Ptr("string"), + // TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), + // Expression: to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/createOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.go index 7c048edda9..650f06b340 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json func ExampleSchedulesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) + poller, err := clientFactory.NewSchedulesClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.go index f131d2da1e..ecc11ac0a1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.go @@ -8,21 +8,60 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json func ExampleSchedulesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil) + res, err := clientFactory.NewSchedulesClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Schedule = armmachinelearning.Schedule{ + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), + // }, + // Properties: &armmachinelearning.ScheduleProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Action: &armmachinelearning.EndpointScheduleAction{ + // ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), + // EndpointInvocationDefinition: map[string]any{ + // "a108545b-def1-4c86-8e53-dbcb1de3a8bc": nil, + // }, + // }, + // DisplayName: to.Ptr("string"), + // IsEnabled: to.Ptr(false), + // ProvisioningState: to.Ptr(armmachinelearning.ScheduleProvisioningStatusSucceeded), + // Trigger: &armmachinelearning.CronTrigger{ + // EndTime: to.Ptr("string"), + // StartTime: to.Ptr("string"), + // TimeZone: to.Ptr("string"), + // TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), + // Expression: to.Ptr("string"), + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.go index b27ca0d1cb..c3b44d50a4 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.go @@ -8,28 +8,70 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json func ExampleSchedulesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.SchedulesClientListOptions{Skip: nil, + pager := clientFactory.NewSchedulesClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.SchedulesClientListOptions{Skip: nil, ListViewType: nil, }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ScheduleResourceArmPaginatedResult = armmachinelearning.ScheduleResourceArmPaginatedResult{ + // Value: []*armmachinelearning.Schedule{ + // { + // Name: to.Ptr("string"), + // Type: to.Ptr("string"), + // ID: to.Ptr("string"), + // SystemData: &armmachinelearning.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // CreatedBy: to.Ptr("string"), + // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), + // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()), + // LastModifiedBy: to.Ptr("string"), + // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), + // }, + // Properties: &armmachinelearning.ScheduleProperties{ + // Description: to.Ptr("string"), + // Properties: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Tags: map[string]*string{ + // "string": to.Ptr("string"), + // }, + // Action: &armmachinelearning.EndpointScheduleAction{ + // ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), + // EndpointInvocationDefinition: map[string]any{ + // "00cd1396-a094-4d48-8d86-14c43a55a6af": nil, + // }, + // }, + // DisplayName: to.Ptr("string"), + // IsEnabled: to.Ptr(false), + // ProvisioningState: to.Ptr(armmachinelearning.ScheduleProvisioningStatusSucceeded), + // Trigger: &armmachinelearning.CronTrigger{ + // EndTime: to.Ptr("string"), + // StartTime: to.Ptr("string"), + // TimeZone: to.Ptr("string"), + // TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), + // Expression: to.Ptr("string"), + // }, + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Schedule/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.go index 83baa5f85b..9c5a0a7b68 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.go @@ -8,26 +8,415 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json func ExampleUsagesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewUsagesClient("00000000-0000-0000-0000-000000000000", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("eastus", nil) + pager := clientFactory.NewUsagesClient().NewListPager("eastus", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ListUsagesResult = armmachinelearning.ListUsagesResult{ + // Value: []*armmachinelearning.Usage{ + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Clusters"), + // Value: to.Ptr("Clusters"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/totalCores/usages"), + // CurrentValue: to.Ptr[int64](7), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages"), + // Limit: to.Ptr[int64](100), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Total Cluster Dedicated Regional vCPUs"), + // Value: to.Ptr("Total Cluster Dedicated Regional vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/dedicatedCores/usages"), + // CurrentValue: to.Ptr[int64](14), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard D Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_D_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](48), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](2), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/usages"), + // CurrentValue: to.Ptr[int64](2), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/usages/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes/usages"), + // CurrentValue: to.Ptr[int64](2), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/computes/demo_cluster1_dsv2/usages/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/computes/demo_cluster2_dsv2/usages/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_Dv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_FSv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](12), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/usages/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/computes/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/computes/demo_cluster1_nc/usages/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/usages/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/computes/demo_cluser1_nc/usages/Standard_NC_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NCv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NCv3_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_ND_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NDv2_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](0), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster Dedicated vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NV_Family_Cluster_Dedicated_vCPUs"), + // Limit: to.Ptr[int64](24), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Total Cluster LowPriority Regional vCPUs"), + // Value: to.Ptr("Total Cluster LowPriority Regional vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/lowPriorityCores/usages"), + // CurrentValue: to.Ptr[int64](18), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages"), + // Limit: to.Ptr[int64](50), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard D Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard D Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_D_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard DSv2 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard DSv2 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_DSv2_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard Dv2 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard Dv2 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_Dv2_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard FSv2 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard FSv2 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_FSv2_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](18), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/computes/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/computes/demo_cluster1_lowPriority_nc/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/usages"), + // CurrentValue: to.Ptr[int64](12), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/computes/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/computes/demo_cluster2_lowPriority_nc/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NC Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/workspace/computes/usages"), + // CurrentValue: to.Ptr[int64](6), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/computes/demo_cluster3_lowPriority_nc/usages/Standard_NC_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NCv2 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NCv2 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NCv2_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NCv3 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NCv3 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NCv3_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard ND Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard ND Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_ND_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NDv2 Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NDv2 Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NDv2_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }, + // { + // Name: &armmachinelearning.UsageName{ + // LocalizedValue: to.Ptr("Standard NV Family Cluster LowPriority vCPUs"), + // Value: to.Ptr("Standard NV Family Cluster LowPriority vCPUs"), + // }, + // Type: to.Ptr("Microsoft.MachineLearningServices/vmFamily/usages"), + // CurrentValue: to.Ptr[int64](0), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/usages/Standard_NV_Family_Cluster_LowPriority_vCPUs"), + // Limit: to.Ptr[int64](-1), + // Unit: to.Ptr(armmachinelearning.UsageUnitCount), + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Usage/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.go index 9ed8fbe248..02a238be6d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.go @@ -8,21 +8,380 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json func ExampleVirtualMachineSizesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewVirtualMachineSizesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.List(ctx, "eastus", nil) + res, err := clientFactory.NewVirtualMachineSizesClient().List(ctx, "eastus", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.VirtualMachineSizeListResult = armmachinelearning.VirtualMachineSizeListResult{ + // Value: []*armmachinelearning.VirtualMachineSize{ + // { + // Name: to.Ptr("Standard_DS1_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.13), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.01), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.07), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.05), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](7168), + // MemoryGB: to.Ptr[float64](3.5), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance")}, + // VCPUs: to.Ptr[int32](1), + // }, + // { + // Name: to.Ptr("Standard_DS2_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.03), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.15), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.1), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.25), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](14336), + // MemoryGB: to.Ptr[float64](7), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance"), + // to.Ptr("MIR")}, + // VCPUs: to.Ptr[int32](2), + // }, + // { + // Name: to.Ptr("Standard_DS3_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.2), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.06), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.5), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.29), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](28672), + // MemoryGB: to.Ptr[float64](14), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance"), + // to.Ptr("MIR")}, + // VCPUs: to.Ptr[int32](4), + // }, + // { + // Name: to.Ptr("Standard_DS4_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.12), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.4), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](1.01), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.58), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](57344), + // MemoryGB: to.Ptr[float64](28), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance"), + // to.Ptr("MIR")}, + // VCPUs: to.Ptr[int32](8), + // }, + // { + // Name: to.Ptr("Standard_DS5_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](1.17), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.81), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](2.02), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.23), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](114688), + // MemoryGB: to.Ptr[float64](56), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance"), + // to.Ptr("MIR")}, + // VCPUs: to.Ptr[int32](16), + // }, + // { + // Name: to.Ptr("Standard_DS11_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.26), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.18), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.11), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.04), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](28672), + // MemoryGB: to.Ptr[float64](14), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance")}, + // VCPUs: to.Ptr[int32](2), + // }, + // { + // Name: to.Ptr("Standard_DS12_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.37), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.53), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.21), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.07), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](57344), + // MemoryGB: to.Ptr[float64](28), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance")}, + // VCPUs: to.Ptr[int32](4), + // }, + // { + // Name: to.Ptr("Standard_DS13_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.15), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.42), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.74), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](1.06), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](114688), + // MemoryGB: to.Ptr[float64](56), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance")}, + // VCPUs: to.Ptr[int32](8), + // }, + // { + // Name: to.Ptr("Standard_DS14_v2"), + // EstimatedVMPrices: &armmachinelearning.EstimatedVMPrices{ + // BillingCurrency: to.Ptr(armmachinelearning.BillingCurrencyUSD), + // UnitOfMeasure: to.Ptr(armmachinelearning.UnitOfMeasureOneHour), + // Values: []*armmachinelearning.EstimatedVMPrice{ + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](0.3), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeLinux), + // RetailPrice: to.Ptr[float64](1.48), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](0.84), + // VMTier: to.Ptr(armmachinelearning.VMTierLowPriority), + // }, + // { + // OSType: to.Ptr(armmachinelearning.VMPriceOSTypeWindows), + // RetailPrice: to.Ptr[float64](2.11), + // VMTier: to.Ptr(armmachinelearning.VMTierStandard), + // }}, + // }, + // Family: to.Ptr("standardDSv2Family"), + // Gpus: to.Ptr[int32](0), + // LowPriorityCapable: to.Ptr(true), + // MaxResourceVolumeMB: to.Ptr[int32](229376), + // MemoryGB: to.Ptr[float64](112), + // OSVhdSizeMB: to.Ptr[int32](1047552), + // PremiumIO: to.Ptr(true), + // SupportedComputeTypes: []*string{ + // to.Ptr("AmlCompute"), + // to.Ptr("ComputeInstance")}, + // VCPUs: to.Ptr[int32](16), + // }}, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/VirtualMachineSize/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.go index caa997bd0c..c4857416bb 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json func ExampleWorkspacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginCreateOrUpdate(ctx, "workspace-1234", "testworkspace", armmachinelearning.Workspace{ + poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "workspace-1234", "testworkspace", armmachinelearning.Workspace{ Identity: &armmachinelearning.ManagedServiceIdentity{ Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssignedUserAssigned), UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ @@ -66,6 +66,57 @@ func ExampleWorkspacesClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.Workspace = armmachinelearning.Workspace{ + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssignedUserAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // AllowPublicAccessWhenBehindVnet: to.Ptr(false), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), + // DiscoveryURL: to.Ptr("http://example.com"), + // Encryption: &armmachinelearning.EncryptionProperty{ + // Identity: &armmachinelearning.IdentityForCmk{ + // UserAssignedIdentity: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai"), + // }, + // KeyVaultProperties: &armmachinelearning.EncryptionKeyVaultProperties{ + // IdentityClientID: to.Ptr(""), + // KeyIdentifier: to.Ptr("https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb"), + // KeyVaultArmID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // }, + // Status: to.Ptr(armmachinelearning.EncryptionStatusEnabled), + // }, + // FriendlyName: to.Ptr("HelloName"), + // HbiWorkspace: to.Ptr(false), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // PublicNetworkAccess: to.Ptr(armmachinelearning.PublicNetworkAccessDisabled), + // SharedPrivateLinkResources: []*armmachinelearning.SharedPrivateLinkResource{ + // { + // Name: to.Ptr("testdbresource"), + // Properties: &armmachinelearning.SharedPrivateLinkResourceProperty{ + // GroupID: to.Ptr("Sql"), + // PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql"), + // RequestMessage: to.Ptr("Please approve"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // }}, + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/create.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.go index cdb8522039..a5ac94b8fd 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json func ExampleWorkspacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDelete(ctx, "workspace-1234", "testworkspace", nil) + poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "workspace-1234", "testworkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.go index 856023071f..08f42f7f31 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.go @@ -8,28 +8,28 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json func ExampleWorkspacesClient_BeginDiagnose() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginDiagnose(ctx, "workspace-1234", "testworkspace", &armmachinelearning.WorkspacesClientBeginDiagnoseOptions{Parameters: &armmachinelearning.DiagnoseWorkspaceParameters{ + poller, err := clientFactory.NewWorkspacesClient().BeginDiagnose(ctx, "workspace-1234", "testworkspace", &armmachinelearning.WorkspacesClientBeginDiagnoseOptions{Parameters: &armmachinelearning.DiagnoseWorkspaceParameters{ Value: &armmachinelearning.DiagnoseRequestProperties{ - ApplicationInsights: map[string]interface{}{}, - ContainerRegistry: map[string]interface{}{}, - DNSResolution: map[string]interface{}{}, - KeyVault: map[string]interface{}{}, - Nsg: map[string]interface{}{}, - Others: map[string]interface{}{}, - ResourceLock: map[string]interface{}{}, - StorageAccount: map[string]interface{}{}, - Udr: map[string]interface{}{}, + ApplicationInsights: map[string]any{}, + ContainerRegistry: map[string]any{}, + DNSResolution: map[string]any{}, + KeyVault: map[string]any{}, + Nsg: map[string]any{}, + Others: map[string]any{}, + ResourceLock: map[string]any{}, + StorageAccount: map[string]any{}, + Udr: map[string]any{}, }, }, }) @@ -40,6 +40,33 @@ func ExampleWorkspacesClient_BeginDiagnose() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.DiagnoseResponseResult = armmachinelearning.DiagnoseResponseResult{ + // Value: &armmachinelearning.DiagnoseResponseResultValue{ + // ApplicationInsightsResults: []*armmachinelearning.DiagnoseResult{ + // }, + // ContainerRegistryResults: []*armmachinelearning.DiagnoseResult{ + // }, + // DNSResolutionResults: []*armmachinelearning.DiagnoseResult{ + // { + // Code: to.Ptr("CustomDNSInUse"), + // Level: to.Ptr(armmachinelearning.DiagnoseResultLevelWarning), + // Message: to.Ptr("We have detected an on-premise dns server is configured. Please make sure conditional forwarding is configured correctly according to doc https://foo"), + // }}, + // KeyVaultResults: []*armmachinelearning.DiagnoseResult{ + // }, + // NetworkSecurityRuleResults: []*armmachinelearning.DiagnoseResult{ + // }, + // OtherResults: []*armmachinelearning.DiagnoseResult{ + // }, + // ResourceLockResults: []*armmachinelearning.DiagnoseResult{ + // }, + // StorageAccountResults: []*armmachinelearning.DiagnoseResult{ + // }, + // UserDefinedRouteResults: []*armmachinelearning.DiagnoseResult{ + // }, + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/diagnose.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.go index 5bf465e66e..b84b9c5c20 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.go @@ -8,21 +8,92 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json func ExampleWorkspacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "workspace-1234", "testworkspace", nil) + res, err := clientFactory.NewWorkspacesClient().Get(ctx, "workspace-1234", "testworkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.Workspace = armmachinelearning.Workspace{ + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssignedUserAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ + // "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": &armmachinelearning.UserAssignedIdentity{ + // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // }, + // }, + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // AllowPublicAccessWhenBehindVnet: to.Ptr(false), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), + // DiscoveryURL: to.Ptr("http://example.com"), + // Encryption: &armmachinelearning.EncryptionProperty{ + // Identity: &armmachinelearning.IdentityForCmk{ + // UserAssignedIdentity: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai"), + // }, + // KeyVaultProperties: &armmachinelearning.EncryptionKeyVaultProperties{ + // IdentityClientID: to.Ptr(""), + // KeyIdentifier: to.Ptr("https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb"), + // KeyVaultArmID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // }, + // Status: to.Ptr(armmachinelearning.EncryptionStatusEnabled), + // }, + // FriendlyName: to.Ptr("HelloName"), + // HbiWorkspace: to.Ptr(false), + // ImageBuildCompute: to.Ptr("testcompute"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // PrivateEndpointConnections: []*armmachinelearning.PrivateEndpointConnection{ + // { + // Name: to.Ptr("testprivatelinkconnection"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/privateEndpointConnections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/testprivatelinkconnection"), + // Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ + // PrivateEndpoint: &armmachinelearning.PrivateEndpoint{ + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01"), + // }, + // PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ + // Description: to.Ptr("Auto-Approved"), + // ActionsRequired: to.Ptr("None"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // ProvisioningState: to.Ptr(armmachinelearning.PrivateEndpointConnectionProvisioningStateSucceeded), + // }, + // }}, + // PrivateLinkCount: to.Ptr[int32](0), + // PublicNetworkAccess: to.Ptr(armmachinelearning.PublicNetworkAccessDisabled), + // ServiceProvisionedResourceGroup: to.Ptr("testworkspace_0000111122223333"), + // SharedPrivateLinkResources: []*armmachinelearning.SharedPrivateLinkResource{ + // { + // Name: to.Ptr("testcosmosdbresource"), + // Properties: &armmachinelearning.SharedPrivateLinkResourceProperty{ + // GroupID: to.Ptr("Sql"), + // PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testcosmosdbresource/privateLinkResources/Sql"), + // RequestMessage: to.Ptr("Please approve"), + // Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), + // }, + // }}, + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.go index f81ba3eabc..bd53204559 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.go @@ -8,26 +8,60 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json func ExampleWorkspacesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByResourceGroupPager("workspace-1234", &armmachinelearning.WorkspacesClientListByResourceGroupOptions{Skip: nil}) + pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("workspace-1234", &armmachinelearning.WorkspacesClientListByResourceGroupOptions{Skip: nil}) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.WorkspaceListResult = armmachinelearning.WorkspaceListResult{ + // Value: []*armmachinelearning.Workspace{ + // { + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), + // DiscoveryURL: to.Ptr("http://example.com"), + // FriendlyName: to.Ptr("HelloName"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), + // }, + // }, + // { + // Name: to.Ptr("testworkspace1"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace1"), + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew"), + // DiscoveryURL: to.Ptr("http://example.com"), + // FriendlyName: to.Ptr("HelloName 1"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew"), + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listByResourceGroup.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.go index 3e47e9b12c..0b7540ba15 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.go @@ -8,26 +8,60 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json func ExampleWorkspacesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListBySubscriptionPager(&armmachinelearning.WorkspacesClientListBySubscriptionOptions{Skip: nil}) + pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(&armmachinelearning.WorkspacesClientListBySubscriptionOptions{Skip: nil}) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.WorkspaceListResult = armmachinelearning.WorkspaceListResult{ + // Value: []*armmachinelearning.Workspace{ + // { + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), + // DiscoveryURL: to.Ptr("http://example.com"), + // FriendlyName: to.Ptr("HelloName"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), + // }, + // }, + // { + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-5678/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("test description"), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew"), + // DiscoveryURL: to.Ptr("http://example.com"), + // FriendlyName: to.Ptr("HelloName"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew"), + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listBySubscription.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.go index 8de3234bf3..0d11f383c8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.go @@ -8,21 +8,39 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json func ExampleWorkspacesClient_ListKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListKeys(ctx, "testrg123", "workspaces123", nil) + res, err := clientFactory.NewWorkspacesClient().ListKeys(ctx, "testrg123", "workspaces123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ListWorkspaceKeysResult = armmachinelearning.ListWorkspaceKeysResult{ + // ContainerRegistryCredentials: &armmachinelearning.RegistryListCredentialsResult{ + // Passwords: []*armmachinelearning.Password{ + // { + // Name: to.Ptr("password"), + // Value: to.Ptr(""), + // }, + // { + // Name: to.Ptr("password2"), + // Value: to.Ptr("0KARRQoQHSUq1yViPWg7YFernOS=Ic/t"), + // }}, + // Username: to.Ptr("testdemoworkjmjmeykp"), + // }, + // NotebookAccessKeys: &armmachinelearning.ListNotebookKeysResult{ + // }, + // UserStorageResourceID: to.Ptr("/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/ragargeastus2euap/providers/Microsoft.Storage/storageAccounts/testdemoworkazashomr"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.go index 583b461ea7..aa90f69ab8 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.go @@ -8,21 +8,30 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json func ExampleWorkspacesClient_ListNotebookAccessToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListNotebookAccessToken(ctx, "workspace-1234", "testworkspace", nil) + res, err := clientFactory.NewWorkspacesClient().ListNotebookAccessToken(ctx, "workspace-1234", "testworkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.NotebookAccessTokenResult = armmachinelearning.NotebookAccessTokenResult{ + // ExpiresIn: to.Ptr[int32](28800), + // HostName: to.Ptr("Host product name"), + // NotebookResourceID: to.Ptr("94350843095843059"), + // PublicDNS: to.Ptr("resource.notebooks.azure.net"), + // Scope: to.Ptr("aznb_identity"), + // TokenType: to.Ptr("Bearer"), + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listNotebookAccessToken.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.go index 77ec4021ee..77c55219b1 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.go @@ -8,21 +8,24 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json func ExampleWorkspacesClient_ListStorageAccountKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.ListStorageAccountKeys(ctx, "testrg123", "workspaces123", nil) + res, err := clientFactory.NewWorkspacesClient().ListStorageAccountKeys(ctx, "testrg123", "workspaces123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.ListStorageAccountKeysResult = armmachinelearning.ListStorageAccountKeysResult{ + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/listStorageAccountKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.go index 63dac551fd..3e7fbb3d12 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.go @@ -8,26 +8,54 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/operationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/operationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewOperationsClient(cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager(nil) + pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.AmlOperationListResult = armmachinelearning.AmlOperationListResult{ + // Value: []*armmachinelearning.AmlOperation{ + // { + // Name: to.Ptr("Microsoft.MachineLearningServices/workspaces/write"), + // Display: &armmachinelearning.AmlOperationDisplay{ + // Operation: to.Ptr("Create/Update Machine Learning workspaces"), + // Provider: to.Ptr("Microsoft MachineLearningServices"), + // Resource: to.Ptr("workspaces"), + // }, + // }, + // { + // Name: to.Ptr("Microsoft.MachineLearningServices/workspaces/delete"), + // Display: &armmachinelearning.AmlOperationDisplay{ + // Operation: to.Ptr("Delete Machine Learning workspaces"), + // Provider: to.Ptr("Microsoft MachineLearningServices"), + // Resource: to.Ptr("workspaces"), + // }, + // }, + // { + // Name: to.Ptr("Microsoft.MachineLearningServices/workspaces/listkeys/action"), + // Display: &armmachinelearning.AmlOperationDisplay{ + // Operation: to.Ptr("List workspace Keys"), + // Provider: to.Ptr("Microsoft MachineLearningServices"), + // Resource: to.Ptr("workspaces"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/operationsList.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.go index 899ab18514..1094b85cb0 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json func ExampleWorkspacesClient_BeginResyncKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginResyncKeys(ctx, "testrg123", "workspaces123", nil) + poller, err := clientFactory.NewWorkspacesClient().BeginResyncKeys(ctx, "testrg123", "workspaces123", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/resyncKeys.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.go index 27f0b18f14..605a196b31 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json func ExampleWorkspacesClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := client.BeginUpdate(ctx, "workspace-1234", "testworkspace", armmachinelearning.WorkspaceUpdateParameters{ + poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "workspace-1234", "testworkspace", armmachinelearning.WorkspaceUpdateParameters{ Properties: &armmachinelearning.WorkspacePropertiesUpdateParameters{ Description: to.Ptr("new description"), FriendlyName: to.Ptr("New friendly name"), @@ -34,6 +34,28 @@ func ExampleWorkspacesClient_BeginUpdate() { if err != nil { log.Fatalf("failed to pull the result: %v", err) } - // TODO: use response item + // 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.Workspace = armmachinelearning.Workspace{ + // Name: to.Ptr("testworkspace"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace"), + // Identity: &armmachinelearning.ManagedServiceIdentity{ + // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), + // PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), + // }, + // Location: to.Ptr("eastus2euap"), + // Properties: &armmachinelearning.WorkspaceProperties{ + // Description: to.Ptr("new description"), + // ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), + // ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), + // DiscoveryURL: to.Ptr("http://example.com"), + // FriendlyName: to.Ptr("New friendly name"), + // KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), + // PublicNetworkAccess: to.Ptr(armmachinelearning.PublicNetworkAccessDisabled), + // StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/Workspace/update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.go index 375d09b3a0..82764b0e0f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.go @@ -9,18 +9,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json func ExampleWorkspaceConnectionsClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Create(ctx, "resourceGroup-1", "workspace-1", "connection-1", armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ + res, err := clientFactory.NewWorkspaceConnectionsClient().Create(ctx, "resourceGroup-1", "workspace-1", "connection-1", armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ Properties: &armmachinelearning.NoneAuthTypeWorkspaceConnectionProperties{ AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypeNone), Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), @@ -30,6 +30,17 @@ func ExampleWorkspaceConnectionsClient_Create() { if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.WorkspaceConnectionPropertiesV2BasicResource = armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ + // Name: to.Ptr("connection-1"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/connections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1"), + // Properties: &armmachinelearning.NoneAuthTypeWorkspaceConnectionProperties{ + // AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypeNone), + // Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), + // Target: to.Ptr("www.facebook.com"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/create.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.go index 5fbfc6739e..8405b8a731 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.go @@ -8,18 +8,18 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json func ExampleWorkspaceConnectionsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - _, err = client.Delete(ctx, "resourceGroup-1", "workspace-1", "connection-1", nil) + _, err = clientFactory.NewWorkspaceConnectionsClient().Delete(ctx, "resourceGroup-1", "workspace-1", "connection-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.go index eb6a93a706..17f5cfd297 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.go @@ -8,21 +8,32 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json func ExampleWorkspaceConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := client.Get(ctx, "resourceGroup-1", "workspace-1", "connection-1", nil) + res, err := clientFactory.NewWorkspaceConnectionsClient().Get(ctx, "resourceGroup-1", "workspace-1", "connection-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - // TODO: use response item + // 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.WorkspaceConnectionPropertiesV2BasicResource = armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ + // Name: to.Ptr("connection-1"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/connections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1"), + // Properties: &armmachinelearning.NoneAuthTypeWorkspaceConnectionProperties{ + // AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypeNone), + // Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), + // Target: to.Ptr("www.facebook.com"), + // }, + // } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.go index 9eced7e74a..82eda0fc99 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.go @@ -9,28 +9,52 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json func ExampleWorkspaceConnectionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("resourceGroup-1", "workspace-1", &armmachinelearning.WorkspaceConnectionsClientListOptions{Target: to.Ptr("www.facebook.com"), + pager := clientFactory.NewWorkspaceConnectionsClient().NewListPager("resourceGroup-1", "workspace-1", &armmachinelearning.WorkspaceConnectionsClientListOptions{Target: to.Ptr("www.facebook.com"), Category: to.Ptr("ContainerRegistry"), }) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult = armmachinelearning.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult{ + // Value: []*armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ + // { + // Name: to.Ptr("connection-1"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/connections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-1"), + // Properties: &armmachinelearning.PATAuthTypeWorkspaceConnectionProperties{ + // AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypePAT), + // Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), + // Target: to.Ptr("www.facebook.com"), + // }, + // }, + // { + // Name: to.Ptr("connection-2"), + // Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/connections"), + // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-2"), + // Properties: &armmachinelearning.PATAuthTypeWorkspaceConnectionProperties{ + // AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypePAT), + // Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), + // Target: to.Ptr("www.facebook.com"), + // }, + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceConnection/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.go b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.go index 03198ac5b7..87df5ea0cb 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.go +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.go @@ -8,26 +8,40 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json func ExampleWorkspaceFeaturesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceFeaturesClient("00000000-0000-0000-0000-000000000000", cred, nil) + clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("myResourceGroup", "testworkspace", nil) + pager := clientFactory.NewWorkspaceFeaturesClient().NewListPager("myResourceGroup", "testworkspace", nil) for pager.More() { - nextResult, err := pager.NextPage(ctx) + page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } - for _, v := range nextResult.Value { - // TODO: use page item + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. _ = v } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ListAmlUserFeatureResult = armmachinelearning.ListAmlUserFeatureResult{ + // Value: []*armmachinelearning.AmlUserFeature{ + // { + // Description: to.Ptr("Create, edit or delete AutoML experiments in the SDK"), + // DisplayName: to.Ptr("Create edit experiments UI"), + // ID: to.Ptr("automatedml_createeditexperimentsui"), + // }, + // { + // Description: to.Ptr("Upgrade workspace from Basic to enterprise from the UI"), + // DisplayName: to.Ptr("Upgrade workspace UI"), + // ID: to.Ptr("workspace_upgradeworkspaceui"), + // }}, + // } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.json index b4851e9763..a1009b2277 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples-go/WorkspaceFeature/list.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"} \ No newline at end of file