From e3c4a77cd2f881687f77fa4f2f3866e751c5025c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 27 Sep 2024 17:03:45 +0000 Subject: [PATCH] CodeGen from PR 30665 in Azure/azure-rest-api-specs Merge 93cd7f5afc55163cad0d85ea1bb5c96bcce4b8b1 into 095ea07f1c0a540a37e11d0454cc01fbafb0658f --- .../armmachinelearning/CHANGELOG.md | 7 + .../armmachinelearning/autorest.md | 7 +- .../batchdeployments_client.go | 26 +- .../batchdeployments_client_example_test.go | 495 ------ .../batchendpoints_client.go | 30 +- .../batchendpoints_client_example_test.go | 387 ----- .../codecontainers_client.go | 16 +- .../codecontainers_client_example_test.go | 192 --- .../armmachinelearning/codeversions_client.go | 26 +- .../codeversions_client_example_test.go | 253 --- .../componentcontainers_client.go | 16 +- ...componentcontainers_client_example_test.go | 182 -- .../componentversions_client.go | 22 +- .../componentversions_client_example_test.go | 225 --- .../armmachinelearning/compute_client.go | 52 +- .../compute_client_example_test.go | 1068 ------------ .../armmachinelearning/constants.go | 16 +- .../datacontainers_client.go | 16 +- .../datacontainers_client_example_test.go | 219 --- .../armmachinelearning/datastores_client.go | 20 +- .../datastores_client_example_test.go | 467 ----- .../armmachinelearning/dataversions_client.go | 22 +- .../dataversions_client_example_test.go | 222 --- .../environmentcontainers_client.go | 16 +- ...vironmentcontainers_client_example_test.go | 186 -- .../environmentversions_client.go | 22 +- ...environmentversions_client_example_test.go | 296 ---- .../fake/workspaceconnections_server.go | 54 + .../armmachinelearning/features_client.go | 8 +- .../features_client_example_test.go | 121 -- .../featuresetcontainers_client.go | 20 +- ...eaturesetcontainers_client_example_test.go | 208 --- .../featuresetversions_client.go | 26 +- .../featuresetversions_client_example_test.go | 414 ----- .../featurestoreentitycontainers_client.go | 20 +- ...oreentitycontainers_client_example_test.go | 208 --- .../featurestoreentityversions_client.go | 20 +- ...storeentityversions_client_example_test.go | 228 --- .../machinelearning/armmachinelearning/go.mod | 12 +- .../machinelearning/armmachinelearning/go.sum | 17 - .../armmachinelearning/jobs_client.go | 24 +- .../jobs_client_example_test.go | 1504 ----------------- .../managednetworkprovisions_client.go | 6 +- ...ednetworkprovisions_client_example_test.go | 50 - .../managednetworksettingsrule_client.go | 20 +- ...networksettingsrule_client_example_test.go | 163 -- .../marketplacesubscriptions_client.go | 20 +- ...tplacesubscriptions_client_example_test.go | 185 -- .../modelcontainers_client.go | 16 +- .../modelcontainers_client_example_test.go | 175 -- .../armmachinelearning/models.go | 6 + .../armmachinelearning/models_serde.go | 27 + .../modelversions_client.go | 22 +- .../modelversions_client_example_test.go | 255 --- .../onlinedeployments_client.go | 34 +- .../onlinedeployments_client_example_test.go | 1017 ----------- .../onlineendpoints_client.go | 40 +- .../onlineendpoints_client_example_test.go | 449 ----- .../armmachinelearning/operations_client.go | 4 +- .../operations_client_example_test.go | 70 - .../armmachinelearning/options.go | 6 + .../privateendpointconnections_client.go | 16 +- ...endpointconnections_client_example_test.go | 175 -- .../privatelinkresources_client.go | 4 +- ...rivatelinkresources_client_example_test.go | 51 - .../armmachinelearning/quotas_client.go | 8 +- .../quotas_client_example_test.go | 498 ------ .../armmachinelearning/registries_client.go | 34 +- .../registries_client_example_test.go | 1396 --------------- .../registrycodecontainers_client.go | 20 +- ...istrycodecontainers_client_example_test.go | 200 --- .../registrycodeversions_client.go | 24 +- ...egistrycodeversions_client_example_test.go | 234 --- .../registrycomponentcontainers_client.go | 20 +- ...componentcontainers_client_example_test.go | 188 --- .../registrycomponentversions_client.go | 20 +- ...rycomponentversions_client_example_test.go | 207 --- .../registrydatacontainers_client.go | 20 +- ...istrydatacontainers_client_example_test.go | 204 --- .../registrydatareferences_client.go | 4 +- ...istrydatareferences_client_example_test.go | 51 - .../registrydataversions_client.go | 24 +- ...egistrydataversions_client_example_test.go | 252 --- .../registryenvironmentcontainers_client.go | 20 +- ...vironmentcontainers_client_example_test.go | 194 --- .../registryenvironmentversions_client.go | 20 +- ...environmentversions_client_example_test.go | 279 --- .../registrymodelcontainers_client.go | 20 +- ...strymodelcontainers_client_example_test.go | 182 -- .../registrymodelversions_client.go | 24 +- ...gistrymodelversions_client_example_test.go | 271 --- .../armmachinelearning/responses.go | 5 + .../armmachinelearning/schedules_client.go | 20 +- .../schedules_client_example_test.go | 253 --- .../serverlessendpoints_client.go | 36 +- ...serverlessendpoints_client_example_test.go | 444 ----- .../armmachinelearning/usages_client.go | 4 +- .../usages_client_example_test.go | 431 ----- .../virtualmachinesizes_client.go | 4 +- ...virtualmachinesizes_client_example_test.go | 396 ----- .../workspaceconnections_client.go | 94 +- ...orkspaceconnections_client_example_test.go | 197 --- .../workspacefeatures_client.go | 4 +- .../workspacefeatures_client_example_test.go | 56 - .../armmachinelearning/workspaces_client.go | 68 +- .../workspaces_client_example_test.go | 683 -------- 106 files changed, 691 insertions(+), 16619 deletions(-) delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/features_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registries_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md index b9ee8a76accd..bc467f3794a4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 4.1.0 (2024-09-27) +### Features Added + +- New function `*WorkspaceConnectionsClient.Update(context.Context, string, string, string, *WorkspaceConnectionsClientUpdateOptions) (WorkspaceConnectionsClientUpdateResponse, error)` +- New struct `WorkspaceConnectionUpdateParameter` + + ## 4.0.0 (2024-08-23) ### Breaking Changes diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md b/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md index 49cd0e8d295f..678b549d22fb 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/machinelearningservices/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/machinelearningservices/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 4.0.0 -tag: package-2024-04 +module-version: 4.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go index 5e4db43f1b62..b2fc051ca6c9 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go @@ -47,7 +47,7 @@ func NewBatchDeploymentsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name @@ -76,7 +76,7 @@ func (client *BatchDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body BatchDeployment, options *BatchDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginCreateOrUpdate" @@ -126,7 +126,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -166,7 +166,7 @@ func (client *BatchDeploymentsClient) BeginDelete(ctx context.Context, resourceG // Delete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *BatchDeploymentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginDelete" @@ -216,7 +216,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r // Get - Gets a batch inference deployment by id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -281,7 +281,7 @@ func (client *BatchDeploymentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,7 +298,7 @@ func (client *BatchDeploymentsClient) getHandleResponse(resp *http.Response) (Ba // NewListPager - Lists Batch inference deployments in the workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Endpoint name @@ -360,7 +360,7 @@ func (client *BatchDeploymentsClient) listCreateRequest(ctx context.Context, res if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,7 +378,7 @@ func (client *BatchDeploymentsClient) listHandleResponse(resp *http.Response) (B // BeginUpdate - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name @@ -406,7 +406,7 @@ func (client *BatchDeploymentsClient) BeginUpdate(ctx context.Context, resourceG // Update - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, options *BatchDeploymentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchDeploymentsClient.BeginUpdate" @@ -456,7 +456,7 @@ func (client *BatchDeploymentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go deleted file mode 100644 index e4f401f2818f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go +++ /dev/null @@ -1,495 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBatchDeploymentsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{ - Properties: &armmachinelearning.PartialBatchDeployment{ - Description: to.Ptr("string"), - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - 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"), - Resources: &armmachinelearning.DeploymentResourceConfiguration{ - InstanceCount: to.Ptr[int32](1), - InstanceType: to.Ptr("string"), - Properties: map[string]any{ - "string": map[string]any{ - "cd3c37dc-2876-4ca4-8a54-21bd7619724a": 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go index 48005c20dc57..85acd728f69a 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go @@ -47,7 +47,7 @@ func NewBatchEndpointsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch inference endpoint. @@ -75,7 +75,7 @@ func (client *BatchEndpointsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body BatchEndpoint, options *BatchEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginCreateOrUpdate" @@ -121,7 +121,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference Endpoint name. @@ -160,7 +160,7 @@ func (client *BatchEndpointsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginDelete" @@ -206,7 +206,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a batch inference endpoint by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch Endpoint. @@ -266,7 +266,7 @@ func (client *BatchEndpointsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *BatchEndpointsClient) getHandleResponse(resp *http.Response) (Batc // NewListPager - Lists Batch inference endpoint in the workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - BatchEndpointsClientListOptions contains the optional parameters for the BatchEndpointsClient.NewListPager method. @@ -333,7 +333,7 @@ func (client *BatchEndpointsClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -354,7 +354,7 @@ func (client *BatchEndpointsClient) listHandleResponse(resp *http.Response) (Bat // ListKeys - Lists batch Inference Endpoint keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference Endpoint name. @@ -405,7 +405,7 @@ func (client *BatchEndpointsClient) listKeysCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -423,7 +423,7 @@ func (client *BatchEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginUpdate - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Name for the Batch inference endpoint. @@ -450,7 +450,7 @@ func (client *BatchEndpointsClient) BeginUpdate(ctx context.Context, resourceGro // Update - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *BatchEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *BatchEndpointsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "BatchEndpointsClient.BeginUpdate" @@ -496,7 +496,7 @@ func (client *BatchEndpointsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go deleted file mode 100644 index 6029251fd8e0..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go +++ /dev/null @@ -1,387 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewBatchEndpointsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewBatchEndpointsClient().BeginDelete(ctx, "resourceGroup-1234", "testworkspace", "testBatchEndpoint", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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]any{ - "string": map[string]any{}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.BatchEndpointProperties{ - Description: to.Ptr("string"), - AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go index fdbb66fe8145..a71c0175d635 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go @@ -46,7 +46,7 @@ func NewCodeContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -99,7 +99,7 @@ func (client *CodeContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *CodeContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -170,7 +170,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -230,7 +230,7 @@ func (client *CodeContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *CodeContainersClient) getHandleResponse(resp *http.Response) (Code // NewListPager - List containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - CodeContainersClientListOptions contains the optional parameters for the CodeContainersClient.NewListPager method. @@ -297,7 +297,7 @@ func (client *CodeContainersClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go deleted file mode 100644 index 20a6384484d5..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go +++ /dev/null @@ -1,192 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCodeContainersClient().NewListPager("testrg123", "testworkspace", &armmachinelearning.CodeContainersClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCodeContainersClient().Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCodeContainersClient().Get(ctx, "testrg123", "testworkspace", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCodeContainersClient().CreateOrUpdate(ctx, "testrg123", "testworkspace", "testContainer", armmachinelearning.CodeContainer{ - Properties: &armmachinelearning.CodeContainerProperties{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go index cfb116d0501f..b54a5b25739b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go @@ -47,7 +47,7 @@ func NewCodeVersionsClient(subscriptionID string, credential azcore.TokenCredent // CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a code asset to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *CodeVersionsClient) createOrGetStartPendingUploadCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *CodeVersionsClient) createOrGetStartPendingUploadHandleResponse(re // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -184,7 +184,7 @@ func (client *CodeVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -205,7 +205,7 @@ func (client *CodeVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -260,7 +260,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +269,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -325,7 +325,7 @@ func (client *CodeVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -342,7 +342,7 @@ func (client *CodeVersionsClient) getHandleResponse(resp *http.Response) (CodeVe // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -403,7 +403,7 @@ func (client *CodeVersionsClient) listCreateRequest(ctx context.Context, resourc if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Hash != nil { reqQP.Set("hash", *options.Hash) } @@ -427,7 +427,7 @@ func (client *CodeVersionsClient) listHandleResponse(resp *http.Response) (CodeV // BeginPublish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -456,7 +456,7 @@ func (client *CodeVersionsClient) BeginPublish(ctx context.Context, resourceGrou // Publish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *CodeVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *CodeVersionsClientBeginPublishOptions) (*http.Response, error) { var err error const operationName = "CodeVersionsClient.BeginPublish" @@ -506,7 +506,7 @@ func (client *CodeVersionsClient) publishCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go deleted file mode 100644 index 26d8086fc086..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go +++ /dev/null @@ -1,253 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCodeVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - Hash: nil, - HashVersion: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - CodeURI: to.Ptr("https://blobStorage/folderName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/publish.json -func ExampleCodeVersionsClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCodeVersionsClient().BeginPublish(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DestinationAsset{ - DestinationName: to.Ptr("string"), - DestinationVersion: to.Ptr("string"), - RegistryName: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json -func ExampleCodeVersionsClient_CreateOrGetStartPendingUpload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCodeVersionsClient().CreateOrGetStartPendingUpload(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.PendingUploadRequestDto{ - PendingUploadID: to.Ptr("string"), - PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PendingUploadResponseDto = armmachinelearning.PendingUploadResponseDto{ - // BlobReferenceForConsumption: &armmachinelearning.BlobReferenceForConsumptionDto{ - // BlobURI: to.Ptr("https://www.contoso.com/example"), - // Credential: &armmachinelearning.SASCredentialDto{ - // CredentialType: to.Ptr(armmachinelearning.PendingUploadCredentialTypeSAS), - // SasURI: to.Ptr("https://www.contoso.com/example"), - // }, - // StorageAccountArmID: to.Ptr("string"), - // }, - // PendingUploadID: to.Ptr("string"), - // PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go index 06b5b98bb9dc..9300362ef045 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go @@ -46,7 +46,7 @@ func NewComponentContainersClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -99,7 +99,7 @@ func (client *ComponentContainersClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *ComponentContainersClient) createOrUpdateHandleResponse(resp *http // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -171,7 +171,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -231,7 +231,7 @@ func (client *ComponentContainersClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +248,7 @@ func (client *ComponentContainersClient) getHandleResponse(resp *http.Response) // NewListPager - List component containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ComponentContainersClientListOptions contains the optional parameters for the ComponentContainersClient.NewListPager @@ -299,7 +299,7 @@ func (client *ComponentContainersClient) listCreateRequest(ctx context.Context, if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go deleted file mode 100644 index 17b14f763fe4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go +++ /dev/null @@ -1,182 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewComponentContainersClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ComponentContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewComponentContainersClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go index a6f1992f0120..37e7f7c16168 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go @@ -47,7 +47,7 @@ func NewComponentVersionsClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -105,7 +105,7 @@ func (client *ComponentVersionsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *ComponentVersionsClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -182,7 +182,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +191,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -247,7 +247,7 @@ func (client *ComponentVersionsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *ComponentVersionsClient) getHandleResponse(resp *http.Response) (C // NewListPager - List component versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Component name. @@ -326,7 +326,7 @@ func (client *ComponentVersionsClient) listCreateRequest(ctx context.Context, re if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -347,7 +347,7 @@ func (client *ComponentVersionsClient) listHandleResponse(resp *http.Response) ( // BeginPublish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -376,7 +376,7 @@ func (client *ComponentVersionsClient) BeginPublish(ctx context.Context, resourc // Publish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComponentVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ComponentVersionsClientBeginPublishOptions) (*http.Response, error) { var err error const operationName = "ComponentVersionsClient.BeginPublish" @@ -426,7 +426,7 @@ func (client *ComponentVersionsClient) publishCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go deleted file mode 100644 index 4efd1afcd98e..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go +++ /dev/null @@ -1,225 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - ComponentSpec: map[string]any{ - "8ced901b-d826-477d-bfef-329da9672513": nil, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/publish.json -func ExampleComponentVersionsClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComponentVersionsClient().BeginPublish(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DestinationAsset{ - DestinationName: to.Ptr("string"), - DestinationVersion: to.Ptr("string"), - RegistryName: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go index 82084f444602..b560fb374f13 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go @@ -48,7 +48,7 @@ func NewComputeClient(subscriptionID string, credential azcore.TokenCredential, // exist yet. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -77,7 +77,7 @@ func (client *ComputeClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // exist yet. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource, options *ComputeClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginCreateOrUpdate" @@ -123,7 +123,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -135,7 +135,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -162,7 +162,7 @@ func (client *ComputeClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction, options *ComputeClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginDelete" @@ -208,7 +208,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") reqQP.Set("underlyingResourceAction", string(underlyingResourceAction)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -219,7 +219,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr // 'keys' nested resource to get them. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -270,7 +270,7 @@ func (client *ComputeClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,7 +287,7 @@ func (client *ComputeClient) getHandleResponse(resp *http.Response) (ComputeClie // NewListPager - Gets computes in specified workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ComputeClientListOptions contains the optional parameters for the ComputeClient.NewListPager method. @@ -337,7 +337,7 @@ func (client *ComputeClient) listCreateRequest(ctx context.Context, resourceGrou if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -355,7 +355,7 @@ func (client *ComputeClient) listHandleResponse(resp *http.Response) (ComputeCli // ListKeys - Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -406,7 +406,7 @@ func (client *ComputeClient) listKeysCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -423,7 +423,7 @@ func (client *ComputeClient) listKeysHandleResponse(resp *http.Response) (Comput // NewListNodesPager - Get the details (e.g IP address, port etc) of all the compute nodes in the compute. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -475,7 +475,7 @@ func (client *ComputeClient) listNodesCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -493,7 +493,7 @@ func (client *ComputeClient) listNodesHandleResponse(resp *http.Response) (Compu // BeginRestart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -518,7 +518,7 @@ func (client *ComputeClient) BeginRestart(ctx context.Context, resourceGroupName // Restart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) restart(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginRestartOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginRestart" @@ -564,7 +564,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -573,7 +573,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG // BeginStart - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -598,7 +598,7 @@ func (client *ComputeClient) BeginStart(ctx context.Context, resourceGroupName s // Start - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) start(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginStart" @@ -644,7 +644,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -653,7 +653,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro // BeginStop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -678,7 +678,7 @@ func (client *ComputeClient) BeginStop(ctx context.Context, resourceGroupName st // Stop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) stop(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginStop" @@ -724,7 +724,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +734,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou // operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - computeName - Name of the Azure Machine Learning compute. @@ -760,7 +760,7 @@ func (client *ComputeClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ComputeClient) update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters, options *ComputeClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ComputeClient.BeginUpdate" @@ -806,7 +806,7 @@ func (client *ComputeClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go deleted file mode 100644 index 5d15c48c8fb5..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go +++ /dev/null @@ -1,1068 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewComputeClient().NewListPager("testrg123", "workspaces123", &armmachinelearning.ComputeClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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.000Z"); return t}()), - // IsAttachedCompute: to.Ptr(true), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // }, - // CustomServices: []*armmachinelearning.CustomService{ - // { - // Name: to.Ptr("rstudio"), - // Docker: &armmachinelearning.Docker{ - // Privileged: to.Ptr(true), - // }, - // Endpoints: []*armmachinelearning.Endpoint{ - // { - // Name: to.Ptr("connect"), - // Published: to.Ptr[int32](8787), - // Target: to.Ptr[int32](8787), - // Protocol: to.Ptr(armmachinelearning.ProtocolHTTP), - // }}, - // EnvironmentVariables: map[string]*armmachinelearning.EnvironmentVariable{ - // "test_var": &armmachinelearning.EnvironmentVariable{ - // Type: to.Ptr(armmachinelearning.EnvironmentVariableTypeLocal), - // Value: to.Ptr("test_val"), - // }, - // }, - // Image: &armmachinelearning.Image{ - // Type: to.Ptr(armmachinelearning.ImageTypeDocker), - // Reference: to.Ptr("ghcr.io/azure/rocker-rstudio-ml-verse:latest"), - // }, - // Volumes: []*armmachinelearning.VolumeDefinition{ - // { - // Type: to.Ptr(armmachinelearning.VolumeDefinitionTypeBind), - // ReadOnly: to.Ptr(false), - // Source: to.Ptr("/home/azureuser/cloudfiles"), - // Target: to.Ptr("/home/azureuser/cloudfiles"), - // }}, - // }}, - // OSImageMetadata: &armmachinelearning.ImageMetadata{ - // CurrentImageVersion: to.Ptr("22.06.14"), - // IsLatestOsImageVersion: to.Ptr(false), - // LatestImageVersion: to.Ptr("22.07.22"), - // }, - // 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.Kubernetes{ - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes), - 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"), - InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{ - "defaultInstanceType": { - 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"), - }, - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.AmlCompute{ - Properties: &armmachinelearning.AmlComputeProperties{ - EnableNodePublicIP: to.Ptr(true), - IsolatedNetwork: to.Ptr(false), - OSType: to.Ptr(armmachinelearning.OsTypeWindows), - RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessNotSpecified), - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](1), - MinNodeCount: to.Ptr[int32](0), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - VirtualMachineImage: &armmachinelearning.VirtualMachineImage{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1"), - }, - VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated), - VMSize: to.Ptr("STANDARD_NC6"), - }, - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.DataFactory{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory), - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.AKS{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyPersonal), - ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal), - CustomServices: []*armmachinelearning.CustomService{ - { - Name: to.Ptr("rstudio"), - Docker: &armmachinelearning.Docker{ - Privileged: to.Ptr(true), - }, - Endpoints: []*armmachinelearning.Endpoint{ - { - Name: to.Ptr("connect"), - Published: to.Ptr[int32](8787), - Target: to.Ptr[int32](8787), - Protocol: to.Ptr(armmachinelearning.ProtocolHTTP), - }}, - EnvironmentVariables: map[string]*armmachinelearning.EnvironmentVariable{ - "test_variable": { - Type: to.Ptr(armmachinelearning.EnvironmentVariableTypeLocal), - Value: to.Ptr("test_value"), - }, - }, - Image: &armmachinelearning.Image{ - Type: to.Ptr(armmachinelearning.ImageTypeDocker), - Reference: to.Ptr("ghcr.io/azure/rocker-rstudio-ml-verse:latest"), - }, - Volumes: []*armmachinelearning.VolumeDefinition{ - { - Type: to.Ptr(armmachinelearning.VolumeDefinitionTypeBind), - ReadOnly: to.Ptr(false), - Source: to.Ptr("/home/azureuser/cloudfiles"), - Target: to.Ptr("/home/azureuser/cloudfiles"), - }}, - }}, - 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{ - SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessDisabled), - }, - Subnet: &armmachinelearning.ResourceID{ - ID: to.Ptr("test-subnet-resource-id"), - }, - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyPersonal), - ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal), - PersonalComputeInstanceSettings: &armmachinelearning.PersonalComputeInstanceSettings{ - AssignedUser: &armmachinelearning.AssignedUser{ - ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - }, - }, - Schedules: &armmachinelearning.ComputeSchedules{ - ComputeStartStop: []*armmachinelearning.ComputeStartStopSchedule{ - { - Action: to.Ptr(armmachinelearning.ComputePowerActionStop), - Cron: &armmachinelearning.Cron{ - Expression: to.Ptr("0 18 * * *"), - StartTime: to.Ptr("2021-04-23T01:30:00"), - TimeZone: to.Ptr("Pacific Standard Time"), - }, - Status: to.Ptr(armmachinelearning.ScheduleStatusEnabled), - TriggerType: to.Ptr(armmachinelearning.ComputeTriggerTypeCron), - }}, - }, - SSHSettings: &armmachinelearning.ComputeInstanceSSHSettings{ - SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessDisabled), - }, - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.AmlCompute{ - Properties: &armmachinelearning.AmlComputeProperties{ - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](4), - MinNodeCount: to.Ptr[int32](4), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - }, - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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.000Z"); return t}()), - // ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.000Z"); 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.AKS{ - Properties: &armmachinelearning.AKSSchemaProperties{ - AgentCount: to.Ptr[int32](4), - }, - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), - ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), - }, - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ClusterUpdateParameters{ - Properties: &armmachinelearning.ClusterUpdateProperties{ - Properties: &armmachinelearning.ScaleSettingsInformation{ - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](4), - MinNodeCount: to.Ptr[int32](4), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginDelete(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.UnderlyingResourceActionDelete, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewComputeClient().NewListNodesPager("testrg123", "workspaces123", "compute123", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - 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"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewComputeClient().ListKeys(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res = 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginStart(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginStop(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewComputeClient().BeginRestart(ctx, "testrg123", "workspaces123", "compute123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go index 8847d835beeb..fb56875e5831 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go @@ -10,7 +10,7 @@ package armmachinelearning const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning" - moduleVersion = "v4.0.0" + moduleVersion = "v4.1.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -352,7 +352,7 @@ const ( // tf-idf may also work. ClassificationModelsMultinomialNaiveBayes ClassificationModels = "MultinomialNaiveBayes" // ClassificationModelsRandomForest - Random forest is a supervised learning algorithm. - // The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + // The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. // The general idea of the bagging method is that a combination of learning models increases the overall result. ClassificationModelsRandomForest ClassificationModels = "RandomForest" // ClassificationModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning @@ -1508,7 +1508,7 @@ const ( // to missing data and shifts in the trend, and typically handles outliers well. ForecastingModelsProphet ForecastingModels = "Prophet" // ForecastingModelsRandomForest - Random forest is a supervised learning algorithm. - // The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + // The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. // The general idea of the bagging method is that a combination of learning models increases the overall result. ForecastingModelsRandomForest ForecastingModels = "RandomForest" // ForecastingModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications @@ -2364,7 +2364,7 @@ const ( NumericalDataDriftMetricNormalizedWassersteinDistance NumericalDataDriftMetric = "NormalizedWassersteinDistance" // NumericalDataDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. NumericalDataDriftMetricPopulationStabilityIndex NumericalDataDriftMetric = "PopulationStabilityIndex" - // NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + // NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. NumericalDataDriftMetricTwoSampleKolmogorovSmirnovTest NumericalDataDriftMetric = "TwoSampleKolmogorovSmirnovTest" ) @@ -2407,7 +2407,7 @@ const ( NumericalPredictionDriftMetricNormalizedWassersteinDistance NumericalPredictionDriftMetric = "NormalizedWassersteinDistance" // NumericalPredictionDriftMetricPopulationStabilityIndex - The Population Stability Index (PSI) metric. NumericalPredictionDriftMetricPopulationStabilityIndex NumericalPredictionDriftMetric = "PopulationStabilityIndex" - // NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) + // NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest - The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) // metric. NumericalPredictionDriftMetricTwoSampleKolmogorovSmirnovTest NumericalPredictionDriftMetric = "TwoSampleKolmogorovSmirnovTest" ) @@ -2700,8 +2700,8 @@ func PossibleProtocolValues() []Protocol { } } -// ProvisioningState - The current deployment state of workspace resource. The provisioningState is to indicate states for -// resource provisioning. +// ProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and +// Failed. type ProvisioningState string const ( @@ -2880,7 +2880,7 @@ const ( // RegressionModelsLightGBM - LightGBM is a gradient boosting framework that uses tree based learning algorithms. RegressionModelsLightGBM RegressionModels = "LightGBM" // RegressionModelsRandomForest - Random forest is a supervised learning algorithm. - // The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + // The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. // The general idea of the bagging method is that a combination of learning models increases the overall result. RegressionModelsRandomForest RegressionModels = "RandomForest" // RegressionModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go index 515a1533d719..17edf82341c3 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go @@ -46,7 +46,7 @@ func NewDataContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -99,7 +99,7 @@ func (client *DataContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *DataContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -170,7 +170,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -230,7 +230,7 @@ func (client *DataContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *DataContainersClient) getHandleResponse(resp *http.Response) (Data // NewListPager - List data containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - DataContainersClientListOptions contains the optional parameters for the DataContainersClient.NewListPager method. @@ -297,7 +297,7 @@ func (client *DataContainersClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go deleted file mode 100644 index 0ef30f1f1225..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go +++ /dev/null @@ -1,219 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataContainersClient().NewListPager("testrg123", "workspace123", &armmachinelearning.DataContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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")), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDataContainersClient().Delete(ctx, "testrg123", "workspace123", "datacontainer123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataContainersClient().Get(ctx, "testrg123", "workspace123", "datacontainer123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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")), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataContainersClient().CreateOrUpdate(ctx, "testrg123", "workspace123", "datacontainer123", armmachinelearning.DataContainer{ - 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")), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go index 5a896dffd84c..9c8941f5a5c4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go @@ -47,7 +47,7 @@ func NewDatastoresClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create or update datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -100,7 +100,7 @@ func (client *DatastoresClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.SkipValidation != nil { reqQP.Set("skipValidation", strconv.FormatBool(*options.SkipValidation)) } @@ -124,7 +124,7 @@ func (client *DatastoresClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -174,7 +174,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get datastore. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -234,7 +234,7 @@ func (client *DatastoresClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +251,7 @@ func (client *DatastoresClient) getHandleResponse(resp *http.Response) (Datastor // NewListPager - List datastores. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - DatastoresClientListOptions contains the optional parameters for the DatastoresClient.NewListPager method. @@ -301,7 +301,7 @@ func (client *DatastoresClient) listCreateRequest(ctx context.Context, resourceG if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -337,7 +337,7 @@ func (client *DatastoresClient) listHandleResponse(resp *http.Response) (Datasto // ListSecrets - Get datastore secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Datastore name. @@ -388,7 +388,7 @@ func (client *DatastoresClient) listSecretsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go deleted file mode 100644 index 2240c9f623e2..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go +++ /dev/null @@ -1,467 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDatastoresClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.DatastoresClientListOptions{Skip: nil, - Count: to.Ptr[int32](1), - IsDefault: to.Ptr(false), - Names: []string{ - "string"}, - SearchText: to.Ptr("string"), - OrderBy: to.Ptr("string"), - OrderByAsc: to.Ptr(false), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - // }, - // }, - // 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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDatastoresClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - // }, - // }, - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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"), - Secrets: &armmachinelearning.ServicePrincipalDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeServicePrincipal), - ClientSecret: to.Ptr("string"), - }, - TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureDataLakeGen1), - StoreName: to.Ptr("string"), - }, - }, &armmachinelearning.DatastoresClientCreateOrUpdateOptions{SkipValidation: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // Secrets: &armmachinelearning.ServicePrincipalDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeServicePrincipal), - // }, - // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), - // }, - // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureDataLakeGen1), - // StoreName: to.Ptr("string"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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"), - Secrets: &armmachinelearning.ServicePrincipalDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeServicePrincipal), - ClientSecret: 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"), - }, - }, &armmachinelearning.DatastoresClientCreateOrUpdateOptions{SkipValidation: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // Secrets: &armmachinelearning.ServicePrincipalDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeServicePrincipal), - // }, - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ - CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), - Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - Key: to.Ptr("string"), - }, - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureFile), - AccountName: to.Ptr("string"), - Endpoint: to.Ptr("string"), - FileShareName: to.Ptr("string"), - Protocol: to.Ptr("string"), - }, - }, &armmachinelearning.DatastoresClientCreateOrUpdateOptions{SkipValidation: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - // }, - // }, - // DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureFile), - // AccountName: to.Ptr("string"), - // Endpoint: to.Ptr("string"), - // FileShareName: to.Ptr("string"), - // Protocol: to.Ptr("string"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ - CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), - Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - Key: to.Ptr("string"), - }, - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureBlob), - AccountName: to.Ptr("string"), - ContainerName: to.Ptr("string"), - Endpoint: to.Ptr("core.windows.net"), - Protocol: to.Ptr("https"), - }, - }, &armmachinelearning.DatastoresClientCreateOrUpdateOptions{SkipValidation: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - // SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - // }, - // }, - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go index 3f62c6cfd6f6..5e3e58855107 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go @@ -47,7 +47,7 @@ func NewDataVersionsClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -105,7 +105,7 @@ func (client *DataVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *DataVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -181,7 +181,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -246,7 +246,7 @@ func (client *DataVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *DataVersionsClient) getHandleResponse(resp *http.Response) (DataVe // NewListPager - List data versions in the data container // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Data container's name @@ -327,7 +327,7 @@ func (client *DataVersionsClient) listCreateRequest(ctx context.Context, resourc if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -348,7 +348,7 @@ func (client *DataVersionsClient) listHandleResponse(resp *http.Response) (DataV // BeginPublish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -377,7 +377,7 @@ func (client *DataVersionsClient) BeginPublish(ctx context.Context, resourceGrou // Publish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *DataVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *DataVersionsClientBeginPublishOptions) (*http.Response, error) { var err error const operationName = "DataVersionsClient.BeginPublish" @@ -427,7 +427,7 @@ func (client *DataVersionsClient) publishCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go deleted file mode 100644 index 39f7282c09c6..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go +++ /dev/null @@ -1,222 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/publish.json -func ExampleDataVersionsClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDataVersionsClient().BeginPublish(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DestinationAsset{ - DestinationName: to.Ptr("string"), - DestinationVersion: to.Ptr("string"), - RegistryName: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go index 426569849b94..32657901698d 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go @@ -46,7 +46,7 @@ func NewEnvironmentContainersClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -99,7 +99,7 @@ func (client *EnvironmentContainersClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -120,7 +120,7 @@ func (client *EnvironmentContainersClient) createOrUpdateHandleResponse(resp *ht // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -171,7 +171,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -232,7 +232,7 @@ func (client *EnvironmentContainersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *EnvironmentContainersClient) getHandleResponse(resp *http.Response // NewListPager - List environment containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - EnvironmentContainersClientListOptions contains the optional parameters for the EnvironmentContainersClient.NewListPager @@ -300,7 +300,7 @@ func (client *EnvironmentContainersClient) listCreateRequest(ctx context.Context if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go deleted file mode 100644 index 84cd384de450..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go +++ /dev/null @@ -1,186 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentContainersClient().NewListPager("testrg123", "testworkspace", &armmachinelearning.EnvironmentContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewEnvironmentContainersClient().Delete(ctx, "testrg123", "testworkspace", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentContainersClient().Get(ctx, "testrg123", "testworkspace", "testEnvironment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentContainersClient().CreateOrUpdate(ctx, "testrg123", "testworkspace", "testEnvironment", armmachinelearning.EnvironmentContainer{ - 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"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go index 05e1ad72cfbb..7013f6cd74d4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go @@ -47,7 +47,7 @@ func NewEnvironmentVersionsClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Creates or updates an EnvironmentVersion. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Name of EnvironmentVersion. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateHandleResponse(resp *http // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -182,7 +182,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -191,7 +191,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -247,7 +247,7 @@ func (client *EnvironmentVersionsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *EnvironmentVersionsClient) getHandleResponse(resp *http.Response) // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -326,7 +326,7 @@ func (client *EnvironmentVersionsClient) listCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } @@ -347,7 +347,7 @@ func (client *EnvironmentVersionsClient) listHandleResponse(resp *http.Response) // BeginPublish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -376,7 +376,7 @@ func (client *EnvironmentVersionsClient) BeginPublish(ctx context.Context, resou // Publish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *EnvironmentVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *EnvironmentVersionsClientBeginPublishOptions) (*http.Response, error) { var err error const operationName = "EnvironmentVersionsClient.BeginPublish" @@ -426,7 +426,7 @@ func (client *EnvironmentVersionsClient) publishCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go deleted file mode 100644 index a54de9c4462a..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go +++ /dev/null @@ -1,296 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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"), - 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), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/publish.json -func ExampleEnvironmentVersionsClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentVersionsClient().BeginPublish(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DestinationAsset{ - DestinationName: to.Ptr("string"), - DestinationVersion: to.Ptr("string"), - RegistryName: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/fake/workspaceconnections_server.go b/sdk/resourcemanager/machinelearning/armmachinelearning/fake/workspaceconnections_server.go index 44cd462b4d14..440df9413dc4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/fake/workspaceconnections_server.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/fake/workspaceconnections_server.go @@ -19,6 +19,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" "net/http" "net/url" + "reflect" "regexp" ) @@ -43,6 +44,10 @@ type WorkspaceConnectionsServer struct { // ListSecrets is the fake for method WorkspaceConnectionsClient.ListSecrets // HTTP status codes to indicate success: http.StatusOK ListSecrets func(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *armmachinelearning.WorkspaceConnectionsClientListSecretsOptions) (resp azfake.Responder[armmachinelearning.WorkspaceConnectionsClientListSecretsResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method WorkspaceConnectionsClient.Update + // HTTP status codes to indicate success: http.StatusOK + Update func(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *armmachinelearning.WorkspaceConnectionsClientUpdateOptions) (resp azfake.Responder[armmachinelearning.WorkspaceConnectionsClientUpdateResponse], errResp azfake.ErrorResponder) } // NewWorkspaceConnectionsServerTransport creates a new instance of WorkspaceConnectionsServerTransport with the provided implementation. @@ -84,6 +89,8 @@ func (w *WorkspaceConnectionsServerTransport) Do(req *http.Request) (*http.Respo resp, err = w.dispatchNewListPager(req) case "WorkspaceConnectionsClient.ListSecrets": resp, err = w.dispatchListSecrets(req) + case "WorkspaceConnectionsClient.Update": + resp, err = w.dispatchUpdate(req) default: err = fmt.Errorf("unhandled API %s", method) } @@ -305,3 +312,50 @@ func (w *WorkspaceConnectionsServerTransport) dispatchListSecrets(req *http.Requ } return resp, nil } + +func (w *WorkspaceConnectionsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if w.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.MachineLearningServices/workspaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armmachinelearning.WorkspaceConnectionUpdateParameter](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + workspaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workspaceName")]) + if err != nil { + return nil, err + } + connectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionName")]) + if err != nil { + return nil, err + } + var options *armmachinelearning.WorkspaceConnectionsClientUpdateOptions + if !reflect.ValueOf(body).IsZero() { + options = &armmachinelearning.WorkspaceConnectionsClientUpdateOptions{ + Body: &body, + } + } + respr, errRespr := w.srv.Update(req.Context(), resourceGroupNameParam, workspaceNameParam, connectionNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkspaceConnectionPropertiesV2BasicResource, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/features_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/features_client.go index 77c41418a5b2..20a5666dcd63 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/features_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/features_client.go @@ -47,7 +47,7 @@ func NewFeaturesClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get feature. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - featuresetName - Feature set name. This is case-sensitive. @@ -108,7 +108,7 @@ func (client *FeaturesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +125,7 @@ func (client *FeaturesClient) getHandleResponse(resp *http.Response) (FeaturesCl // NewListPager - List Features. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - featuresetName - Featureset name. This is case-sensitive. @@ -185,7 +185,7 @@ func (client *FeaturesClient) listCreateRequest(ctx context.Context, resourceGro if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Description != nil { reqQP.Set("description", *options.Description) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/features_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/features_client_example_test.go deleted file mode 100644 index 1d0904393e1d..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/features_client_example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/list.json -func ExampleFeaturesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFeaturesClient().NewListPager("test-rg", "my-aml-workspace", "string", "string", &armmachinelearning.FeaturesClientListOptions{Skip: nil, - Tags: to.Ptr("string"), - FeatureName: to.Ptr("string"), - Description: to.Ptr("string"), - ListViewType: nil, - PageSize: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FeatureResourceArmPaginatedResult = armmachinelearning.FeatureResourceArmPaginatedResult{ - // Value: []*armmachinelearning.Feature{ - // { - // 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-01T11:44: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-01T11:44:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.FeatureProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // DataType: to.Ptr(armmachinelearning.FeatureDataTypeBoolean), - // FeatureName: to.Ptr("string"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/get.json -func ExampleFeaturesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFeaturesClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Feature = armmachinelearning.Feature{ - // 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-01T11:43: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-01T11:43:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.FeatureProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // DataType: to.Ptr(armmachinelearning.FeatureDataTypeFloat), - // FeatureName: to.Ptr("string"), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go index 25c2370e4936..b10487d11176 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go @@ -47,7 +47,7 @@ func NewFeaturesetContainersClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -75,7 +75,7 @@ func (client *FeaturesetContainersClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturesetContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FeaturesetContainersClient.BeginCreateOrUpdate" @@ -121,7 +121,7 @@ func (client *FeaturesetContainersClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,7 @@ func (client *FeaturesetContainersClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -160,7 +160,7 @@ func (client *FeaturesetContainersClient) BeginDelete(ctx context.Context, resou // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturesetContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FeaturesetContainersClient.BeginDelete" @@ -206,7 +206,7 @@ func (client *FeaturesetContainersClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *FeaturesetContainersClient) deleteCreateRequest(ctx context.Contex // GetEntity - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -267,7 +267,7 @@ func (client *FeaturesetContainersClient) getEntityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +284,7 @@ func (client *FeaturesetContainersClient) getEntityHandleResponse(resp *http.Res // NewListPager - List featurestore entity containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - FeaturesetContainersClientListOptions contains the optional parameters for the FeaturesetContainersClient.NewListPager @@ -335,7 +335,7 @@ func (client *FeaturesetContainersClient) listCreateRequest(ctx context.Context, if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.CreatedBy != nil { reqQP.Set("createdBy", *options.CreatedBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client_example_test.go deleted file mode 100644 index f96eb7c02d5f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client_example_test.go +++ /dev/null @@ -1,208 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/list.json -func ExampleFeaturesetContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFeaturesetContainersClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.FeaturesetContainersClientListOptions{Skip: nil, - Tags: to.Ptr("string"), - ListViewType: to.Ptr(armmachinelearning.ListViewTypeArchivedOnly), - PageSize: nil, - Name: nil, - Description: nil, - CreatedBy: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FeaturesetContainerResourceArmPaginatedResult = armmachinelearning.FeaturesetContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.FeaturesetContainer{ - // { - // 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-01T11:48:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:48:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.FeaturesetContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/delete.json -func ExampleFeaturesetContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturesetContainersClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/getEntity.json -func ExampleFeaturesetContainersClient_GetEntity() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFeaturesetContainersClient().GetEntity(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturesetContainer = armmachinelearning.FeaturesetContainer{ - // 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-01T11:45:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:45:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.FeaturesetContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/createOrUpdate.json -func ExampleFeaturesetContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturesetContainersClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.FeaturesetContainer{ - Properties: &armmachinelearning.FeaturesetContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsArchived: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturesetContainer = armmachinelearning.FeaturesetContainer{ - // 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-01T11:46: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-01T11:46:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // }, - // Properties: &armmachinelearning.FeaturesetContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go index 0e3e56aee6de..c455e33cd0c0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go @@ -47,7 +47,7 @@ func NewFeaturesetVersionsClient(subscriptionID string, credential azcore.TokenC // BeginBackfill - Backfill. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -76,7 +76,7 @@ func (client *FeaturesetVersionsClient) BeginBackfill(ctx context.Context, resou // Backfill - Backfill. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturesetVersionsClient) backfill(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*http.Response, error) { var err error const operationName = "FeaturesetVersionsClient.BeginBackfill" @@ -126,7 +126,7 @@ func (client *FeaturesetVersionsClient) backfillCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *FeaturesetVersionsClient) backfillCreateRequest(ctx context.Contex // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -167,7 +167,7 @@ func (client *FeaturesetVersionsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturesetVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FeaturesetVersionsClient.BeginCreateOrUpdate" @@ -217,7 +217,7 @@ func (client *FeaturesetVersionsClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -229,7 +229,7 @@ func (client *FeaturesetVersionsClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -257,7 +257,7 @@ func (client *FeaturesetVersionsClient) BeginDelete(ctx context.Context, resourc // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturesetVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FeaturesetVersionsClient.BeginDelete" @@ -307,7 +307,7 @@ func (client *FeaturesetVersionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,7 +316,7 @@ func (client *FeaturesetVersionsClient) deleteCreateRequest(ctx context.Context, // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -372,7 +372,7 @@ func (client *FeaturesetVersionsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -389,7 +389,7 @@ func (client *FeaturesetVersionsClient) getHandleResponse(resp *http.Response) ( // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Featureset name. This is case-sensitive. @@ -445,7 +445,7 @@ func (client *FeaturesetVersionsClient) listCreateRequest(ctx context.Context, r if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.CreatedBy != nil { reqQP.Set("createdBy", *options.CreatedBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client_example_test.go deleted file mode 100644 index d62cdabd33ac..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client_example_test.go +++ /dev/null @@ -1,414 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/list.json -func ExampleFeaturesetVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFeaturesetVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.FeaturesetVersionsClientListOptions{Skip: nil, - Tags: to.Ptr("string"), - ListViewType: to.Ptr(armmachinelearning.ListViewTypeAll), - PageSize: nil, - VersionName: nil, - Version: nil, - Description: nil, - CreatedBy: nil, - Stage: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FeaturesetVersionResourceArmPaginatedResult = armmachinelearning.FeaturesetVersionResourceArmPaginatedResult{ - // Value: []*armmachinelearning.FeaturesetVersion{ - // { - // 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-01T11:45: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-01T11:45:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.FeaturesetVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // Entities: []*string{ - // to.Ptr("string")}, - // MaterializationSettings: &armmachinelearning.MaterializationSettings{ - // Notification: &armmachinelearning.NotificationSetting{ - // EmailOn: []*armmachinelearning.EmailNotificationEnableType{ - // to.Ptr(armmachinelearning.EmailNotificationEnableTypeJobCompleted)}, - // Emails: []*string{ - // to.Ptr("string")}, - // }, - // Resource: &armmachinelearning.MaterializationComputeResource{ - // InstanceType: to.Ptr("string"), - // }, - // Schedule: &armmachinelearning.RecurrenceTrigger{ - // EndTime: to.Ptr("string"), - // StartTime: to.Ptr("string"), - // TimeZone: to.Ptr("string"), - // TriggerType: to.Ptr(armmachinelearning.TriggerTypeRecurrence), - // Frequency: to.Ptr(armmachinelearning.RecurrenceFrequencyMonth), - // Interval: to.Ptr[int32](1), - // Schedule: &armmachinelearning.RecurrenceSchedule{ - // Hours: []*int32{ - // to.Ptr[int32](1)}, - // Minutes: []*int32{ - // to.Ptr[int32](1)}, - // MonthDays: []*int32{ - // to.Ptr[int32](1)}, - // WeekDays: []*armmachinelearning.WeekDay{ - // to.Ptr(armmachinelearning.WeekDaySaturday)}, - // }, - // }, - // SparkConfiguration: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // StoreType: to.Ptr(armmachinelearning.MaterializationStoreTypeOffline), - // }, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // Specification: &armmachinelearning.FeaturesetSpecification{ - // Path: to.Ptr("string"), - // }, - // Stage: to.Ptr("string"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/delete.json -func ExampleFeaturesetVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturesetVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/get.json -func ExampleFeaturesetVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFeaturesetVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturesetVersion = armmachinelearning.FeaturesetVersion{ - // 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-01T11:42: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-01T11:42:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // }, - // Properties: &armmachinelearning.FeaturesetVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // Entities: []*string{ - // to.Ptr("string")}, - // MaterializationSettings: &armmachinelearning.MaterializationSettings{ - // Notification: &armmachinelearning.NotificationSetting{ - // EmailOn: []*armmachinelearning.EmailNotificationEnableType{ - // to.Ptr(armmachinelearning.EmailNotificationEnableTypeJobFailed)}, - // Emails: []*string{ - // to.Ptr("string")}, - // }, - // Resource: &armmachinelearning.MaterializationComputeResource{ - // InstanceType: to.Ptr("string"), - // }, - // Schedule: &armmachinelearning.RecurrenceTrigger{ - // EndTime: to.Ptr("string"), - // StartTime: to.Ptr("string"), - // TimeZone: to.Ptr("string"), - // TriggerType: to.Ptr(armmachinelearning.TriggerTypeRecurrence), - // Frequency: to.Ptr(armmachinelearning.RecurrenceFrequencyMinute), - // Interval: to.Ptr[int32](1), - // Schedule: &armmachinelearning.RecurrenceSchedule{ - // Hours: []*int32{ - // to.Ptr[int32](1)}, - // Minutes: []*int32{ - // to.Ptr[int32](1)}, - // MonthDays: []*int32{ - // to.Ptr[int32](1)}, - // WeekDays: []*armmachinelearning.WeekDay{ - // to.Ptr(armmachinelearning.WeekDayWednesday)}, - // }, - // }, - // SparkConfiguration: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // StoreType: to.Ptr(armmachinelearning.MaterializationStoreTypeNone), - // }, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // Specification: &armmachinelearning.FeaturesetSpecification{ - // Path: to.Ptr("string"), - // }, - // Stage: to.Ptr("string"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/createOrUpdate.json -func ExampleFeaturesetVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturesetVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.FeaturesetVersion{ - Properties: &armmachinelearning.FeaturesetVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - IsArchived: to.Ptr(false), - Entities: []*string{ - to.Ptr("string")}, - MaterializationSettings: &armmachinelearning.MaterializationSettings{ - Notification: &armmachinelearning.NotificationSetting{ - EmailOn: []*armmachinelearning.EmailNotificationEnableType{ - to.Ptr(armmachinelearning.EmailNotificationEnableTypeJobFailed)}, - Emails: []*string{ - to.Ptr("string")}, - }, - Resource: &armmachinelearning.MaterializationComputeResource{ - InstanceType: to.Ptr("string"), - }, - Schedule: &armmachinelearning.RecurrenceTrigger{ - EndTime: to.Ptr("string"), - StartTime: to.Ptr("string"), - TimeZone: to.Ptr("string"), - TriggerType: to.Ptr(armmachinelearning.TriggerTypeRecurrence), - Frequency: to.Ptr(armmachinelearning.RecurrenceFrequencyDay), - Interval: to.Ptr[int32](1), - Schedule: &armmachinelearning.RecurrenceSchedule{ - Hours: []*int32{ - to.Ptr[int32](1)}, - Minutes: []*int32{ - to.Ptr[int32](1)}, - MonthDays: []*int32{ - to.Ptr[int32](1)}, - WeekDays: []*armmachinelearning.WeekDay{ - to.Ptr(armmachinelearning.WeekDayMonday)}, - }, - }, - SparkConfiguration: map[string]*string{ - "string": to.Ptr("string"), - }, - StoreType: to.Ptr(armmachinelearning.MaterializationStoreTypeOnline), - }, - Specification: &armmachinelearning.FeaturesetSpecification{ - Path: to.Ptr("string"), - }, - Stage: to.Ptr("string"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturesetVersion = armmachinelearning.FeaturesetVersion{ - // 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-01T11:42:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:42:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.FeaturesetVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // Entities: []*string{ - // to.Ptr("string")}, - // MaterializationSettings: &armmachinelearning.MaterializationSettings{ - // Notification: &armmachinelearning.NotificationSetting{ - // EmailOn: []*armmachinelearning.EmailNotificationEnableType{ - // to.Ptr(armmachinelearning.EmailNotificationEnableTypeJobFailed)}, - // Emails: []*string{ - // to.Ptr("string")}, - // }, - // Resource: &armmachinelearning.MaterializationComputeResource{ - // InstanceType: to.Ptr("string"), - // }, - // Schedule: &armmachinelearning.RecurrenceTrigger{ - // EndTime: to.Ptr("string"), - // StartTime: to.Ptr("string"), - // TimeZone: to.Ptr("string"), - // TriggerType: to.Ptr(armmachinelearning.TriggerTypeRecurrence), - // Frequency: to.Ptr(armmachinelearning.RecurrenceFrequencyDay), - // Interval: to.Ptr[int32](1), - // Schedule: &armmachinelearning.RecurrenceSchedule{ - // Hours: []*int32{ - // to.Ptr[int32](1)}, - // Minutes: []*int32{ - // to.Ptr[int32](1)}, - // MonthDays: []*int32{ - // to.Ptr[int32](1)}, - // WeekDays: []*armmachinelearning.WeekDay{ - // to.Ptr(armmachinelearning.WeekDayWednesday)}, - // }, - // }, - // SparkConfiguration: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // StoreType: to.Ptr(armmachinelearning.MaterializationStoreTypeOnlineAndOffline), - // }, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // Specification: &armmachinelearning.FeaturesetSpecification{ - // Path: to.Ptr("string"), - // }, - // Stage: to.Ptr("string"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/backfill.json -func ExampleFeaturesetVersionsClient_BeginBackfill() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturesetVersionsClient().BeginBackfill(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.FeaturesetVersionBackfillRequest{ - Description: to.Ptr("string"), - DataAvailabilityStatus: []*armmachinelearning.DataAvailabilityStatus{ - to.Ptr(armmachinelearning.DataAvailabilityStatusNone)}, - DisplayName: to.Ptr("string"), - FeatureWindow: &armmachinelearning.FeatureWindow{ - FeatureWindowEnd: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:43:56.999Z"); return t }()), - FeatureWindowStart: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:43:56.999Z"); return t }()), - }, - JobID: to.Ptr("string"), - Resource: &armmachinelearning.MaterializationComputeResource{ - InstanceType: to.Ptr("string"), - }, - SparkConfiguration: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturesetVersionBackfillResponse = armmachinelearning.FeaturesetVersionBackfillResponse{ - // JobIDs: []*string{ - // to.Ptr("string"), - // to.Ptr("string")}, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go index a009ebc715e8..a355e3b30eee 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go @@ -47,7 +47,7 @@ func NewFeaturestoreEntityContainersClient(subscriptionID string, credential azc // BeginCreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -75,7 +75,7 @@ func (client *FeaturestoreEntityContainersClient) BeginCreateOrUpdate(ctx contex // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturestoreEntityContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FeaturestoreEntityContainersClient.BeginCreateOrUpdate" @@ -121,7 +121,7 @@ func (client *FeaturestoreEntityContainersClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,7 @@ func (client *FeaturestoreEntityContainersClient) createOrUpdateCreateRequest(ct // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -160,7 +160,7 @@ func (client *FeaturestoreEntityContainersClient) BeginDelete(ctx context.Contex // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturestoreEntityContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FeaturestoreEntityContainersClient.BeginDelete" @@ -206,7 +206,7 @@ func (client *FeaturestoreEntityContainersClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *FeaturestoreEntityContainersClient) deleteCreateRequest(ctx contex // GetEntity - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -267,7 +267,7 @@ func (client *FeaturestoreEntityContainersClient) getEntityCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +284,7 @@ func (client *FeaturestoreEntityContainersClient) getEntityHandleResponse(resp * // NewListPager - List featurestore entity containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - FeaturestoreEntityContainersClientListOptions contains the optional parameters for the FeaturestoreEntityContainersClient.NewListPager @@ -335,7 +335,7 @@ func (client *FeaturestoreEntityContainersClient) listCreateRequest(ctx context. if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.CreatedBy != nil { reqQP.Set("createdBy", *options.CreatedBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client_example_test.go deleted file mode 100644 index 9b64624c38d4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client_example_test.go +++ /dev/null @@ -1,208 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/list.json -func ExampleFeaturestoreEntityContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFeaturestoreEntityContainersClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.FeaturestoreEntityContainersClientListOptions{Skip: nil, - Tags: to.Ptr("string"), - ListViewType: to.Ptr(armmachinelearning.ListViewTypeAll), - PageSize: nil, - Name: nil, - Description: nil, - CreatedBy: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FeaturestoreEntityContainerResourceArmPaginatedResult = armmachinelearning.FeaturestoreEntityContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.FeaturestoreEntityContainer{ - // { - // 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-01T11:51:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:51:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/delete.json -func ExampleFeaturestoreEntityContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturestoreEntityContainersClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json -func ExampleFeaturestoreEntityContainersClient_GetEntity() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFeaturestoreEntityContainersClient().GetEntity(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturestoreEntityContainer = armmachinelearning.FeaturestoreEntityContainer{ - // 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-01T11:51:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:51:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json -func ExampleFeaturestoreEntityContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturestoreEntityContainersClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.FeaturestoreEntityContainer{ - Properties: &armmachinelearning.FeaturestoreEntityContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsArchived: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturestoreEntityContainer = armmachinelearning.FeaturestoreEntityContainer{ - // 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-01T11:56:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:56:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go index 80cec4025705..896dfbb0e7af 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go @@ -47,7 +47,7 @@ func NewFeaturestoreEntityVersionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -76,7 +76,7 @@ func (client *FeaturestoreEntityVersionsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturestoreEntityVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FeaturestoreEntityVersionsClient.BeginCreateOrUpdate" @@ -126,7 +126,7 @@ func (client *FeaturestoreEntityVersionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *FeaturestoreEntityVersionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -166,7 +166,7 @@ func (client *FeaturestoreEntityVersionsClient) BeginDelete(ctx context.Context, // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *FeaturestoreEntityVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FeaturestoreEntityVersionsClient.BeginDelete" @@ -216,7 +216,7 @@ func (client *FeaturestoreEntityVersionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *FeaturestoreEntityVersionsClient) deleteCreateRequest(ctx context. // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -282,7 +282,7 @@ func (client *FeaturestoreEntityVersionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +299,7 @@ func (client *FeaturestoreEntityVersionsClient) getHandleResponse(resp *http.Res // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Feature entity name. This is case-sensitive. @@ -355,7 +355,7 @@ func (client *FeaturestoreEntityVersionsClient) listCreateRequest(ctx context.Co if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.CreatedBy != nil { reqQP.Set("createdBy", *options.CreatedBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client_example_test.go deleted file mode 100644 index 5bc96a8cfdd1..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client_example_test.go +++ /dev/null @@ -1,228 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/list.json -func ExampleFeaturestoreEntityVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFeaturestoreEntityVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.FeaturestoreEntityVersionsClientListOptions{Skip: nil, - Tags: to.Ptr("string"), - ListViewType: to.Ptr(armmachinelearning.ListViewTypeActiveOnly), - PageSize: nil, - VersionName: nil, - Version: nil, - Description: nil, - CreatedBy: nil, - Stage: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FeaturestoreEntityVersionResourceArmPaginatedResult = armmachinelearning.FeaturestoreEntityVersionResourceArmPaginatedResult{ - // Value: []*armmachinelearning.FeaturestoreEntityVersion{ - // { - // 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-01T11:39:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:39:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // IndexColumns: []*armmachinelearning.IndexColumn{ - // { - // ColumnName: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.FeatureDataTypeDatetime), - // }}, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/delete.json -func ExampleFeaturestoreEntityVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturestoreEntityVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/get.json -func ExampleFeaturestoreEntityVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFeaturestoreEntityVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturestoreEntityVersion = armmachinelearning.FeaturestoreEntityVersion{ - // 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-01T11:37: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-01T11:37:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // IndexColumns: []*armmachinelearning.IndexColumn{ - // { - // ColumnName: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.FeatureDataTypeDatetime), - // }}, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json -func ExampleFeaturestoreEntityVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFeaturestoreEntityVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.FeaturestoreEntityVersion{ - Properties: &armmachinelearning.FeaturestoreEntityVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - IsArchived: to.Ptr(false), - IndexColumns: []*armmachinelearning.IndexColumn{ - { - ColumnName: to.Ptr("string"), - DataType: to.Ptr(armmachinelearning.FeatureDataTypeDatetime), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FeaturestoreEntityVersion = armmachinelearning.FeaturestoreEntityVersion{ - // 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-01T11:36:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T11:36:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.FeaturestoreEntityVersionProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // IndexColumns: []*armmachinelearning.IndexColumn{ - // { - // ColumnName: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.FeatureDataTypeInteger), - // }}, - // ProvisioningState: to.Ptr(armmachinelearning.AssetProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod index d7cb9b23a6a7..57b4e954a13f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/arm go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - golang.org/x/crypto v0.25.0 // indirect golang.org/x/net v0.27.0 // indirect - golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect ) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum b/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum index 09d275cb9a37..917448a001b7 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum @@ -1,29 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go index 36dd2ca931f3..51bf5ecdeaeb 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go @@ -46,7 +46,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -72,7 +72,7 @@ func (client *JobsClient) BeginCancel(ctx context.Context, resourceGroupName str // Cancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *JobsClient) cancel(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginCancelOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginCancel" @@ -118,7 +118,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -128,7 +128,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup // the existing job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -180,7 +180,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -201,7 +201,7 @@ func (client *JobsClient) createOrUpdateHandleResponse(resp *http.Response) (Job // BeginDelete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -227,7 +227,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginDelete" @@ -273,7 +273,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Gets a Job by name/id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - id - The name and identifier for the Job. This is case-sensitive. @@ -333,7 +333,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // NewListPager - Lists Jobs in the workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. @@ -400,7 +400,7 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.JobType != nil { reqQP.Set("jobType", *options.JobType) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go deleted file mode 100644 index b51fb0553dd4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go +++ /dev/null @@ -1,1504 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, - JobType: nil, - Tag: nil, - ListViewType: nil, - Properties: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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)"), - // }}, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, - JobType: to.Ptr("string"), - Tag: to.Ptr("string"), - ListViewType: nil, - Properties: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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, - // }, - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, - JobType: to.Ptr("string"), - Tag: to.Ptr("string"), - ListViewType: nil, - Properties: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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{ - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil, - JobType: to.Ptr("string"), - Tag: to.Ptr("string"), - ListViewType: nil, - Properties: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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, - // }, - // }, - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJobsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "http://subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/my-favorite-aml-job", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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)"), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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, - // }, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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{ - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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, - // }, - // }, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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": { - Endpoint: to.Ptr("string"), - JobServiceType: to.Ptr("string"), - Port: to.Ptr[int32](1), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - 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)"), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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)"), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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": { - Endpoint: to.Ptr("string"), - JobServiceType: to.Ptr("string"), - Port: to.Ptr[int32](1), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - 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), - }, - }, - 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, - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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, - // }, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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": { - Endpoint: to.Ptr("string"), - JobServiceType: to.Ptr("string"), - Port: to.Ptr[int32](1), - Properties: 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"), - }, - }, - 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{}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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{ - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "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": { - Endpoint: to.Ptr("string"), - JobServiceType: to.Ptr("string"), - Port: to.Ptr[int32](1), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - 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, - }, - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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, - // }, - // }, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client.go index 7b556752868b..bcbc772eee1c 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client.go @@ -46,7 +46,7 @@ func NewManagedNetworkProvisionsClient(subscriptionID string, credential azcore. // BeginProvisionManagedNetwork - Provisions the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions contains the optional parameters for the ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork @@ -72,7 +72,7 @@ func (client *ManagedNetworkProvisionsClient) BeginProvisionManagedNetwork(ctx c // ProvisionManagedNetwork - Provisions the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ManagedNetworkProvisionsClient) provisionManagedNetwork(ctx context.Context, resourceGroupName string, workspaceName string, options *ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions) (*http.Response, error) { var err error const operationName = "ManagedNetworkProvisionsClient.BeginProvisionManagedNetwork" @@ -114,7 +114,7 @@ func (client *ManagedNetworkProvisionsClient) provisionManagedNetworkCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Body != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client_example_test.go deleted file mode 100644 index 4e36b1978019..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworkprovisions_client_example_test.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/provision.json -func ExampleManagedNetworkProvisionsClient_BeginProvisionManagedNetwork() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedNetworkProvisionsClient().BeginProvisionManagedNetwork(ctx, "test-rg", "aml-workspace-name", &armmachinelearning.ManagedNetworkProvisionsClientBeginProvisionManagedNetworkOptions{Body: &armmachinelearning.ManagedNetworkProvisionOptions{ - IncludeSpark: to.Ptr(false), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagedNetworkProvisionStatus = armmachinelearning.ManagedNetworkProvisionStatus{ - // SparkReady: to.Ptr(true), - // Status: to.Ptr(armmachinelearning.ManagedNetworkStatusActive), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client.go index 47a884cdd880..059ce77c1b16 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client.go @@ -46,7 +46,7 @@ func NewManagedNetworkSettingsRuleClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Creates or updates an outbound rule in the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - ruleName - Name of the workspace managed network outbound rule @@ -74,7 +74,7 @@ func (client *ManagedNetworkSettingsRuleClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Creates or updates an outbound rule in the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ManagedNetworkSettingsRuleClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, body OutboundRuleBasicResource, options *ManagedNetworkSettingsRuleClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedNetworkSettingsRuleClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *ManagedNetworkSettingsRuleClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *ManagedNetworkSettingsRuleClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes an outbound rule from the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - ruleName - Name of the workspace managed network outbound rule @@ -158,7 +158,7 @@ func (client *ManagedNetworkSettingsRuleClient) BeginDelete(ctx context.Context, // Delete - Deletes an outbound rule from the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ManagedNetworkSettingsRuleClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *ManagedNetworkSettingsRuleClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedNetworkSettingsRuleClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *ManagedNetworkSettingsRuleClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *ManagedNetworkSettingsRuleClient) deleteCreateRequest(ctx context. // Get - Gets an outbound rule from the managed network of a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - ruleName - Name of the workspace managed network outbound rule @@ -265,7 +265,7 @@ func (client *ManagedNetworkSettingsRuleClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *ManagedNetworkSettingsRuleClient) getHandleResponse(resp *http.Res // NewListPager - Lists the managed network outbound rules for a machine learning workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ManagedNetworkSettingsRuleClientListOptions contains the optional parameters for the ManagedNetworkSettingsRuleClient.NewListPager @@ -330,7 +330,7 @@ func (client *ManagedNetworkSettingsRuleClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client_example_test.go deleted file mode 100644 index 2d48d0a5e183..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/managednetworksettingsrule_client_example_test.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/listRule.json -func ExampleManagedNetworkSettingsRuleClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedNetworkSettingsRuleClient().NewListPager("test-rg", "aml-workspace-name", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OutboundRuleListResult = armmachinelearning.OutboundRuleListResult{ - // Value: []*armmachinelearning.OutboundRuleBasicResource{ - // { - // Name: to.Ptr("rule_name_1"), - // Type: to.Ptr("workspace/outboundRules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/outboundRules/rule_name_1"), - // Properties: &armmachinelearning.FqdnOutboundRule{ - // Type: to.Ptr(armmachinelearning.RuleTypeFQDN), - // Category: to.Ptr(armmachinelearning.RuleCategoryRequired), - // Status: to.Ptr(armmachinelearning.RuleStatusInactive), - // Destination: to.Ptr("destination_of_the_fqdn_rule"), - // }, - // }, - // { - // Name: to.Ptr("rule_name_2"), - // Type: to.Ptr("workspace/outboundRules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/outboundRules/rule_name_2"), - // Properties: &armmachinelearning.FqdnOutboundRule{ - // Type: to.Ptr(armmachinelearning.RuleTypeFQDN), - // Category: to.Ptr(armmachinelearning.RuleCategoryRequired), - // Status: to.Ptr(armmachinelearning.RuleStatusInactive), - // Destination: to.Ptr("destination_of_the_fqdn_rule"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/deleteRule.json -func ExampleManagedNetworkSettingsRuleClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedNetworkSettingsRuleClient().BeginDelete(ctx, "test-rg", "aml-workspace-name", "rule-name", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/getRule.json -func ExampleManagedNetworkSettingsRuleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedNetworkSettingsRuleClient().Get(ctx, "test-rg", "aml-workspace-name", "name_of_the_fqdn_rule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.OutboundRuleBasicResource = armmachinelearning.OutboundRuleBasicResource{ - // Name: to.Ptr("rule_name_1"), - // Type: to.Ptr("workspace/outboundRules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/outboundRules/rule_name_1"), - // Properties: &armmachinelearning.FqdnOutboundRule{ - // Type: to.Ptr(armmachinelearning.RuleTypeFQDN), - // Category: to.Ptr(armmachinelearning.RuleCategoryUserDefined), - // Status: to.Ptr(armmachinelearning.RuleStatusActive), - // Destination: to.Ptr("destination_of_the_fqdn_rule"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/createOrUpdateRule.json -func ExampleManagedNetworkSettingsRuleClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedNetworkSettingsRuleClient().BeginCreateOrUpdate(ctx, "test-rg", "aml-workspace-name", "rule_name_1", armmachinelearning.OutboundRuleBasicResource{ - Properties: &armmachinelearning.FqdnOutboundRule{ - Type: to.Ptr(armmachinelearning.RuleTypeFQDN), - Category: to.Ptr(armmachinelearning.RuleCategoryUserDefined), - Status: to.Ptr(armmachinelearning.RuleStatusActive), - Destination: to.Ptr("destination_endpoint"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.OutboundRuleBasicResource = armmachinelearning.OutboundRuleBasicResource{ - // Name: to.Ptr("rule_name_1"), - // Type: to.Ptr("workspace/outboundRules"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/outboundRules/rule_name_1"), - // Properties: &armmachinelearning.FqdnOutboundRule{ - // Type: to.Ptr(armmachinelearning.RuleTypeFQDN), - // Category: to.Ptr(armmachinelearning.RuleCategoryUserDefined), - // Status: to.Ptr(armmachinelearning.RuleStatusActive), - // Destination: to.Ptr("destination_endpoint"), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client.go index 90abe2d5d81e..66f76103e9d4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client.go @@ -46,7 +46,7 @@ func NewMarketplaceSubscriptionsClient(subscriptionID string, credential azcore. // BeginCreateOrUpdate - Create or update Marketplace Subscription (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Marketplace Subscription name. @@ -74,7 +74,7 @@ func (client *MarketplaceSubscriptionsClient) BeginCreateOrUpdate(ctx context.Co // CreateOrUpdate - Create or update Marketplace Subscription (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *MarketplaceSubscriptionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body MarketplaceSubscription, options *MarketplaceSubscriptionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "MarketplaceSubscriptionsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *MarketplaceSubscriptionsClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *MarketplaceSubscriptionsClient) createOrUpdateCreateRequest(ctx co // BeginDelete - Delete Marketplace Subscription (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Marketplace Subscription name. @@ -159,7 +159,7 @@ func (client *MarketplaceSubscriptionsClient) BeginDelete(ctx context.Context, r // Delete - Delete Marketplace Subscription (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *MarketplaceSubscriptionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *MarketplaceSubscriptionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "MarketplaceSubscriptionsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *MarketplaceSubscriptionsClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *MarketplaceSubscriptionsClient) deleteCreateRequest(ctx context.Co // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -266,7 +266,7 @@ func (client *MarketplaceSubscriptionsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *MarketplaceSubscriptionsClient) getHandleResponse(resp *http.Respo // NewListPager - List containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - MarketplaceSubscriptionsClientListOptions contains the optional parameters for the MarketplaceSubscriptionsClient.NewListPager @@ -334,7 +334,7 @@ func (client *MarketplaceSubscriptionsClient) listCreateRequest(ctx context.Cont if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client_example_test.go deleted file mode 100644 index 65f6cbcb7d3a..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/marketplacesubscriptions_client_example_test.go +++ /dev/null @@ -1,185 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/list.json -func ExampleMarketplaceSubscriptionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMarketplaceSubscriptionsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.MarketplaceSubscriptionsClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.MarketplaceSubscriptionResourceArmPaginatedResult = armmachinelearning.MarketplaceSubscriptionResourceArmPaginatedResult{ - // Value: []*armmachinelearning.MarketplaceSubscription{ - // { - // 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:28:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:28:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.MarketplaceSubscriptionProperties{ - // MarketplacePlan: &armmachinelearning.MarketplacePlan{ - // OfferID: to.Ptr("string"), - // PlanID: to.Ptr("string"), - // PublisherID: to.Ptr("string"), - // }, - // MarketplaceSubscriptionStatus: to.Ptr(armmachinelearning.MarketplaceSubscriptionStatusSuspended), - // ModelID: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.MarketplaceSubscriptionProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/delete.json -func ExampleMarketplaceSubscriptionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMarketplaceSubscriptionsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/get.json -func ExampleMarketplaceSubscriptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMarketplaceSubscriptionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MarketplaceSubscription = armmachinelearning.MarketplaceSubscription{ - // 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:26: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:26:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.MarketplaceSubscriptionProperties{ - // MarketplacePlan: &armmachinelearning.MarketplacePlan{ - // OfferID: to.Ptr("string"), - // PlanID: to.Ptr("string"), - // PublisherID: to.Ptr("string"), - // }, - // MarketplaceSubscriptionStatus: to.Ptr(armmachinelearning.MarketplaceSubscriptionStatusSubscribed), - // ModelID: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.MarketplaceSubscriptionProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/createOrUpdate.json -func ExampleMarketplaceSubscriptionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMarketplaceSubscriptionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.MarketplaceSubscription{ - Properties: &armmachinelearning.MarketplaceSubscriptionProperties{ - ModelID: to.Ptr("string"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MarketplaceSubscription = armmachinelearning.MarketplaceSubscription{ - // 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:26: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:26:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.MarketplaceSubscriptionProperties{ - // MarketplacePlan: &armmachinelearning.MarketplacePlan{ - // OfferID: to.Ptr("string"), - // PlanID: to.Ptr("string"), - // PublisherID: to.Ptr("string"), - // }, - // MarketplaceSubscriptionStatus: to.Ptr(armmachinelearning.MarketplaceSubscriptionStatusSuspended), - // ModelID: to.Ptr("string"), - // ProvisioningState: to.Ptr(armmachinelearning.MarketplaceSubscriptionProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go index e3f2bb752173..9db44e25cbc6 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go @@ -47,7 +47,7 @@ func NewModelContainersClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -100,7 +100,7 @@ func (client *ModelContainersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -121,7 +121,7 @@ func (client *ModelContainersClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -171,7 +171,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -231,7 +231,7 @@ func (client *ModelContainersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +248,7 @@ func (client *ModelContainersClient) getHandleResponse(resp *http.Response) (Mod // NewListPager - List model containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.NewListPager @@ -299,7 +299,7 @@ func (client *ModelContainersClient) listCreateRequest(ctx context.Context, reso if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go deleted file mode 100644 index c31b9c88bb0d..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go +++ /dev/null @@ -1,175 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewModelContainersClient().NewListPager("testrg123", "workspace123", &armmachinelearning.ModelContainersClientListOptions{Skip: nil, - Count: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewModelContainersClient().Delete(ctx, "testrg123", "workspace123", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewModelContainersClient().Get(ctx, "testrg123", "workspace123", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewModelContainersClient().CreateOrUpdate(ctx, "testrg123", "workspace123", "testContainer", armmachinelearning.ModelContainer{ - Properties: &armmachinelearning.ModelContainerProperties{ - Description: to.Ptr("Model container description"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/models.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go index eeb3df76511b..1eb250802ba6 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/models.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go @@ -10554,6 +10554,12 @@ type WorkspaceConnectionSharedAccessSignature struct { Sas *string } +// WorkspaceConnectionUpdateParameter - The properties that the machine learning workspace connection will be updated with. +type WorkspaceConnectionUpdateParameter struct { + // The properties that the machine learning workspace connection will be updated with. + Properties WorkspaceConnectionPropertiesV2Classification +} + type WorkspaceConnectionUsernamePassword struct { Password *string diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go index 7ddbe4061348..861eb38794f8 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go @@ -22105,6 +22105,33 @@ func (w *WorkspaceConnectionSharedAccessSignature) UnmarshalJSON(data []byte) er return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionUpdateParameter. +func (w WorkspaceConnectionUpdateParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", w.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionUpdateParameter. +func (w *WorkspaceConnectionUpdateParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + w.Properties, err = unmarshalWorkspaceConnectionPropertiesV2Classification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionUsernamePassword. func (w WorkspaceConnectionUsernamePassword) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go index b51782211a47..4e7b6f00c5ec 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go @@ -47,7 +47,7 @@ func NewModelVersionsClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *ModelVersionsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *ModelVersionsClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -181,7 +181,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. This is case-sensitive. @@ -246,7 +246,7 @@ func (client *ModelVersionsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *ModelVersionsClient) getHandleResponse(resp *http.Response) (Model // NewListPager - List model versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Model name. This is case-sensitive. @@ -324,7 +324,7 @@ func (client *ModelVersionsClient) listCreateRequest(ctx context.Context, resour if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Description != nil { reqQP.Set("description", *options.Description) } @@ -363,7 +363,7 @@ func (client *ModelVersionsClient) listHandleResponse(resp *http.Response) (Mode // BeginPublish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Container name. @@ -392,7 +392,7 @@ func (client *ModelVersionsClient) BeginPublish(ctx context.Context, resourceGro // Publish - Publish version asset into registry. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ModelVersionsClient) publish(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DestinationAsset, options *ModelVersionsClientBeginPublishOptions) (*http.Response, error) { var err error const operationName = "ModelVersionsClient.BeginPublish" @@ -442,7 +442,7 @@ func (client *ModelVersionsClient) publishCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_test.go deleted file mode 100644 index a9105138aed4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_test.go +++ /dev/null @@ -1,255 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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"), - Description: to.Ptr("string"), - Offset: to.Ptr[int32](1), - Tags: to.Ptr("string"), - Properties: to.Ptr("string"), - Feed: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - Flavors: map[string]*armmachinelearning.FlavorData{ - "string": { - Data: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - ModelType: to.Ptr("CustomModel"), - ModelURI: to.Ptr("string"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/publish.json -func ExampleModelVersionsClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewModelVersionsClient().BeginPublish(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.DestinationAsset{ - DestinationName: to.Ptr("string"), - DestinationVersion: to.Ptr("string"), - RegistryName: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go index 1e74b36ebd51..fee31d31d807 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go @@ -47,7 +47,7 @@ func NewOnlineDeploymentsClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -76,7 +76,7 @@ func (client *OnlineDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body OnlineDeployment, options *OnlineDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginCreateOrUpdate" @@ -126,7 +126,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -166,7 +166,7 @@ func (client *OnlineDeploymentsClient) BeginDelete(ctx context.Context, resource // Delete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginDelete" @@ -216,7 +216,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, // Get - Get Inference Deployment Deployment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -281,7 +281,7 @@ func (client *OnlineDeploymentsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +299,7 @@ func (client *OnlineDeploymentsClient) getHandleResponse(resp *http.Response) (O // GetLogs - Polls an Endpoint operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -357,7 +357,7 @@ func (client *OnlineDeploymentsClient) getLogsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -377,7 +377,7 @@ func (client *OnlineDeploymentsClient) getLogsHandleResponse(resp *http.Response // NewListPager - List Inference Endpoint Deployments. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -439,7 +439,7 @@ func (client *OnlineDeploymentsClient) listCreateRequest(ctx context.Context, re if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -456,7 +456,7 @@ func (client *OnlineDeploymentsClient) listHandleResponse(resp *http.Response) ( // NewListSKUsPager - List Inference Endpoint Deployment Skus. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Inference endpoint name. @@ -517,7 +517,7 @@ func (client *OnlineDeploymentsClient) listSKUsCreateRequest(ctx context.Context if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -538,7 +538,7 @@ func (client *OnlineDeploymentsClient) listSKUsHandleResponse(resp *http.Respons // BeginUpdate - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -566,7 +566,7 @@ func (client *OnlineDeploymentsClient) BeginUpdate(ctx context.Context, resource // Update - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialMinimalTrackedResourceWithSKU, options *OnlineDeploymentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineDeploymentsClient.BeginUpdate" @@ -616,7 +616,7 @@ func (client *OnlineDeploymentsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go deleted file mode 100644 index b722ce245a87..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go +++ /dev/null @@ -1,1017 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewOnlineDeploymentsClient().BeginDelete(ctx, "testrg123", "workspace123", "testEndpoint", "testDeployment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - 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"), - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - 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"), - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOnlineDeploymentsClient().NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOnlineDeploymentsClient().NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{Count: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go index c87b7ef7a88b..aad2acde948f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go @@ -47,7 +47,7 @@ func NewOnlineEndpointsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -75,7 +75,7 @@ func (client *OnlineEndpointsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body OnlineEndpoint, options *OnlineEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginCreateOrUpdate" @@ -121,7 +121,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -133,7 +133,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -160,7 +160,7 @@ func (client *OnlineEndpointsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginDelete" @@ -206,7 +206,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -215,7 +215,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re // Get - Get Online Endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -266,7 +266,7 @@ func (client *OnlineEndpointsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +284,7 @@ func (client *OnlineEndpointsClient) getHandleResponse(resp *http.Response) (Onl // GetToken - Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -336,7 +336,7 @@ func (client *OnlineEndpointsClient) getTokenCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,7 +353,7 @@ func (client *OnlineEndpointsClient) getTokenHandleResponse(resp *http.Response) // NewListPager - List Online Endpoints. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.NewListPager @@ -404,7 +404,7 @@ func (client *OnlineEndpointsClient) listCreateRequest(ctx context.Context, reso if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ComputeType != nil { reqQP.Set("computeType", string(*options.ComputeType)) } @@ -440,7 +440,7 @@ func (client *OnlineEndpointsClient) listHandleResponse(resp *http.Response) (On // ListKeys - List EndpointAuthKeys for an Endpoint using Key-based authentication. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -492,7 +492,7 @@ func (client *OnlineEndpointsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -510,7 +510,7 @@ func (client *OnlineEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginRegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -538,7 +538,7 @@ func (client *OnlineEndpointsClient) BeginRegenerateKeys(ctx context.Context, re // RegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineEndpointsClient) regenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body RegenerateEndpointKeysRequest, options *OnlineEndpointsClientBeginRegenerateKeysOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginRegenerateKeys" @@ -584,7 +584,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -596,7 +596,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con // BeginUpdate - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - endpointName - Online Endpoint name. @@ -623,7 +623,7 @@ func (client *OnlineEndpointsClient) BeginUpdate(ctx context.Context, resourceGr // Update - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *OnlineEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *OnlineEndpointsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "OnlineEndpointsClient.BeginUpdate" @@ -669,7 +669,7 @@ func (client *OnlineEndpointsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go deleted file mode 100644 index 450d588b9943..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go +++ /dev/null @@ -1,449 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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, - Tags: to.Ptr("string"), - Properties: to.Ptr("string"), - OrderBy: to.Ptr(armmachinelearning.OrderStringCreatedAtDesc), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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]any{ - "string": map[string]any{}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.OnlineEndpointProperties{ - Description: to.Ptr("string"), - AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Compute: to.Ptr("string"), - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewOnlineEndpointsClient().BeginRegenerateKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.RegenerateEndpointKeysRequest{ - KeyType: to.Ptr(armmachinelearning.KeyTypePrimary), - KeyValue: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go index cf3c1b62a866..aea8acae6d86 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Azure Machine Learning Workspaces REST API operations. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_test.go deleted file mode 100644 index 02820996a0f5..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_test.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armmachinelearning.OperationListResult{ - // Value: []*armmachinelearning.Operation{ - // { - // Name: to.Ptr("Microsoft.MachineLearningServices/workspaces/write"), - // Display: &armmachinelearning.OperationDisplay{ - // 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.OperationDisplay{ - // 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.OperationDisplay{ - // Operation: to.Ptr("List workspace Keys"), - // Provider: to.Ptr("Microsoft MachineLearningServices"), - // Resource: to.Ptr("workspaces"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/options.go b/sdk/resourcemanager/machinelearning/armmachinelearning/options.go index f12aeacdbcd2..a1fd86eb5efd 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/options.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/options.go @@ -1526,6 +1526,12 @@ type WorkspaceConnectionsClientListSecretsOptions struct { // placeholder for future optional parameters } +// WorkspaceConnectionsClientUpdateOptions contains the optional parameters for the WorkspaceConnectionsClient.Update method. +type WorkspaceConnectionsClientUpdateOptions struct { + // Parameters for workspace connection update. + Body *WorkspaceConnectionUpdateParameter +} + // WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.NewListPager method. type WorkspaceFeaturesClientListOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go index f648537a5dfb..dfd0a6939ee4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go @@ -46,7 +46,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // CreateOrUpdate - Update the state of specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -99,7 +99,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { @@ -120,7 +120,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateHandleResponse(res // Delete - Deletes the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -171,7 +171,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -232,7 +232,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - List all the private endpoint connections associated with the workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager @@ -298,7 +298,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go deleted file mode 100644 index 87b016c883ae..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,175 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("rg-1234", "testworkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionListResult = 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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "rg-1234", "testworkspace", "{privateEndpointConnectionName}", armmachinelearning.PrivateEndpointConnection{ - Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Auto-Approved"), - Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, 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/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go index fd91b553d549..1fa8b6782d88 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go @@ -46,7 +46,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // List - Gets the private link resources that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List @@ -93,7 +93,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go deleted file mode 100644 index 32a4653b6311..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "rg-1234", "testworkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourceListResult = 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/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go index a284a957e055..b26cb1bcddf2 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go @@ -45,7 +45,7 @@ func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets the currently assigned Workspace Quotas based on VMFamily. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - location - The location for which resource usage is queried. // - options - QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. func (client *QuotasClient) NewListPager(location string, options *QuotasClientListOptions) *runtime.Pager[QuotasClientListResponse] { @@ -87,7 +87,7 @@ func (client *QuotasClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,7 +105,7 @@ func (client *QuotasClient) listHandleResponse(resp *http.Response) (QuotasClien // Update - Update quota for each VM family in workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - location - The location for update quota is queried. // - parameters - Quota update parameters. // - options - QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. @@ -147,7 +147,7 @@ func (client *QuotasClient) updateCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go deleted file mode 100644 index 4cff26a89308..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go +++ /dev/null @@ -1,498 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQuotasClient().Update(ctx, "eastus", armmachinelearning.QuotaUpdateParameters{ - Value: []*armmachinelearning.QuotaBaseProperties{ - { - 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), - 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), - Unit: to.Ptr(armmachinelearning.QuotaUnitCount), - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewQuotasClient().NewListPager("eastus", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go index cb1375b47edb..db0a102f51be 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go @@ -46,7 +46,7 @@ func NewRegistriesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Create or update registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - body - Details required to create the registry. @@ -73,7 +73,7 @@ func (client *RegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Create or update registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistriesClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *RegistriesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -127,7 +127,7 @@ func (client *RegistriesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. @@ -152,7 +152,7 @@ func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Delete registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistriesClient.BeginDelete" @@ -194,7 +194,7 @@ func (client *RegistriesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +203,7 @@ func (client *RegistriesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. @@ -249,7 +249,7 @@ func (client *RegistriesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +266,7 @@ func (client *RegistriesClient) getHandleResponse(resp *http.Response) (Registri // NewListPager - List registries // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method. func (client *RegistriesClient) NewListPager(resourceGroupName string, options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse] { @@ -308,7 +308,7 @@ func (client *RegistriesClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +325,7 @@ func (client *RegistriesClient) listHandleResponse(resp *http.Response) (Registr // NewListBySubscriptionPager - List registries by subscription // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - options - RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.NewListBySubscriptionPager // method. func (client *RegistriesClient) NewListBySubscriptionPager(options *RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse] { @@ -363,7 +363,7 @@ func (client *RegistriesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -381,7 +381,7 @@ func (client *RegistriesClient) listBySubscriptionHandleResponse(resp *http.Resp // BeginRemoveRegions - Remove regions from registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - body - Details required to create the registry. @@ -408,7 +408,7 @@ func (client *RegistriesClient) BeginRemoveRegions(ctx context.Context, resource // RemoveRegions - Remove regions from registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistriesClient) removeRegions(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginRemoveRegionsOptions) (*http.Response, error) { var err error const operationName = "RegistriesClient.BeginRemoveRegions" @@ -450,7 +450,7 @@ func (client *RegistriesClient) removeRegionsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -462,7 +462,7 @@ func (client *RegistriesClient) removeRegionsCreateRequest(ctx context.Context, // Update - Update tags // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - body - Details required to create the registry. @@ -509,7 +509,7 @@ func (client *RegistriesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client_example_test.go deleted file mode 100644 index 2dad88b2453f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client_example_test.go +++ /dev/null @@ -1,1396 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/listBySubscription.json -func ExampleRegistriesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistriesClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RegistryTrackedResourceArmPaginatedResult = armmachinelearning.RegistryTrackedResourceArmPaginatedResult{ - // Value: []*armmachinelearning.Registry{ - // { - // 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:19: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:19: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/list-SystemCreated.json -func ExampleRegistriesClient_NewListPager_listRegistriesWithSystemCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistriesClient().NewListPager("test-rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RegistryTrackedResourceArmPaginatedResult = armmachinelearning.RegistryTrackedResourceArmPaginatedResult{ - // Value: []*armmachinelearning.Registry{ - // { - // 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-01T11:54: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-01T11:54: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/list-UserCreated.json -func ExampleRegistriesClient_NewListPager_listRegistriesWithUserCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistriesClient().NewListPager("test-rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RegistryTrackedResourceArmPaginatedResult = armmachinelearning.RegistryTrackedResourceArmPaginatedResult{ - // Value: []*armmachinelearning.Registry{ - // { - // 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-01T11:52: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-01T11:52: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.ManagedServiceIdentityTypeUserAssigned), - // 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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/delete.json -func ExampleRegistriesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistriesClient().BeginDelete(ctx, "test-rg", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-SystemCreated.json -func ExampleRegistriesClient_Get_getRegistryWithSystemCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistriesClient().Get(ctx, "test-rg", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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-01T11:54: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-01T11:54: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-UserCreated.json -func ExampleRegistriesClient_Get_getRegistryWithUserCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistriesClient().Get(ctx, "test-rg", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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-01T11:49: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-01T11:49: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.ManagedServiceIdentityTypeUserAssigned), - // 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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/update-SystemCreated.json -func ExampleRegistriesClient_Update_updateRegistryWithSystemCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistriesClient().Update(ctx, "test-rg", "string", armmachinelearning.PartialRegistryPartialTrackedResource{ - Identity: &armmachinelearning.RegistryPartialManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - SKU: &armmachinelearning.PartialSKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierBasic), - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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:32: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:32: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/update-UserCreated.json -func ExampleRegistriesClient_Update_updateRegistryWithUserCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistriesClient().Update(ctx, "test-rg", "string", armmachinelearning.PartialRegistryPartialTrackedResource{ - Identity: &armmachinelearning.RegistryPartialManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - SKU: &armmachinelearning.PartialSKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierBasic), - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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-01T11:36: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-01T11:36: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.ManagedServiceIdentityTypeUserAssigned), - // 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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/createOrUpdate-SystemCreated.json -func ExampleRegistriesClient_BeginCreateOrUpdate_createOrUpdateRegistryWithSystemCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistriesClient().BeginCreateOrUpdate(ctx, "test-rg", "string", armmachinelearning.Registry{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeNone), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.RegistryProperties{ - DiscoveryURL: to.Ptr("string"), - IntellectualPropertyPublisher: to.Ptr("string"), - ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - MlFlowRegistryURI: to.Ptr("string"), - PublicNetworkAccess: to.Ptr("string"), - RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - { - AcrDetails: []*armmachinelearning.AcrDetails{ - { - SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - AcrAccountName: to.Ptr("string"), - AcrAccountSKU: to.Ptr("string"), - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - }}, - Location: to.Ptr("string"), - StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - { - SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - AllowBlobPublicAccess: to.Ptr(false), - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - StorageAccountHnsEnabled: to.Ptr(false), - StorageAccountName: to.Ptr("string"), - StorageAccountType: to.Ptr("string"), - }, - }}, - }}, - RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - { - ID: to.Ptr("string"), - Location: to.Ptr("string"), - Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("string")}, - PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - SubnetArmID: to.Ptr("string"), - }, - ProvisioningState: to.Ptr("string"), - RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - Description: to.Ptr("string"), - ActionsRequired: to.Ptr("string"), - Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - }, - }, - }}, - }, - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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-01T11:56: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-01T11:56: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/createOrUpdate-UserCreated.json -func ExampleRegistriesClient_BeginCreateOrUpdate_createOrUpdateRegistryWithUserCreatedAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistriesClient().BeginCreateOrUpdate(ctx, "test-rg", "string", armmachinelearning.Registry{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeNone), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.RegistryProperties{ - DiscoveryURL: to.Ptr("string"), - IntellectualPropertyPublisher: to.Ptr("string"), - ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - MlFlowRegistryURI: to.Ptr("string"), - PublicNetworkAccess: to.Ptr("string"), - RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - { - AcrDetails: []*armmachinelearning.AcrDetails{ - { - UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - }}, - Location: to.Ptr("string"), - StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - { - UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - }}, - }}, - RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - { - ID: to.Ptr("string"), - Location: to.Ptr("string"), - Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("string")}, - PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - SubnetArmID: to.Ptr("string"), - }, - ProvisioningState: to.Ptr("string"), - RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - Description: to.Ptr("string"), - ActionsRequired: to.Ptr("string"), - Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - }, - }, - }}, - }, - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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-01T11:55: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-01T11:55: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.ManagedServiceIdentityTypeUserAssigned), - // 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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/removeRegions.json -func ExampleRegistriesClient_BeginRemoveRegions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistriesClient().BeginRemoveRegions(ctx, "test-rg", "string", armmachinelearning.Registry{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeNone), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.RegistryProperties{ - DiscoveryURL: to.Ptr("string"), - IntellectualPropertyPublisher: to.Ptr("string"), - ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - MlFlowRegistryURI: to.Ptr("string"), - PublicNetworkAccess: to.Ptr("string"), - RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - { - AcrDetails: []*armmachinelearning.AcrDetails{ - { - SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - AcrAccountName: to.Ptr("string"), - AcrAccountSKU: to.Ptr("string"), - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - }}, - Location: to.Ptr("string"), - StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - { - SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - AllowBlobPublicAccess: to.Ptr(false), - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - StorageAccountHnsEnabled: to.Ptr(false), - StorageAccountName: to.Ptr("string"), - StorageAccountType: to.Ptr("string"), - }, - UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - ArmResourceID: &armmachinelearning.ArmResourceID{ - ResourceID: to.Ptr("string"), - }, - }, - }}, - }}, - RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - { - ID: to.Ptr("string"), - Location: to.Ptr("string"), - Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("string")}, - PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - SubnetArmID: to.Ptr("string"), - }, - ProvisioningState: to.Ptr("string"), - RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - Description: to.Ptr("string"), - ActionsRequired: to.Ptr("string"), - Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - }, - }, - }}, - }, - 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), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Registry = armmachinelearning.Registry{ - // 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:33: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:33: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.RegistryProperties{ - // DiscoveryURL: to.Ptr("string"), - // IntellectualPropertyPublisher: to.Ptr("string"), - // ManagedResourceGroup: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // MlFlowRegistryURI: to.Ptr("string"), - // PublicNetworkAccess: to.Ptr("string"), - // RegionDetails: []*armmachinelearning.RegistryRegionArmDetails{ - // { - // AcrDetails: []*armmachinelearning.AcrDetails{ - // { - // SystemCreatedAcrAccount: &armmachinelearning.SystemCreatedAcrAccount{ - // AcrAccountName: to.Ptr("string"), - // AcrAccountSKU: to.Ptr("string"), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // UserCreatedAcrAccount: &armmachinelearning.UserCreatedAcrAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // Location: to.Ptr("string"), - // StorageAccountDetails: []*armmachinelearning.StorageAccountDetails{ - // { - // SystemCreatedStorageAccount: &armmachinelearning.SystemCreatedStorageAccount{ - // AllowBlobPublicAccess: to.Ptr(false), - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // StorageAccountHnsEnabled: to.Ptr(false), - // StorageAccountName: to.Ptr("string"), - // StorageAccountType: to.Ptr("string"), - // }, - // UserCreatedStorageAccount: &armmachinelearning.UserCreatedStorageAccount{ - // ArmResourceID: &armmachinelearning.ArmResourceID{ - // ResourceID: to.Ptr("string"), - // }, - // }, - // }}, - // }}, - // RegistryPrivateEndpointConnections: []*armmachinelearning.RegistryPrivateEndpointConnection{ - // { - // ID: to.Ptr("string"), - // Location: to.Ptr("string"), - // Properties: &armmachinelearning.RegistryPrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("string")}, - // PrivateEndpoint: &armmachinelearning.PrivateEndpointResource{ - // ID: to.Ptr("string"), - // SubnetArmID: to.Ptr("string"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RegistryPrivateLinkServiceConnectionState: &armmachinelearning.RegistryPrivateLinkServiceConnectionState{ - // Description: to.Ptr("string"), - // ActionsRequired: to.Ptr("string"), - // Status: to.Ptr(armmachinelearning.EndpointServiceConnectionStatusApproved), - // }, - // }, - // }}, - // }, - // 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/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go index 5b78ba5ceb50..ffb6c42728e0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go @@ -46,7 +46,7 @@ func NewRegistryCodeContainersClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Create or update Code container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -74,7 +74,7 @@ func (client *RegistryCodeContainersClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Create or update Code container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryCodeContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryCodeContainersClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *RegistryCodeContainersClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *RegistryCodeContainersClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Delete Code container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -159,7 +159,7 @@ func (client *RegistryCodeContainersClient) BeginDelete(ctx context.Context, res // Delete - Delete Code container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryCodeContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryCodeContainersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *RegistryCodeContainersClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *RegistryCodeContainersClient) deleteCreateRequest(ctx context.Cont // Get - Get Code container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -266,7 +266,7 @@ func (client *RegistryCodeContainersClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *RegistryCodeContainersClient) getHandleResponse(resp *http.Respons // NewListPager - List containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.NewListPager @@ -334,7 +334,7 @@ func (client *RegistryCodeContainersClient) listCreateRequest(ctx context.Contex if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client_example_test.go deleted file mode 100644 index e8d086f67c08..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client_example_test.go +++ /dev/null @@ -1,200 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/list.json -func ExampleRegistryCodeContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryCodeContainersClient().NewListPager("testrg123", "testregistry", &armmachinelearning.RegistryCodeContainersClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CodeContainerResourceArmPaginatedResult = armmachinelearning.CodeContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.CodeContainer{ - // { - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/codes"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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/registries/codes"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/delete.json -func ExampleRegistryCodeContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryCodeContainersClient().BeginDelete(ctx, "testrg123", "testregistry", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/get.json -func ExampleRegistryCodeContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryCodeContainersClient().Get(ctx, "testrg123", "testregistry", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CodeContainer = armmachinelearning.CodeContainer{ - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/codes"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/createOrUpdate.json -func ExampleRegistryCodeContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryCodeContainersClient().BeginCreateOrUpdate(ctx, "testrg123", "testregistry", "testContainer", armmachinelearning.CodeContainer{ - Properties: &armmachinelearning.CodeContainerProperties{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CodeContainer = armmachinelearning.CodeContainer{ - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/codes"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go index 1d37c375c7d3..cf3a46e6011d 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go @@ -47,7 +47,7 @@ func NewRegistryCodeVersionsClient(subscriptionID string, credential azcore.Toke // CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a code asset to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Pending upload name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *RegistryCodeVersionsClient) createOrGetStartPendingUploadCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *RegistryCodeVersionsClient) createOrGetStartPendingUploadHandleRes // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -155,7 +155,7 @@ func (client *RegistryCodeVersionsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryCodeVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryCodeVersionsClient.BeginCreateOrUpdate" @@ -205,7 +205,7 @@ func (client *RegistryCodeVersionsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -217,7 +217,7 @@ func (client *RegistryCodeVersionsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -245,7 +245,7 @@ func (client *RegistryCodeVersionsClient) BeginDelete(ctx context.Context, resou // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryCodeVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryCodeVersionsClient.BeginDelete" @@ -295,7 +295,7 @@ func (client *RegistryCodeVersionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *RegistryCodeVersionsClient) deleteCreateRequest(ctx context.Contex // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -361,7 +361,7 @@ func (client *RegistryCodeVersionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,7 +378,7 @@ func (client *RegistryCodeVersionsClient) getHandleResponse(resp *http.Response) // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - codeName - Container name. @@ -440,7 +440,7 @@ func (client *RegistryCodeVersionsClient) listCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client_example_test.go deleted file mode 100644 index 07d6333a764d..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client_example_test.go +++ /dev/null @@ -1,234 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/list.json -func ExampleRegistryCodeVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryCodeVersionsClient().NewListPager("test-rg", "my-aml-registry", "string", &armmachinelearning.RegistryCodeVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/delete.json -func ExampleRegistryCodeVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryCodeVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/get.json -func ExampleRegistryCodeVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryCodeVersionsClient().Get(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/createOrUpdate.json -func ExampleRegistryCodeVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryCodeVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-registry", "string", "string", armmachinelearning.CodeVersion{ - 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"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json -func ExampleRegistryCodeVersionsClient_CreateOrGetStartPendingUpload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryCodeVersionsClient().CreateOrGetStartPendingUpload(ctx, "test-rg", "registryName", "string", "string", armmachinelearning.PendingUploadRequestDto{ - PendingUploadID: to.Ptr("string"), - PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeTemporaryBlobReference), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PendingUploadResponseDto = armmachinelearning.PendingUploadResponseDto{ - // BlobReferenceForConsumption: &armmachinelearning.BlobReferenceForConsumptionDto{ - // BlobURI: to.Ptr("https://www.contoso.com/example"), - // Credential: &armmachinelearning.SASCredentialDto{ - // CredentialType: to.Ptr(armmachinelearning.PendingUploadCredentialTypeSAS), - // SasURI: to.Ptr("https://www.contoso.com/example"), - // }, - // StorageAccountArmID: to.Ptr("string"), - // }, - // PendingUploadID: to.Ptr("string"), - // PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go index f68d7e3536f0..8a5efbb16494 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go @@ -46,7 +46,7 @@ func NewRegistryComponentContainersClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -74,7 +74,7 @@ func (client *RegistryComponentContainersClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryComponentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryComponentContainersClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *RegistryComponentContainersClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *RegistryComponentContainersClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -159,7 +159,7 @@ func (client *RegistryComponentContainersClient) BeginDelete(ctx context.Context // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryComponentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryComponentContainersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *RegistryComponentContainersClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *RegistryComponentContainersClient) deleteCreateRequest(ctx context // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -266,7 +266,7 @@ func (client *RegistryComponentContainersClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *RegistryComponentContainersClient) getHandleResponse(resp *http.Re // NewListPager - List containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.NewListPager @@ -334,7 +334,7 @@ func (client *RegistryComponentContainersClient) listCreateRequest(ctx context.C if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client_example_test.go deleted file mode 100644 index 12873d1f8df0..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client_example_test.go +++ /dev/null @@ -1,188 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/list.json -func ExampleRegistryComponentContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryComponentContainersClient().NewListPager("test-rg", "my-aml-registry", &armmachinelearning.RegistryComponentContainersClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/delete.json -func ExampleRegistryComponentContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryComponentContainersClient().BeginDelete(ctx, "test-rg", "my-aml-registry", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/get.json -func ExampleRegistryComponentContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryComponentContainersClient().Get(ctx, "test-rg", "my-aml-registry", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/createOrUpdate.json -func ExampleRegistryComponentContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryComponentContainersClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-registry", "string", armmachinelearning.ComponentContainer{ - Properties: &armmachinelearning.ComponentContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go index 02bbd3ea365b..cfdacda88dc9 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go @@ -47,7 +47,7 @@ func NewRegistryComponentVersionsClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -76,7 +76,7 @@ func (client *RegistryComponentVersionsClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryComponentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryComponentVersionsClient.BeginCreateOrUpdate" @@ -126,7 +126,7 @@ func (client *RegistryComponentVersionsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *RegistryComponentVersionsClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -166,7 +166,7 @@ func (client *RegistryComponentVersionsClient) BeginDelete(ctx context.Context, // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryComponentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryComponentVersionsClient.BeginDelete" @@ -216,7 +216,7 @@ func (client *RegistryComponentVersionsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *RegistryComponentVersionsClient) deleteCreateRequest(ctx context.C // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -282,7 +282,7 @@ func (client *RegistryComponentVersionsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +299,7 @@ func (client *RegistryComponentVersionsClient) getHandleResponse(resp *http.Resp // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - componentName - Container name. @@ -361,7 +361,7 @@ func (client *RegistryComponentVersionsClient) listCreateRequest(ctx context.Con if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client_example_test.go deleted file mode 100644 index 9f095f1d1898..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client_example_test.go +++ /dev/null @@ -1,207 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/list.json -func ExampleRegistryComponentVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryComponentVersionsClient().NewListPager("test-rg", "my-aml-registry", "string", &armmachinelearning.RegistryComponentVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/delete.json -func ExampleRegistryComponentVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryComponentVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/get.json -func ExampleRegistryComponentVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryComponentVersionsClient().Get(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/createOrUpdate.json -func ExampleRegistryComponentVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryComponentVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-registry", "string", "string", armmachinelearning.ComponentVersion{ - 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{ - "8ced901b-d826-477d-bfef-329da9672513": nil, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go index 44fb7db28bcd..741dfdc14325 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go @@ -46,7 +46,7 @@ func NewRegistryDataContainersClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -74,7 +74,7 @@ func (client *RegistryDataContainersClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryDataContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryDataContainersClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *RegistryDataContainersClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *RegistryDataContainersClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -159,7 +159,7 @@ func (client *RegistryDataContainersClient) BeginDelete(ctx context.Context, res // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryDataContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryDataContainersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *RegistryDataContainersClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *RegistryDataContainersClient) deleteCreateRequest(ctx context.Cont // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -266,7 +266,7 @@ func (client *RegistryDataContainersClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *RegistryDataContainersClient) getHandleResponse(resp *http.Respons // NewListPager - List Data containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistryDataContainersClientListOptions contains the optional parameters for the RegistryDataContainersClient.NewListPager @@ -334,7 +334,7 @@ func (client *RegistryDataContainersClient) listCreateRequest(ctx context.Contex if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client_example_test.go deleted file mode 100644 index 2ebc16346e0e..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client_example_test.go +++ /dev/null @@ -1,204 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/registryList.json -func ExampleRegistryDataContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryDataContainersClient().NewListPager("test-rg", "registryName", &armmachinelearning.RegistryDataContainersClientListOptions{Skip: nil, - ListViewType: to.Ptr(armmachinelearning.ListViewTypeAll), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DataContainerResourceArmPaginatedResult = armmachinelearning.DataContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.DataContainer{ - // { - // 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:19:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:19:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.DataContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.DataTypeURIFolder), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/delete.json -func ExampleRegistryDataContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryDataContainersClient().BeginDelete(ctx, "test-rg", "registryName", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/get.json -func ExampleRegistryDataContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryDataContainersClient().Get(ctx, "test-rg", "registryName", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataContainer = armmachinelearning.DataContainer{ - // 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:20: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:20:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Properties: &armmachinelearning.DataContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.DataTypeURIFile), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/createOrUpdate.json -func ExampleRegistryDataContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryDataContainersClient().BeginCreateOrUpdate(ctx, "test-rg", "registryName", "string", armmachinelearning.DataContainer{ - Properties: &armmachinelearning.DataContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsArchived: to.Ptr(false), - DataType: to.Ptr(armmachinelearning.DataTypeURIFolder), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataContainer = armmachinelearning.DataContainer{ - // 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:19:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:19:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.DataContainerProperties{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsArchived: to.Ptr(false), - // LatestVersion: to.Ptr("string"), - // NextVersion: to.Ptr("string"), - // DataType: to.Ptr(armmachinelearning.DataTypeMltable), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client.go index c12870223c0b..fd9254b50fe7 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client.go @@ -46,7 +46,7 @@ func NewRegistryDataReferencesClient(subscriptionID string, credential azcore.To // GetBlobReferenceSAS - Get blob reference SAS Uri. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Data reference name. @@ -104,7 +104,7 @@ func (client *RegistryDataReferencesClient) getBlobReferenceSASCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client_example_test.go deleted file mode 100644 index e59b5244075b..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatareferences_client_example_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/DataReference/getBlobReferenceSAS.json -func ExampleRegistryDataReferencesClient_GetBlobReferenceSAS() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryDataReferencesClient().GetBlobReferenceSAS(ctx, "test-rg", "registryName", "string", "string", armmachinelearning.GetBlobReferenceSASRequestDto{ - AssetID: to.Ptr("string"), - BlobURI: to.Ptr("https://www.contoso.com/example"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GetBlobReferenceSASResponseDto = armmachinelearning.GetBlobReferenceSASResponseDto{ - // BlobReferenceForConsumption: &armmachinelearning.GetBlobReferenceForConsumptionDto{ - // BlobURI: to.Ptr("https://www.contoso.com/example"), - // Credential: &armmachinelearning.AnonymousAccessCredential{ - // CredentialType: to.Ptr(armmachinelearning.DataReferenceCredentialTypeNoCredentials), - // }, - // StorageAccountArmID: to.Ptr("string"), - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go index af568306d828..a0d057ee16e9 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go @@ -47,7 +47,7 @@ func NewRegistryDataVersionsClient(subscriptionID string, credential azcore.Toke // CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a data asset to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Data asset name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *RegistryDataVersionsClient) createOrGetStartPendingUploadCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *RegistryDataVersionsClient) createOrGetStartPendingUploadHandleRes // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -155,7 +155,7 @@ func (client *RegistryDataVersionsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryDataVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryDataVersionsClient.BeginCreateOrUpdate" @@ -205,7 +205,7 @@ func (client *RegistryDataVersionsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -217,7 +217,7 @@ func (client *RegistryDataVersionsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -245,7 +245,7 @@ func (client *RegistryDataVersionsClient) BeginDelete(ctx context.Context, resou // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryDataVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryDataVersionsClient.BeginDelete" @@ -295,7 +295,7 @@ func (client *RegistryDataVersionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *RegistryDataVersionsClient) deleteCreateRequest(ctx context.Contex // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Container name. @@ -361,7 +361,7 @@ func (client *RegistryDataVersionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,7 +378,7 @@ func (client *RegistryDataVersionsClient) getHandleResponse(resp *http.Response) // NewListPager - List data versions in the data container // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - name - Data container's name @@ -443,7 +443,7 @@ func (client *RegistryDataVersionsClient) listCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client_example_test.go deleted file mode 100644 index 4f203c1939fa..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client_example_test.go +++ /dev/null @@ -1,252 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/registryList.json -func ExampleRegistryDataVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryDataVersionsClient().NewListPager("test-rg", "registryName", "string", &armmachinelearning.RegistryDataVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - Tags: to.Ptr("string"), - ListViewType: to.Ptr(armmachinelearning.ListViewTypeArchivedOnly), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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-01T11:46: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-01T11:46:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.MLTableData{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // DataType: to.Ptr(armmachinelearning.DataTypeMltable), - // DataURI: to.Ptr("string"), - // ReferencedUris: []*string{ - // to.Ptr("string")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/delete.json -func ExampleRegistryDataVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryDataVersionsClient().BeginDelete(ctx, "test-rg", "registryName", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/get.json -func ExampleRegistryDataVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryDataVersionsClient().Get(ctx, "test-rg", "registryName", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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:20: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:20:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // }, - // Properties: &armmachinelearning.MLTableData{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // DataType: to.Ptr(armmachinelearning.DataTypeMltable), - // DataURI: to.Ptr("string"), - // ReferencedUris: []*string{ - // to.Ptr("string")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/createOrUpdate.json -func ExampleRegistryDataVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryDataVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "registryName", "string", "string", armmachinelearning.DataVersionBase{ - Properties: &armmachinelearning.MLTableData{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - IsArchived: to.Ptr(false), - DataType: to.Ptr(armmachinelearning.DataTypeMltable), - DataURI: to.Ptr("string"), - ReferencedUris: []*string{ - to.Ptr("string")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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:21: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:21:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.MLTableData{ - // Description: to.Ptr("string"), - // Properties: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // Tags: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // IsAnonymous: to.Ptr(false), - // IsArchived: to.Ptr(false), - // DataType: to.Ptr(armmachinelearning.DataTypeMltable), - // DataURI: to.Ptr("string"), - // ReferencedUris: []*string{ - // to.Ptr("string")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json -func ExampleRegistryDataVersionsClient_CreateOrGetStartPendingUpload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryDataVersionsClient().CreateOrGetStartPendingUpload(ctx, "test-rg", "registryName", "string", "string", armmachinelearning.PendingUploadRequestDto{ - PendingUploadID: to.Ptr("string"), - PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PendingUploadResponseDto = armmachinelearning.PendingUploadResponseDto{ - // BlobReferenceForConsumption: &armmachinelearning.BlobReferenceForConsumptionDto{ - // BlobURI: to.Ptr("https://www.contoso.com/example"), - // Credential: &armmachinelearning.SASCredentialDto{ - // CredentialType: to.Ptr(armmachinelearning.PendingUploadCredentialTypeSAS), - // SasURI: to.Ptr("https://www.contoso.com/example"), - // }, - // StorageAccountArmID: to.Ptr("string"), - // }, - // PendingUploadID: to.Ptr("string"), - // PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go index 1f47134ce0ac..2ba8214b9a80 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go @@ -46,7 +46,7 @@ func NewRegistryEnvironmentContainersClient(subscriptionID string, credential az // BeginCreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. @@ -74,7 +74,7 @@ func (client *RegistryEnvironmentContainersClient) BeginCreateOrUpdate(ctx conte // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryEnvironmentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryEnvironmentContainersClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *RegistryEnvironmentContainersClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *RegistryEnvironmentContainersClient) createOrUpdateCreateRequest(c // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. @@ -159,7 +159,7 @@ func (client *RegistryEnvironmentContainersClient) BeginDelete(ctx context.Conte // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryEnvironmentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryEnvironmentContainersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *RegistryEnvironmentContainersClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *RegistryEnvironmentContainersClient) deleteCreateRequest(ctx conte // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. This is case-sensitive. @@ -266,7 +266,7 @@ func (client *RegistryEnvironmentContainersClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *RegistryEnvironmentContainersClient) getHandleResponse(resp *http. // NewListPager - List environment containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.NewListPager @@ -334,7 +334,7 @@ func (client *RegistryEnvironmentContainersClient) listCreateRequest(ctx context if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client_example_test.go deleted file mode 100644 index 7fea6f824d16..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client_example_test.go +++ /dev/null @@ -1,194 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/list.json -func ExampleRegistryEnvironmentContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryEnvironmentContainersClient().NewListPager("testrg123", "testregistry", &armmachinelearning.RegistryEnvironmentContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EnvironmentContainerResourceArmPaginatedResult = armmachinelearning.EnvironmentContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.EnvironmentContainer{ - // { - // Name: to.Ptr("testEnvironment"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/environments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/delete.json -func ExampleRegistryEnvironmentContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryEnvironmentContainersClient().BeginDelete(ctx, "testrg123", "testregistry", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/get.json -func ExampleRegistryEnvironmentContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryEnvironmentContainersClient().Get(ctx, "testrg123", "testregistry", "testEnvironment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EnvironmentContainer = armmachinelearning.EnvironmentContainer{ - // Name: to.Ptr("testEnvironment"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/environments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/createOrUpdate.json -func ExampleRegistryEnvironmentContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryEnvironmentContainersClient().BeginCreateOrUpdate(ctx, "testrg123", "testregistry", "testEnvironment", armmachinelearning.EnvironmentContainer{ - 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"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EnvironmentContainer = armmachinelearning.EnvironmentContainer{ - // Name: to.Ptr("testEnvironment"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/environments"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/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/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go index 0ec51b39e62b..077142ae0889 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go @@ -47,7 +47,7 @@ func NewRegistryEnvironmentVersionsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. @@ -76,7 +76,7 @@ func (client *RegistryEnvironmentVersionsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryEnvironmentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryEnvironmentVersionsClient.BeginCreateOrUpdate" @@ -126,7 +126,7 @@ func (client *RegistryEnvironmentVersionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -138,7 +138,7 @@ func (client *RegistryEnvironmentVersionsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. @@ -166,7 +166,7 @@ func (client *RegistryEnvironmentVersionsClient) BeginDelete(ctx context.Context // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryEnvironmentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryEnvironmentVersionsClient.BeginDelete" @@ -216,7 +216,7 @@ func (client *RegistryEnvironmentVersionsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *RegistryEnvironmentVersionsClient) deleteCreateRequest(ctx context // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. This is case-sensitive. @@ -282,7 +282,7 @@ func (client *RegistryEnvironmentVersionsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +299,7 @@ func (client *RegistryEnvironmentVersionsClient) getHandleResponse(resp *http.Re // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - environmentName - Container name. This is case-sensitive. @@ -361,7 +361,7 @@ func (client *RegistryEnvironmentVersionsClient) listCreateRequest(ctx context.C if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client_example_test.go deleted file mode 100644 index f5b929c5e534..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client_example_test.go +++ /dev/null @@ -1,279 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/list.json -func ExampleRegistryEnvironmentVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryEnvironmentVersionsClient().NewListPager("test-rg", "my-aml-regsitry", "string", &armmachinelearning.RegistryEnvironmentVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/delete.json -func ExampleRegistryEnvironmentVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryEnvironmentVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/get.json -func ExampleRegistryEnvironmentVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryEnvironmentVersionsClient().Get(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/createOrUpdate.json -func ExampleRegistryEnvironmentVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryEnvironmentVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-registry", "string", "string", armmachinelearning.EnvironmentVersion{ - 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"), - 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), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go index 7bf846e03782..93aa77509c5a 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go @@ -46,7 +46,7 @@ func NewRegistryModelContainersClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Create or update model container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. @@ -74,7 +74,7 @@ func (client *RegistryModelContainersClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Create or update model container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryModelContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryModelContainersClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *RegistryModelContainersClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *RegistryModelContainersClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. @@ -159,7 +159,7 @@ func (client *RegistryModelContainersClient) BeginDelete(ctx context.Context, re // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryModelContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryModelContainersClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *RegistryModelContainersClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *RegistryModelContainersClient) deleteCreateRequest(ctx context.Con // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. This is case-sensitive. @@ -266,7 +266,7 @@ func (client *RegistryModelContainersClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *RegistryModelContainersClient) getHandleResponse(resp *http.Respon // NewListPager - List model containers. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - options - RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.NewListPager @@ -334,7 +334,7 @@ func (client *RegistryModelContainersClient) listCreateRequest(ctx context.Conte if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client_example_test.go deleted file mode 100644 index eb70aedd9113..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client_example_test.go +++ /dev/null @@ -1,182 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/list.json -func ExampleRegistryModelContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryModelContainersClient().NewListPager("testrg123", "registry123", &armmachinelearning.RegistryModelContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ModelContainerResourceArmPaginatedResult = armmachinelearning.ModelContainerResourceArmPaginatedResult{ - // Value: []*armmachinelearning.ModelContainer{ - // { - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/models"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/delete.json -func ExampleRegistryModelContainersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryModelContainersClient().BeginDelete(ctx, "testrg123", "registry123", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/get.json -func ExampleRegistryModelContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryModelContainersClient().Get(ctx, "testrg123", "registry123", "testContainer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ModelContainer = armmachinelearning.ModelContainer{ - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/models"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/createOrUpdate.json -func ExampleRegistryModelContainersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryModelContainersClient().BeginCreateOrUpdate(ctx, "testrg123", "registry123", "testContainer", armmachinelearning.ModelContainer{ - Properties: &armmachinelearning.ModelContainerProperties{ - Description: to.Ptr("Model container description"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ModelContainer = armmachinelearning.ModelContainer{ - // Name: to.Ptr("testContainer"), - // Type: to.Ptr("Microsoft.MachineLearningServices/registries/models"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/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/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go index 5f9a6157ee04..906307e8c4ba 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go @@ -47,7 +47,7 @@ func NewRegistryModelVersionsClient(subscriptionID string, credential azcore.Tok // CreateOrGetStartPendingUpload - Generate a storage location and credential for the client to upload a model asset to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Model name. This is case-sensitive. @@ -105,7 +105,7 @@ func (client *RegistryModelVersionsClient) createOrGetStartPendingUploadCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -126,7 +126,7 @@ func (client *RegistryModelVersionsClient) createOrGetStartPendingUploadHandleRe // BeginCreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. @@ -155,7 +155,7 @@ func (client *RegistryModelVersionsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryModelVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "RegistryModelVersionsClient.BeginCreateOrUpdate" @@ -205,7 +205,7 @@ func (client *RegistryModelVersionsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -217,7 +217,7 @@ func (client *RegistryModelVersionsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. @@ -245,7 +245,7 @@ func (client *RegistryModelVersionsClient) BeginDelete(ctx context.Context, reso // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *RegistryModelVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "RegistryModelVersionsClient.BeginDelete" @@ -295,7 +295,7 @@ func (client *RegistryModelVersionsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *RegistryModelVersionsClient) deleteCreateRequest(ctx context.Conte // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. This is case-sensitive. @@ -361,7 +361,7 @@ func (client *RegistryModelVersionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,7 +378,7 @@ func (client *RegistryModelVersionsClient) getHandleResponse(resp *http.Response // NewListPager - List versions. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - registryName - Name of Azure Machine Learning registry. This is case-insensitive // - modelName - Container name. This is case-sensitive. @@ -440,7 +440,7 @@ func (client *RegistryModelVersionsClient) listCreateRequest(ctx context.Context if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Description != nil { reqQP.Set("description", *options.Description) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client_example_test.go deleted file mode 100644 index 2da60ab66c1d..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client_example_test.go +++ /dev/null @@ -1,271 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/list.json -func ExampleRegistryModelVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRegistryModelVersionsClient().NewListPager("test-rg", "my-aml-registry", "string", &armmachinelearning.RegistryModelVersionsClientListOptions{Skip: nil, - OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Version: to.Ptr("string"), - Description: to.Ptr("string"), - Tags: to.Ptr("string"), - Properties: to.Ptr("string"), - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/delete.json -func ExampleRegistryModelVersionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryModelVersionsClient().BeginDelete(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/get.json -func ExampleRegistryModelVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryModelVersionsClient().Get(ctx, "test-rg", "my-aml-registry", "string", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/createOrUpdate.json -func ExampleRegistryModelVersionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRegistryModelVersionsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-registry", "string", "string", armmachinelearning.ModelVersion{ - 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": { - Data: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - ModelType: to.Ptr("CustomModel"), - ModelURI: to.Ptr("string"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json -func ExampleRegistryModelVersionsClient_CreateOrGetStartPendingUpload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRegistryModelVersionsClient().CreateOrGetStartPendingUpload(ctx, "test-rg", "registryName", "string", "string", armmachinelearning.PendingUploadRequestDto{ - PendingUploadID: to.Ptr("string"), - PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeTemporaryBlobReference), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PendingUploadResponseDto = armmachinelearning.PendingUploadResponseDto{ - // BlobReferenceForConsumption: &armmachinelearning.BlobReferenceForConsumptionDto{ - // BlobURI: to.Ptr("https://www.contoso.com/example"), - // Credential: &armmachinelearning.SASCredentialDto{ - // CredentialType: to.Ptr(armmachinelearning.PendingUploadCredentialTypeSAS), - // SasURI: to.Ptr("https://www.contoso.com/example"), - // }, - // StorageAccountArmID: to.Ptr("string"), - // }, - // PendingUploadID: to.Ptr("string"), - // PendingUploadType: to.Ptr(armmachinelearning.PendingUploadTypeNone), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/responses.go b/sdk/resourcemanager/machinelearning/armmachinelearning/responses.go index 8bc6bf26f54a..ede5a0a40c57 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/responses.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/responses.go @@ -1134,6 +1134,11 @@ type WorkspaceConnectionsClientListSecretsResponse struct { WorkspaceConnectionPropertiesV2BasicResource } +// WorkspaceConnectionsClientUpdateResponse contains the response from method WorkspaceConnectionsClient.Update. +type WorkspaceConnectionsClientUpdateResponse struct { + WorkspaceConnectionPropertiesV2BasicResource +} + // WorkspaceFeaturesClientListResponse contains the response from method WorkspaceFeaturesClient.NewListPager. type WorkspaceFeaturesClientListResponse struct { // The List Aml user feature operation response. diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go index e705b8ee20cf..4afd19195a5f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go @@ -46,7 +46,7 @@ func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -74,7 +74,7 @@ func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *SchedulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "SchedulesClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -158,7 +158,7 @@ func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *SchedulesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SchedulesClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource // Get - Get schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Schedule name. @@ -264,7 +264,7 @@ func (client *SchedulesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *SchedulesClient) getHandleResponse(resp *http.Response) (Schedules // NewListPager - List schedules in specified workspace. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. @@ -331,7 +331,7 @@ func (client *SchedulesClient) listCreateRequest(ctx context.Context, resourceGr if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go deleted file mode 100644 index 3f3bfd652a8b..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go +++ /dev/null @@ -1,253 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSchedulesClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.SchedulesClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - Action: &armmachinelearning.EndpointScheduleAction{ - ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), - EndpointInvocationDefinition: map[string]any{ - "9965593e-526f-4b89-bb36-761138cf2794": nil, - }, - }, - DisplayName: to.Ptr("string"), - IsEnabled: to.Ptr(false), - Trigger: &armmachinelearning.CronTrigger{ - EndTime: to.Ptr("string"), - StartTime: to.Ptr("string"), - TimeZone: to.Ptr("string"), - TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), - Expression: to.Ptr("string"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client.go index dd8e0f9e9641..0dbfe8b9b8e0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client.go @@ -46,7 +46,7 @@ func NewServerlessEndpointsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or update Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -74,7 +74,7 @@ func (client *ServerlessEndpointsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or update Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ServerlessEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ServerlessEndpoint, options *ServerlessEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ServerlessEndpointsClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *ServerlessEndpointsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -132,7 +132,7 @@ func (client *ServerlessEndpointsClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -159,7 +159,7 @@ func (client *ServerlessEndpointsClient) BeginDelete(ctx context.Context, resour // Delete - Delete Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ServerlessEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ServerlessEndpointsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ServerlessEndpointsClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *ServerlessEndpointsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *ServerlessEndpointsClient) deleteCreateRequest(ctx context.Context // Get - Get Serverless Endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -265,7 +265,7 @@ func (client *ServerlessEndpointsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *ServerlessEndpointsClient) getHandleResponse(resp *http.Response) // NewListPager - List Serverless Endpoints. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - ServerlessEndpointsClientListOptions contains the optional parameters for the ServerlessEndpointsClient.NewListPager @@ -333,7 +333,7 @@ func (client *ServerlessEndpointsClient) listCreateRequest(ctx context.Context, if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +351,7 @@ func (client *ServerlessEndpointsClient) listHandleResponse(resp *http.Response) // ListKeys - List EndpointAuthKeys for an Endpoint using Key-based authentication. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -403,7 +403,7 @@ func (client *ServerlessEndpointsClient) listKeysCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -421,7 +421,7 @@ func (client *ServerlessEndpointsClient) listKeysHandleResponse(resp *http.Respo // BeginRegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -449,7 +449,7 @@ func (client *ServerlessEndpointsClient) BeginRegenerateKeys(ctx context.Context // RegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ServerlessEndpointsClient) regenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, name string, body RegenerateEndpointKeysRequest, options *ServerlessEndpointsClientBeginRegenerateKeysOptions) (*http.Response, error) { var err error const operationName = "ServerlessEndpointsClient.BeginRegenerateKeys" @@ -495,7 +495,7 @@ func (client *ServerlessEndpointsClient) regenerateKeysCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { @@ -507,7 +507,7 @@ func (client *ServerlessEndpointsClient) regenerateKeysCreateRequest(ctx context // BeginUpdate - Update Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - name - Serverless Endpoint name. @@ -534,7 +534,7 @@ func (client *ServerlessEndpointsClient) BeginUpdate(ctx context.Context, resour // Update - Update Serverless Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *ServerlessEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, name string, body PartialMinimalTrackedResourceWithSKUAndIdentity, options *ServerlessEndpointsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ServerlessEndpointsClient.BeginUpdate" @@ -580,7 +580,7 @@ func (client *ServerlessEndpointsClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client_example_test.go deleted file mode 100644 index e2194fe5e56b..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/serverlessendpoints_client_example_test.go +++ /dev/null @@ -1,444 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/list.json -func ExampleServerlessEndpointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServerlessEndpointsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ServerlessEndpointsClientListOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServerlessEndpointTrackedResourceArmPaginatedResult = armmachinelearning.ServerlessEndpointTrackedResourceArmPaginatedResult{ - // Value: []*armmachinelearning.ServerlessEndpoint{ - // { - // 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:22:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:22: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.ManagedServiceIdentityTypeUserAssigned), - // 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.ServerlessEndpointProperties{ - // AuthMode: to.Ptr(armmachinelearning.ServerlessInferenceEndpointAuthModeKey), - // ContentSafety: &armmachinelearning.ContentSafety{ - // ContentSafetyStatus: to.Ptr(armmachinelearning.ContentSafetyStatusDisabled), - // }, - // EndpointState: to.Ptr(armmachinelearning.ServerlessEndpointStateReinstating), - // InferenceEndpoint: &armmachinelearning.ServerlessInferenceEndpoint{ - // Headers: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // URI: to.Ptr("https://www.contoso.com/example"), - // }, - // MarketplaceSubscriptionID: to.Ptr("string"), - // ModelSettings: &armmachinelearning.ModelSettings{ - // ModelID: 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.SKUTierBasic), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/delete.json -func ExampleServerlessEndpointsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServerlessEndpointsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/get.json -func ExampleServerlessEndpointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServerlessEndpointsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerlessEndpoint = armmachinelearning.ServerlessEndpoint{ - // 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:21:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:21:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // }, - // Location: to.Ptr("string"), - // Tags: map[string]*string{ - // }, - // Identity: &armmachinelearning.ManagedServiceIdentity{ - // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeUserAssigned), - // 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.ServerlessEndpointProperties{ - // AuthMode: to.Ptr(armmachinelearning.ServerlessInferenceEndpointAuthModeKey), - // ContentSafety: &armmachinelearning.ContentSafety{ - // ContentSafetyStatus: to.Ptr(armmachinelearning.ContentSafetyStatusEnabled), - // }, - // EndpointState: to.Ptr(armmachinelearning.ServerlessEndpointStateSuspending), - // InferenceEndpoint: &armmachinelearning.ServerlessInferenceEndpoint{ - // Headers: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // URI: to.Ptr("https://www.contoso.com/example"), - // }, - // MarketplaceSubscriptionID: to.Ptr("string"), - // ModelSettings: &armmachinelearning.ModelSettings{ - // ModelID: 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.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/update.json -func ExampleServerlessEndpointsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServerlessEndpointsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.PartialMinimalTrackedResourceWithSKUAndIdentity{ - Tags: map[string]*string{}, - Identity: &armmachinelearning.PartialManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeNone), - UserAssignedIdentities: map[string]any{ - "string": map[string]any{}, - }, - }, - SKU: &armmachinelearning.PartialSKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierPremium), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerlessEndpoint = armmachinelearning.ServerlessEndpoint{ - // 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:21: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:21:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // }, - // 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.ServerlessEndpointProperties{ - // AuthMode: to.Ptr(armmachinelearning.ServerlessInferenceEndpointAuthModeKey), - // ContentSafety: &armmachinelearning.ContentSafety{ - // ContentSafetyStatus: to.Ptr(armmachinelearning.ContentSafetyStatusDisabled), - // }, - // EndpointState: to.Ptr(armmachinelearning.ServerlessEndpointStateSuspended), - // InferenceEndpoint: &armmachinelearning.ServerlessInferenceEndpoint{ - // Headers: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // URI: to.Ptr("https://www.contoso.com/example"), - // }, - // MarketplaceSubscriptionID: to.Ptr("string"), - // ModelSettings: &armmachinelearning.ModelSettings{ - // ModelID: 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/createOrUpdate.json -func ExampleServerlessEndpointsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServerlessEndpointsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.ServerlessEndpoint{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.ServerlessEndpointProperties{ - AuthMode: to.Ptr(armmachinelearning.ServerlessInferenceEndpointAuthModeKey), - ContentSafety: &armmachinelearning.ContentSafety{ - ContentSafetyStatus: to.Ptr(armmachinelearning.ContentSafetyStatusEnabled), - }, - ModelSettings: &armmachinelearning.ModelSettings{ - ModelID: 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.SKUTierStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ServerlessEndpoint = armmachinelearning.ServerlessEndpoint{ - // 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:20:56.999Z"); return t}()), - // CreatedBy: to.Ptr("string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeApplication), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:20:56.999Z"); return t}()), - // LastModifiedBy: to.Ptr("string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeKey), - // }, - // Location: to.Ptr("string"), - // Tags: map[string]*string{ - // }, - // Identity: &armmachinelearning.ManagedServiceIdentity{ - // Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeUserAssigned), - // 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.ServerlessEndpointProperties{ - // AuthMode: to.Ptr(armmachinelearning.ServerlessInferenceEndpointAuthModeKey), - // ContentSafety: &armmachinelearning.ContentSafety{ - // ContentSafetyStatus: to.Ptr(armmachinelearning.ContentSafetyStatusDisabled), - // }, - // EndpointState: to.Ptr(armmachinelearning.ServerlessEndpointStateDeleting), - // InferenceEndpoint: &armmachinelearning.ServerlessInferenceEndpoint{ - // Headers: map[string]*string{ - // "string": to.Ptr("string"), - // }, - // URI: to.Ptr("https://www.contoso.com/example"), - // }, - // MarketplaceSubscriptionID: to.Ptr("string"), - // ModelSettings: &armmachinelearning.ModelSettings{ - // ModelID: 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), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/listKeys.json -func ExampleServerlessEndpointsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServerlessEndpointsClient().ListKeys(ctx, "test-rg", "my-aml-workspace", "string", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EndpointAuthKeys = armmachinelearning.EndpointAuthKeys{ - // PrimaryKey: to.Ptr("string"), - // SecondaryKey: to.Ptr("string"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/regenerateKeys.json -func ExampleServerlessEndpointsClient_BeginRegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServerlessEndpointsClient().BeginRegenerateKeys(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.RegenerateEndpointKeysRequest{ - KeyType: to.Ptr(armmachinelearning.KeyTypePrimary), - KeyValue: to.Ptr("string"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EndpointAuthKeys = armmachinelearning.EndpointAuthKeys{ - // PrimaryKey: to.Ptr("string"), - // SecondaryKey: to.Ptr("string"), - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go index 2aca1f0ad49e..e98a1dc96dd3 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go @@ -45,7 +45,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets the current usage information as well as limits for AML resources for given subscription and location. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - location - The location for which resource usage is queried. // - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -87,7 +87,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_test.go deleted file mode 100644 index 7ed943105be2..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_test.go +++ /dev/null @@ -1,431 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewUsagesClient().NewListPager("eastus", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go index c2a256598194..849ef42ff99e 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go @@ -46,7 +46,7 @@ func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.Token // List - Returns supported VM Sizes in a location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - location - The location upon which virtual-machine-sizes is queried. // - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List // method. @@ -88,7 +88,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go deleted file mode 100644 index f6fe43d86669..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go +++ /dev/null @@ -1,396 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVirtualMachineSizesClient().List(ctx, "eastus", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go index 2938566982c3..c9565690695b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go @@ -46,7 +46,7 @@ func NewWorkspaceConnectionsClient(subscriptionID string, credential azcore.Toke // Create - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -99,7 +99,7 @@ func (client *WorkspaceConnectionsClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -120,7 +120,7 @@ func (client *WorkspaceConnectionsClient) createHandleResponse(resp *http.Respon // Delete - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -171,7 +171,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex // Get - // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -232,7 +232,7 @@ func (client *WorkspaceConnectionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -294,7 +294,7 @@ func (client *WorkspaceConnectionsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.Category != nil { reqQP.Set("category", *options.Category) } @@ -318,7 +318,7 @@ func (client *WorkspaceConnectionsClient) listHandleResponse(resp *http.Response // ListSecrets - List all the secrets of a machine learning workspaces connections. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - connectionName - Friendly name of the workspace connection @@ -370,7 +370,7 @@ func (client *WorkspaceConnectionsClient) listSecretsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -384,3 +384,79 @@ func (client *WorkspaceConnectionsClient) listSecretsHandleResponse(resp *http.R } return result, nil } + +// Update - Update machine learning workspaces connections under the specified workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - connectionName - Friendly name of the workspace connection +// - options - WorkspaceConnectionsClientUpdateOptions contains the optional parameters for the WorkspaceConnectionsClient.Update +// method. +func (client *WorkspaceConnectionsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientUpdateOptions) (WorkspaceConnectionsClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceConnectionsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, connectionName, options) + if err != nil { + return WorkspaceConnectionsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceConnectionsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceConnectionsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceConnectionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceConnectionsClient) updateHandleResponse(resp *http.Response) (WorkspaceConnectionsClientUpdateResponse, error) { + result := WorkspaceConnectionsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceConnectionPropertiesV2BasicResource); err != nil { + return WorkspaceConnectionsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go deleted file mode 100644 index 217bf4b82e62..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go +++ /dev/null @@ -1,197 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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), - Target: to.Ptr("www.facebook.com"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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) - } - // 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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkspaceConnectionsClient().Delete(ctx, "resourceGroup-1", "workspace-1", "connection-1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceConnectionsClient().NewListPager("resourceGroup-1", "workspace-1", &armmachinelearning.WorkspaceConnectionsClientListOptions{Target: to.Ptr("www.facebook.com"), - Category: to.Ptr("ContainerRegistry"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/listSecrets.json -func ExampleWorkspaceConnectionsClient_ListSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspaceConnectionsClient().ListSecrets(ctx, "test-rg", "workspace-1", "connection-1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // SystemData: &armmachinelearning.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T00:00:00.000Z"); return t}()), - // CreatedBy: to.Ptr("some_string"), - // CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T00:00:00.000Z"); return t}()), - // LastModifiedBy: to.Ptr("some_string"), - // LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser), - // }, - // Properties: &armmachinelearning.AccessKeyAuthTypeWorkspaceConnectionProperties{ - // AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypeAccessKey), - // Category: to.Ptr(armmachinelearning.ConnectionCategoryCustomKeys), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T00:00:00.000Z"); return t}()), - // Metadata: map[string]*string{ - // }, - // Target: to.Ptr("some_string"), - // Credentials: &armmachinelearning.WorkspaceConnectionAccessKey{ - // AccessKeyID: to.Ptr("some_string"), - // SecretAccessKey: to.Ptr("some_string"), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go index f3b30c590a99..727eb75bdc7b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go @@ -45,7 +45,7 @@ func NewWorkspaceFeaturesClient(subscriptionID string, credential azcore.TokenCr // NewListPager - Lists all enabled features for a workspace // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.NewListPager @@ -93,7 +93,7 @@ func (client *WorkspaceFeaturesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_test.go deleted file mode 100644 index e39796d401b3..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_test.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspaceFeaturesClient().NewListPager("myResourceGroup", "testworkspace", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go index 784aead0a28f..d6a0e82501b4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go @@ -47,7 +47,7 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - parameters - The parameters for creating or updating a machine learning workspace. @@ -73,7 +73,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -127,7 +127,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. @@ -151,7 +151,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginDelete" @@ -193,7 +193,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") if options != nil && options.ForceToPurge != nil { reqQP.Set("forceToPurge", strconv.FormatBool(*options.ForceToPurge)) } @@ -205,7 +205,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // BeginDiagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginDiagnoseOptions contains the optional parameters for the WorkspacesClient.BeginDiagnose @@ -231,7 +231,7 @@ func (client *WorkspacesClient) BeginDiagnose(ctx context.Context, resourceGroup // Diagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) diagnose(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDiagnoseOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginDiagnose" @@ -273,7 +273,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -288,7 +288,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou // Get - Gets the properties of the specified machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -334,7 +334,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +351,7 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac // NewListByResourceGroupPager - Lists all the available machine learning workspaces under the specified resource group. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager // method. @@ -397,7 +397,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -414,7 +414,7 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Lists all the available machine learning workspaces under the specified subscription. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -455,7 +455,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -474,7 +474,7 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListKeysOptions contains the optional parameters for the WorkspacesClient.ListKeys method. @@ -520,7 +520,7 @@ func (client *WorkspacesClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -538,7 +538,7 @@ func (client *WorkspacesClient) listKeysHandleResponse(resp *http.Response) (Wor // ListNotebookAccessToken - return notebook access token and refresh token // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListNotebookAccessTokenOptions contains the optional parameters for the WorkspacesClient.ListNotebookAccessToken @@ -585,7 +585,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -603,7 +603,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenHandleResponse(resp *http // ListNotebookKeys - List keys of a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListNotebookKeysOptions contains the optional parameters for the WorkspacesClient.ListNotebookKeys @@ -650,7 +650,7 @@ func (client *WorkspacesClient) listNotebookKeysCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -669,7 +669,7 @@ func (client *WorkspacesClient) listNotebookKeysHandleResponse(resp *http.Respon // (FQDNs) programmatically. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the WorkspacesClient.ListOutboundNetworkDependenciesEndpoints @@ -716,7 +716,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +734,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsHandleRe // ListStorageAccountKeys - List storage account keys of a workspace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientListStorageAccountKeysOptions contains the optional parameters for the WorkspacesClient.ListStorageAccountKeys @@ -781,7 +781,7 @@ func (client *WorkspacesClient) listStorageAccountKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -799,7 +799,7 @@ func (client *WorkspacesClient) listStorageAccountKeysHandleResponse(resp *http. // BeginPrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginPrepareNotebookOptions contains the optional parameters for the WorkspacesClient.BeginPrepareNotebook @@ -825,7 +825,7 @@ func (client *WorkspacesClient) BeginPrepareNotebook(ctx context.Context, resour // PrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) prepareNotebook(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginPrepareNotebookOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginPrepareNotebook" @@ -867,7 +867,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -877,7 +877,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - options - WorkspacesClientBeginResyncKeysOptions contains the optional parameters for the WorkspacesClient.BeginResyncKeys @@ -903,7 +903,7 @@ func (client *WorkspacesClient) BeginResyncKeys(ctx context.Context, resourceGro // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) resyncKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginResyncKeysOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginResyncKeys" @@ -945,7 +945,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -954,7 +954,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res // BeginUpdate - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - workspaceName - Name of Azure Machine Learning workspace. // - parameters - The parameters for updating a machine learning workspace. @@ -979,7 +979,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-04-01 +// Generated from API version 2024-10-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "WorkspacesClient.BeginUpdate" @@ -1021,7 +1021,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-04-01") + reqQP.Set("api-version", "2024-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go deleted file mode 100644 index a3abe71476b1..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go +++ /dev/null @@ -1,683 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().Get(ctx, "workspace-1234", "testworkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "workspace-1234", "testworkspace", armmachinelearning.Workspace{ - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": {}, - }, - }, - 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"), - 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"), - 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"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "workspace-1234", "testworkspace", &armmachinelearning.WorkspacesClientBeginDeleteOptions{ForceToPurge: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - 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"), - PublicNetworkAccess: to.Ptr(armmachinelearning.PublicNetworkAccessDisabled), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("workspace-1234", &armmachinelearning.WorkspacesClientListByResourceGroupOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginDiagnose(ctx, "workspace-1234", "testworkspace", &armmachinelearning.WorkspacesClientBeginDiagnoseOptions{Parameters: &armmachinelearning.DiagnoseWorkspaceParameters{ - Value: &armmachinelearning.DiagnoseRequestProperties{ - 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{}, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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{ - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().ListKeys(ctx, "testrg123", "workspaces123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginResyncKeys(ctx, "testrg123", "workspaces123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(&armmachinelearning.WorkspacesClientListBySubscriptionOptions{Skip: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().ListNotebookAccessToken(ctx, "workspace-1234", "testworkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkspacesClient().BeginPrepareNotebook(ctx, "testrg123", "workspaces123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().ListStorageAccountKeys(ctx, "testrg123", "workspaces123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListStorageAccountKeysResult = armmachinelearning.ListStorageAccountKeysResult{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().ListNotebookKeys(ctx, "testrg123", "workspaces123", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListNotebookKeysResult = armmachinelearning.ListNotebookKeysResult{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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() - clientFactory, err := armmachinelearning.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkspacesClient().ListOutboundNetworkDependenciesEndpoints(ctx, "workspace-1234", "testworkspace", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.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), - // }}, - // }}, - // }, - // }}, - // } -}