[Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/machinelearning/armmachinelearning/v3.1.0

Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Azure-Fluent 2023-03-31 08:08:33 +08:00 коммит произвёл GitHub
Родитель 3ec2d1546b
Коммит f0fd5bd882
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
292 изменённых файлов: 6272 добавлений и 793 удалений

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json
func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.BatchDeployment{
poller, err := clientFactory.NewBatchDeploymentsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.BatchDeployment{
Location: to.Ptr("string"),
Tags: map[string]*string{},
Identity: &armmachinelearning.ManagedServiceIdentity{
@ -57,8 +57,8 @@ func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() {
Resources: &armmachinelearning.DeploymentResourceConfiguration{
InstanceCount: to.Ptr[int32](1),
InstanceType: to.Ptr("string"),
Properties: map[string]interface{}{
"string": map[string]interface{}{
Properties: map[string]any{
"string": map[string]any{
"cd3c37dc-2876-4ca4-8a54-21bd7619724a": nil,
},
},
@ -83,6 +83,81 @@ func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchDeployment = armmachinelearning.BatchDeployment{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchDeploymentProperties{
// Description: to.Ptr("string"),
// CodeConfiguration: &armmachinelearning.CodeConfiguration{
// CodeID: to.Ptr("string"),
// ScoringScript: to.Ptr("string"),
// },
// EnvironmentID: to.Ptr("string"),
// EnvironmentVariables: map[string]*string{
// "string": to.Ptr("string"),
// },
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Compute: to.Ptr("string"),
// ErrorThreshold: to.Ptr[int32](1),
// LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo),
// MaxConcurrencyPerInstance: to.Ptr[int32](1),
// MiniBatchSize: to.Ptr[int64](1),
// Model: &armmachinelearning.IDAssetReference{
// ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID),
// AssetID: to.Ptr("string"),
// },
// OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly),
// OutputFileName: to.Ptr("string"),
// ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded),
// Resources: &armmachinelearning.DeploymentResourceConfiguration{
// InstanceCount: to.Ptr[int32](1),
// InstanceType: to.Ptr("string"),
// Properties: map[string]any{
// "string": map[string]any{
// "4939850d-8eae-4343-8566-0826259a2ad1": nil,
// },
// },
// },
// RetrySettings: &armmachinelearning.BatchRetrySettings{
// MaxRetries: to.Ptr[int32](1),
// Timeout: to.Ptr("PT5M"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json
func ExampleBatchDeploymentsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil)
poller, err := clientFactory.NewBatchDeploymentsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,96 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json
func ExampleBatchDeploymentsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil)
res, err := clientFactory.NewBatchDeploymentsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchDeployment = armmachinelearning.BatchDeployment{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchDeploymentProperties{
// Description: to.Ptr("string"),
// CodeConfiguration: &armmachinelearning.CodeConfiguration{
// CodeID: to.Ptr("string"),
// ScoringScript: to.Ptr("string"),
// },
// EnvironmentID: to.Ptr("string"),
// EnvironmentVariables: map[string]*string{
// "string": to.Ptr("string"),
// },
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Compute: to.Ptr("string"),
// ErrorThreshold: to.Ptr[int32](1),
// LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo),
// MaxConcurrencyPerInstance: to.Ptr[int32](1),
// MiniBatchSize: to.Ptr[int64](1),
// Model: &armmachinelearning.IDAssetReference{
// ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID),
// AssetID: to.Ptr("string"),
// },
// OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly),
// OutputFileName: to.Ptr("string"),
// ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded),
// Resources: &armmachinelearning.DeploymentResourceConfiguration{
// InstanceCount: to.Ptr[int32](1),
// InstanceType: to.Ptr("string"),
// Properties: map[string]any{
// "string": map[string]any{
// "843c2bb4-e5f1-4267-98c8-ba22a99dbb00": nil,
// },
// },
// },
// RetrySettings: &armmachinelearning.BatchRetrySettings{
// MaxRetries: to.Ptr[int32](1),
// Timeout: to.Ptr("PT5M"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,29 +9,107 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json
func ExampleBatchDeploymentsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.BatchDeploymentsClientListOptions{OrderBy: to.Ptr("string"),
pager := clientFactory.NewBatchDeploymentsClient().NewListPager("test-rg", "my-aml-workspace", "testEndpointName", &armmachinelearning.BatchDeploymentsClientListOptions{OrderBy: to.Ptr("string"),
Top: to.Ptr[int32](1),
Skip: nil,
})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.BatchDeploymentTrackedResourceArmPaginatedResult = armmachinelearning.BatchDeploymentTrackedResourceArmPaginatedResult{
// Value: []*armmachinelearning.BatchDeployment{
// {
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchDeploymentProperties{
// Description: to.Ptr("string"),
// CodeConfiguration: &armmachinelearning.CodeConfiguration{
// CodeID: to.Ptr("string"),
// ScoringScript: to.Ptr("string"),
// },
// EnvironmentID: to.Ptr("string"),
// EnvironmentVariables: map[string]*string{
// "string": to.Ptr("string"),
// },
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Compute: to.Ptr("string"),
// ErrorThreshold: to.Ptr[int32](1),
// LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo),
// MaxConcurrencyPerInstance: to.Ptr[int32](1),
// MiniBatchSize: to.Ptr[int64](1),
// Model: &armmachinelearning.IDAssetReference{
// ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID),
// AssetID: to.Ptr("string"),
// },
// OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly),
// OutputFileName: to.Ptr("string"),
// ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded),
// Resources: &armmachinelearning.DeploymentResourceConfiguration{
// InstanceCount: to.Ptr[int32](1),
// InstanceType: to.Ptr("string"),
// Properties: map[string]any{
// "string": map[string]any{
// "a3c13e2e-a213-4cac-9f5a-b49966906ad6": nil,
// },
// },
// },
// RetrySettings: &armmachinelearning.BatchRetrySettings{
// MaxRetries: to.Ptr[int32](1),
// Timeout: to.Ptr("PT5M"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json
func ExampleBatchDeploymentsClient_BeginUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{
poller, err := clientFactory.NewBatchDeploymentsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{
Properties: &armmachinelearning.PartialBatchDeployment{
Description: to.Ptr("string"),
},
@ -33,6 +33,81 @@ func ExampleBatchDeploymentsClient_BeginUpdate() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchDeployment = armmachinelearning.BatchDeployment{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchDeploymentProperties{
// Description: to.Ptr("string"),
// CodeConfiguration: &armmachinelearning.CodeConfiguration{
// CodeID: to.Ptr("string"),
// ScoringScript: to.Ptr("string"),
// },
// EnvironmentID: to.Ptr("string"),
// EnvironmentVariables: map[string]*string{
// "string": to.Ptr("string"),
// },
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Compute: to.Ptr("string"),
// ErrorThreshold: to.Ptr[int32](1),
// LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo),
// MaxConcurrencyPerInstance: to.Ptr[int32](1),
// MiniBatchSize: to.Ptr[int64](1),
// Model: &armmachinelearning.IDAssetReference{
// ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID),
// AssetID: to.Ptr("string"),
// },
// OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly),
// OutputFileName: to.Ptr("string"),
// ProvisioningState: to.Ptr(armmachinelearning.DeploymentProvisioningStateSucceeded),
// Resources: &armmachinelearning.DeploymentResourceConfiguration{
// InstanceCount: to.Ptr[int32](1),
// InstanceType: to.Ptr("string"),
// Properties: map[string]any{
// "string": map[string]any{
// "1e5e1cf9-b0ea-4cf6-9764-e750bf85c10a": nil,
// },
// },
// },
// RetrySettings: &armmachinelearning.BatchRetrySettings{
// MaxRetries: to.Ptr[int32](1),
// Timeout: to.Ptr("PT5M"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json
func ExampleBatchEndpointsClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.BatchEndpoint{
poller, err := clientFactory.NewBatchEndpointsClient().BeginCreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.BatchEndpoint{
Location: to.Ptr("string"),
Tags: map[string]*string{},
Identity: &armmachinelearning.ManagedServiceIdentity{
@ -55,6 +55,55 @@ func ExampleBatchEndpointsClient_BeginCreateOrUpdate() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchEndpoint = armmachinelearning.BatchEndpoint{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchEndpointProperties{
// Description: to.Ptr("string"),
// AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// ScoringURI: to.Ptr("https://www.contoso.com/example"),
// SwaggerURI: to.Ptr("https://www.contoso.com/example"),
// Defaults: &armmachinelearning.BatchEndpointDefaults{
// DeploymentName: to.Ptr("string"),
// },
// ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded),
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json
func ExampleBatchEndpointsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx, "resourceGroup-1234", "testworkspace", "testBatchEndpoint", nil)
poller, err := clientFactory.NewBatchEndpointsClient().BeginDelete(ctx, "resourceGroup-1234", "testworkspace", "testBatchEndpoint", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,69 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json
func ExampleBatchEndpointsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil)
res, err := clientFactory.NewBatchEndpointsClient().Get(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchEndpoint = armmachinelearning.BatchEndpoint{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchEndpointProperties{
// Description: to.Ptr("string"),
// AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// ScoringURI: to.Ptr("https://www.contoso.com/example"),
// SwaggerURI: to.Ptr("https://www.contoso.com/example"),
// Defaults: &armmachinelearning.BatchEndpointDefaults{
// DeploymentName: to.Ptr("string"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,28 +9,79 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json
func ExampleBatchEndpointsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1),
pager := clientFactory.NewBatchEndpointsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1),
Skip: nil,
})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.BatchEndpointTrackedResourceArmPaginatedResult = armmachinelearning.BatchEndpointTrackedResourceArmPaginatedResult{
// Value: []*armmachinelearning.BatchEndpoint{
// {
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchEndpointProperties{
// Description: to.Ptr("string"),
// AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// ScoringURI: to.Ptr("https://www.contoso.com/example"),
// SwaggerURI: to.Ptr("https://www.contoso.com/example"),
// Defaults: &armmachinelearning.BatchEndpointDefaults{
// DeploymentName: to.Ptr("string"),
// },
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,26 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json
func ExampleBatchEndpointsClient_ListKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil)
res, err := clientFactory.NewBatchEndpointsClient().ListKeys(ctx, "test-rg", "my-aml-workspace", "testEndpointName", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EndpointAuthKeys = armmachinelearning.EndpointAuthKeys{
// PrimaryKey: to.Ptr("string"),
// SecondaryKey: to.Ptr("string"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,23 +9,23 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json
func ExampleBatchEndpointsClient_BeginUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{
poller, err := clientFactory.NewBatchEndpointsClient().BeginUpdate(ctx, "test-rg", "my-aml-workspace", "testEndpointName", armmachinelearning.PartialMinimalTrackedResourceWithIdentity{
Tags: map[string]*string{},
Identity: &armmachinelearning.PartialManagedServiceIdentity{
Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
UserAssignedIdentities: map[string]interface{}{
"string": map[string]interface{}{},
UserAssignedIdentities: map[string]any{
"string": map[string]any{},
},
},
}, nil)
@ -36,6 +36,55 @@ func ExampleBatchEndpointsClient_BeginUpdate() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BatchEndpoint = armmachinelearning.BatchEndpoint{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Location: to.Ptr("string"),
// Tags: map[string]*string{
// },
// Identity: &armmachinelearning.ManagedServiceIdentity{
// Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{
// "string": &armmachinelearning.UserAssignedIdentity{
// ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// PrincipalID: to.Ptr("00000000-1111-2222-3333-444444444444"),
// },
// },
// },
// Kind: to.Ptr("string"),
// Properties: &armmachinelearning.BatchEndpointProperties{
// Description: to.Ptr("string"),
// AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// ScoringURI: to.Ptr("https://www.contoso.com/example"),
// SwaggerURI: to.Ptr("https://www.contoso.com/example"),
// Defaults: &armmachinelearning.BatchEndpointDefaults{
// DeploymentName: to.Ptr("string"),
// },
// ProvisioningState: to.Ptr(armmachinelearning.EndpointProvisioningStateSucceeded),
// },
// SKU: &armmachinelearning.SKU{
// Name: to.Ptr("string"),
// Capacity: to.Ptr[int32](1),
// Family: to.Ptr("string"),
// Size: to.Ptr("string"),
// Tier: to.Ptr(armmachinelearning.SKUTierFree),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json
func ExampleCodeContainersClient_CreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateOrUpdate(ctx, "testrg123", "testworkspace", "testContainer", armmachinelearning.CodeContainer{
res, err := clientFactory.NewCodeContainersClient().CreateOrUpdate(ctx, "testrg123", "testworkspace", "testContainer", armmachinelearning.CodeContainer{
Properties: &armmachinelearning.CodeContainerProperties{
Description: to.Ptr("string"),
Tags: map[string]*string{
@ -32,6 +32,27 @@ func ExampleCodeContainersClient_CreateOrUpdate() {
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.CodeContainer = armmachinelearning.CodeContainer{
// Name: to.Ptr("testContainer"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("John Smith"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("John Smith"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeContainerProperties{
// Description: to.Ptr("string"),
// Tags: map[string]*string{
// "property1": to.Ptr("string"),
// "property2": to.Ptr("string"),
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json
func ExampleCodeContainersClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "testrg123", "testworkspace", "testContainer", nil)
_, err = clientFactory.NewCodeContainersClient().Delete(ctx, "testrg123", "testworkspace", "testContainer", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,42 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json
func ExampleCodeContainersClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "testrg123", "testworkspace", "testContainer", nil)
res, err := clientFactory.NewCodeContainersClient().Get(ctx, "testrg123", "testworkspace", "testContainer", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.CodeContainer = armmachinelearning.CodeContainer{
// Name: to.Ptr("testContainer"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("John Smith"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("John Smith"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeContainerProperties{
// Description: to.Ptr("string"),
// Tags: map[string]*string{
// "property1": to.Ptr("string"),
// "property2": to.Ptr("string"),
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,26 +8,70 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json
func ExampleCodeContainersClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("testrg123", "testworkspace", &armmachinelearning.CodeContainersClientListOptions{Skip: nil})
pager := clientFactory.NewCodeContainersClient().NewListPager("testrg123", "testworkspace", &armmachinelearning.CodeContainersClientListOptions{Skip: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.CodeContainerResourceArmPaginatedResult = armmachinelearning.CodeContainerResourceArmPaginatedResult{
// Value: []*armmachinelearning.CodeContainer{
// {
// Name: to.Ptr("testContainer"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("John Smith"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("John Smith"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeContainerProperties{
// Description: to.Ptr("string"),
// Tags: map[string]*string{
// "property1": to.Ptr("string"),
// "property2": to.Ptr("string"),
// },
// },
// },
// {
// Name: to.Ptr("testContainer2"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/codes"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/codes/testContainer2"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("John Smith"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-01T12:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("John Smith"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeContainerProperties{
// Description: to.Ptr("string"),
// Tags: map[string]*string{
// "property1": to.Ptr("string"),
// "property2": to.Ptr("string"),
// },
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json
func ExampleCodeVersionsClient_CreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.CodeVersion{
res, err := clientFactory.NewCodeVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.CodeVersion{
Properties: &armmachinelearning.CodeVersionProperties{
Description: to.Ptr("string"),
Properties: map[string]*string{
@ -36,6 +36,31 @@ func ExampleCodeVersionsClient_CreateOrUpdate() {
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.CodeVersion = armmachinelearning.CodeVersion{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// CodeURI: to.Ptr("https://blobStorage/folderName"),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json
func ExampleCodeVersionsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
_, err = clientFactory.NewCodeVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,46 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json
func ExampleCodeVersionsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
res, err := clientFactory.NewCodeVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.CodeVersion = armmachinelearning.CodeVersion{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// CodeURI: to.Ptr("https://blobStorage/folderName"),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,29 +9,57 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json
func ExampleCodeVersionsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"),
pager := clientFactory.NewCodeVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"),
Top: to.Ptr[int32](1),
Skip: nil,
})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.CodeVersionResourceArmPaginatedResult = armmachinelearning.CodeVersionResourceArmPaginatedResult{
// Value: []*armmachinelearning.CodeVersion{
// {
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.CodeVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// CodeURI: to.Ptr("https://blobStorage/folderName"),
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json
func ExampleComponentContainersClient_CreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.ComponentContainer{
res, err := clientFactory.NewComponentContainersClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", armmachinelearning.ComponentContainer{
Properties: &armmachinelearning.ComponentContainerProperties{
Description: to.Ptr("string"),
Properties: map[string]*string{
@ -34,6 +34,29 @@ func ExampleComponentContainersClient_CreateOrUpdate() {
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentContainer = armmachinelearning.ComponentContainer{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentContainerProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json
func ExampleComponentContainersClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", nil)
_, err = clientFactory.NewComponentContainersClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,44 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json
func ExampleComponentContainersClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
res, err := clientFactory.NewComponentContainersClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentContainer = armmachinelearning.ComponentContainer{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentContainerProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,28 +8,54 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json
func ExampleComponentContainersClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ComponentContainersClientListOptions{Skip: nil,
pager := clientFactory.NewComponentContainersClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.ComponentContainersClientListOptions{Skip: nil,
ListViewType: nil,
})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ComponentContainerResourceArmPaginatedResult = armmachinelearning.ComponentContainerResourceArmPaginatedResult{
// Value: []*armmachinelearning.ComponentContainer{
// {
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentContainerProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json
func ExampleComponentVersionsClient_CreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ComponentVersion{
res, err := clientFactory.NewComponentVersionsClient().CreateOrUpdate(ctx, "test-rg", "my-aml-workspace", "string", "string", armmachinelearning.ComponentVersion{
Properties: &armmachinelearning.ComponentVersionProperties{
Description: to.Ptr("string"),
Properties: map[string]*string{
@ -30,7 +30,7 @@ func ExampleComponentVersionsClient_CreateOrUpdate() {
"string": to.Ptr("string"),
},
IsAnonymous: to.Ptr(false),
ComponentSpec: map[string]interface{}{
ComponentSpec: map[string]any{
"8ced901b-d826-477d-bfef-329da9672513": nil,
},
},
@ -38,6 +38,33 @@ func ExampleComponentVersionsClient_CreateOrUpdate() {
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentVersion = armmachinelearning.ComponentVersion{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// ComponentSpec: map[string]any{
// "2de2e74e-457d-4447-a581-933abc2b9d96": nil,
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json
func ExampleComponentVersionsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
_, err = clientFactory.NewComponentVersionsClient().Delete(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,48 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json
func ExampleComponentVersionsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
res, err := clientFactory.NewComponentVersionsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", "string", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentVersion = armmachinelearning.ComponentVersion{
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// ComponentSpec: map[string]any{
// "1a7c40b5-2029-4f5f-a8d6-fd0822038773": nil,
// },
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,30 +9,60 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json
func ExampleComponentVersionsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ComponentVersionsClientListOptions{OrderBy: to.Ptr("string"),
pager := clientFactory.NewComponentVersionsClient().NewListPager("test-rg", "my-aml-workspace", "string", &armmachinelearning.ComponentVersionsClientListOptions{OrderBy: to.Ptr("string"),
Top: to.Ptr[int32](1),
Skip: nil,
ListViewType: nil,
})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ComponentVersionResourceArmPaginatedResult = armmachinelearning.ComponentVersionResourceArmPaginatedResult{
// Value: []*armmachinelearning.ComponentVersion{
// {
// Name: to.Ptr("string"),
// Type: to.Ptr("string"),
// ID: to.Ptr("string"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.ComponentVersionProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "string": to.Ptr("string"),
// },
// Tags: map[string]*string{
// "string": to.Ptr("string"),
// },
// IsAnonymous: to.Ptr(false),
// ComponentSpec: map[string]any{
// "50acbce5-cccc-475a-8ac6-c4da402afbd8": nil,
// },
// },
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_updateAnAksCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.AKS{
Properties: &armmachinelearning.AKSSchemaProperties{
AgentCount: to.Ptr[int32](4),
@ -38,6 +38,22 @@ func ExampleComputeClient_BeginCreateOrUpdate_updateAnAksCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AKS{
// Properties: &armmachinelearning.AKSSchemaProperties{
// AgentCount: to.Ptr[int32](4),
// },
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_updateAAmlCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.AmlCompute{
Properties: &armmachinelearning.AmlComputeProperties{
ScaleSettings: &armmachinelearning.ScaleSettings{
@ -41,6 +41,48 @@ func ExampleComputeClient_BeginCreateOrUpdate_updateAAmlCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AmlCompute{
// Properties: &armmachinelearning.AmlComputeProperties{
// AllocationState: to.Ptr(armmachinelearning.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-27T22:28:08.998Z"); return t}()),
// CurrentNodeCount: to.Ptr[int32](0),
// EnableNodePublicIP: to.Ptr(true),
// IsolatedNetwork: to.Ptr(false),
// NodeStateCounts: &armmachinelearning.NodeStateCounts{
// IdleNodeCount: to.Ptr[int32](0),
// LeavingNodeCount: to.Ptr[int32](0),
// PreemptedNodeCount: to.Ptr[int32](0),
// PreparingNodeCount: to.Ptr[int32](0),
// RunningNodeCount: to.Ptr[int32](0),
// UnusableNodeCount: to.Ptr[int32](0),
// },
// OSType: to.Ptr(armmachinelearning.OsTypeWindows),
// RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessEnabled),
// ScaleSettings: &armmachinelearning.ScaleSettings{
// MaxNodeCount: to.Ptr[int32](1),
// MinNodeCount: to.Ptr[int32](0),
// NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"),
// },
// Subnet: &armmachinelearning.ResourceID{
// ID: to.Ptr("test-subnet-resource-id"),
// },
// TargetNodeCount: to.Ptr[int32](1),
// VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated),
// VMSize: to.Ptr("STANDARD_NC6"),
// },
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus2"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_createAnAksCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.AKS{
ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
},
@ -33,6 +33,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnAksCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AKS{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_createAAmlCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.AmlCompute{
Properties: &armmachinelearning.AmlComputeProperties{
EnableNodePublicIP: to.Ptr(true),
@ -49,6 +49,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAAmlCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AmlCompute{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_createADataFactoryCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.DataFactory{
ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory),
},
@ -33,6 +33,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createADataFactoryCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.DataFactory{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json
func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.ComputeInstance{
ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
Properties: &armmachinelearning.ComputeInstanceProperties{
@ -50,6 +50,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.ComputeInstance{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json
func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithMinimalInputs() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.ComputeInstance{
ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
Properties: &armmachinelearning.ComputeInstanceProperties{
@ -36,6 +36,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWith
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.ComputeInstance{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json
func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithSchedules() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.ComputeInstance{
ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
Properties: &armmachinelearning.ComputeInstanceProperties{
@ -60,6 +60,17 @@ func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWith
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.ComputeInstance{
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json
func ExampleComputeClient_BeginCreateOrUpdate_attachAKubernetesCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
poller, err := clientFactory.NewComputeClient().BeginCreateOrUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ComputeResource{
Properties: &armmachinelearning.Kubernetes{
Description: to.Ptr("some compute"),
ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes),
@ -55,6 +55,40 @@ func ExampleComputeClient_BeginCreateOrUpdate_attachAKubernetesCompute() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.Kubernetes{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
// Properties: &armmachinelearning.KubernetesProperties{
// DefaultInstanceType: to.Ptr("defaultInstanceType"),
// ExtensionInstanceReleaseTrain: to.Ptr("stable"),
// InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{
// "defaultInstanceType": &armmachinelearning.InstanceTypeSchema{
// Resources: &armmachinelearning.InstanceTypeSchemaResources{
// Limits: map[string]*string{
// "cpu": to.Ptr("1"),
// "memory": to.Ptr("4Gi"),
// "nvidia.com/gpu": nil,
// },
// Requests: map[string]*string{
// "cpu": to.Ptr("1"),
// "memory": to.Ptr("4Gi"),
// "nvidia.com/gpu": nil,
// },
// },
// },
// },
// Namespace: to.Ptr("default"),
// },
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json
func ExampleComputeClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.UnderlyingResourceActionDelete, nil)
poller, err := clientFactory.NewComputeClient().BeginDelete(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.UnderlyingResourceActionDelete, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,36 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json
func ExampleComputeClient_Get_getAAksCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil)
res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AKS{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,63 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json
func ExampleComputeClient_Get_getAAmlCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil)
res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AmlCompute{
// Properties: &armmachinelearning.AmlComputeProperties{
// AllocationState: to.Ptr(armmachinelearning.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-27T22:28:08.998Z"); return t}()),
// CurrentNodeCount: to.Ptr[int32](0),
// EnableNodePublicIP: to.Ptr(true),
// IsolatedNetwork: to.Ptr(false),
// NodeStateCounts: &armmachinelearning.NodeStateCounts{
// IdleNodeCount: to.Ptr[int32](0),
// LeavingNodeCount: to.Ptr[int32](0),
// PreemptedNodeCount: to.Ptr[int32](0),
// PreparingNodeCount: to.Ptr[int32](0),
// RunningNodeCount: to.Ptr[int32](0),
// UnusableNodeCount: to.Ptr[int32](0),
// },
// OSType: to.Ptr(armmachinelearning.OsTypeWindows),
// RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessEnabled),
// ScaleSettings: &armmachinelearning.ScaleSettings{
// MaxNodeCount: to.Ptr[int32](1),
// MinNodeCount: to.Ptr[int32](0),
// NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"),
// },
// Subnet: &armmachinelearning.ResourceID{
// ID: to.Ptr("test-subnet-resource-id"),
// },
// TargetNodeCount: to.Ptr[int32](1),
// VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated),
// VMSize: to.Ptr("STANDARD_NC6"),
// },
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus2"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,69 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json
func ExampleComputeClient_Get_getAnComputeInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil)
res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.ComputeInstance{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// Properties: &armmachinelearning.ComputeInstanceProperties{
// ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyShared),
// Applications: []*armmachinelearning.ComputeInstanceApplication{
// {
// DisplayName: to.Ptr("Jupyter"),
// EndpointURI: to.Ptr("https://compute123.eastus2.azureml.net/jupyter"),
// }},
// ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal),
// ConnectivityEndpoints: &armmachinelearning.ComputeInstanceConnectivityEndpoints{
// PrivateIPAddress: to.Ptr("10.0.0.1"),
// PublicIPAddress: to.Ptr("10.0.0.1"),
// },
// CreatedBy: &armmachinelearning.ComputeInstanceCreatedBy{
// UserID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// UserName: to.Ptr("foobar@microsoft.com"),
// UserOrgID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// PersonalComputeInstanceSettings: &armmachinelearning.PersonalComputeInstanceSettings{
// AssignedUser: &armmachinelearning.AssignedUser{
// ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// },
// SSHSettings: &armmachinelearning.ComputeInstanceSSHSettings{
// AdminUserName: to.Ptr("azureuser"),
// SSHPort: to.Ptr[int32](22),
// SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessEnabled),
// },
// State: to.Ptr(armmachinelearning.ComputeInstanceStateRunning),
// Subnet: &armmachinelearning.ResourceID{
// ID: to.Ptr("test-subnet-resource-id"),
// },
// VMSize: to.Ptr("STANDARD_NC6"),
// },
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus2"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,58 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json
func ExampleComputeClient_Get_getAKubernetesCompute() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "testrg123", "workspaces123", "compute123", nil)
res, err := clientFactory.NewComputeClient().Get(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.Kubernetes{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// IsAttachedCompute: to.Ptr(true),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
// Properties: &armmachinelearning.KubernetesProperties{
// DefaultInstanceType: to.Ptr("defaultInstanceType"),
// ExtensionInstanceReleaseTrain: to.Ptr("stable"),
// InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{
// "defaultInstanceType": &armmachinelearning.InstanceTypeSchema{
// Resources: &armmachinelearning.InstanceTypeSchemaResources{
// Limits: map[string]*string{
// "cpu": to.Ptr("1"),
// "memory": to.Ptr("4Gi"),
// "nvidia.com/gpu": nil,
// },
// Requests: map[string]*string{
// "cpu": to.Ptr("1"),
// "memory": to.Ptr("4Gi"),
// "nvidia.com/gpu": nil,
// },
// },
// },
// },
// Namespace: to.Ptr("default"),
// },
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,26 +8,58 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json
func ExampleComputeClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("testrg123", "workspaces123", &armmachinelearning.ComputeClientListOptions{Skip: nil})
pager := clientFactory.NewComputeClient().NewListPager("testrg123", "workspaces123", &armmachinelearning.ComputeClientListOptions{Skip: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.PaginatedComputeResourcesList = armmachinelearning.PaginatedComputeResourcesList{
// Value: []*armmachinelearning.ComputeResource{
// {
// Properties: &armmachinelearning.AKS{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus"),
// },
// {
// Properties: &armmachinelearning.AKS{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ModifiedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T22:00:00.0000000+00:00"); return t}()),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute1234-56826-c9b00420020b2"),
// },
// Name: to.Ptr("compute1234"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute1234"),
// Location: to.Ptr("eastus"),
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,21 +8,30 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json
func ExampleComputeClient_ListKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.ListKeys(ctx, "testrg123", "workspaces123", "compute123", nil)
res, err := clientFactory.NewComputeClient().ListKeys(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armmachinelearning.ComputeClientListKeysResponse{
// ComputeSecretsClassification: &armmachinelearning.AksComputeSecrets{
// AdminKubeConfig: to.Ptr("admin kube config..."),
// ImagePullSecretName: to.Ptr("the image pull secret name"),
// UserKubeConfig: to.Ptr("user kube config..."),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,26 +8,45 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json
func ExampleComputeClient_NewListNodesPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListNodesPager("testrg123", "workspaces123", "compute123", nil)
pager := clientFactory.NewComputeClient().NewListNodesPager("testrg123", "workspaces123", "compute123", nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Nodes {
// TODO: use page item
for _, v := range page.Nodes {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AmlComputeNodesInformation = armmachinelearning.AmlComputeNodesInformation{
// Nodes: []*armmachinelearning.AmlComputeNodeInformation{
// {
// NodeID: to.Ptr("tvm-3601533753_1-20170719t162906z"),
// NodeState: to.Ptr(armmachinelearning.NodeStateRunning),
// Port: to.Ptr[int32](50000),
// PrivateIPAddress: to.Ptr("13.84.190.124"),
// PublicIPAddress: to.Ptr("13.84.190.134"),
// RunID: to.Ptr("2f378a44-38f2-443a-9f0d-9909d0b47890"),
// },
// {
// NodeID: to.Ptr("tvm-3601533753_2-20170719t162906z"),
// NodeState: to.Ptr(armmachinelearning.NodeStateIdle),
// Port: to.Ptr[int32](50001),
// PrivateIPAddress: to.Ptr("13.84.190.124"),
// PublicIPAddress: to.Ptr("13.84.190.134"),
// }},
// }
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json
func ExampleComputeClient_BeginUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ClusterUpdateParameters{
poller, err := clientFactory.NewComputeClient().BeginUpdate(ctx, "testrg123", "workspaces123", "compute123", armmachinelearning.ClusterUpdateParameters{
Properties: &armmachinelearning.ClusterUpdateProperties{
Properties: &armmachinelearning.ScaleSettingsInformation{
ScaleSettings: &armmachinelearning.ScaleSettings{
@ -38,6 +38,18 @@ func ExampleComputeClient_BeginUpdate() {
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComputeResource = armmachinelearning.ComputeResource{
// Properties: &armmachinelearning.AmlCompute{
// Description: to.Ptr("some compute"),
// ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute),
// ProvisioningState: to.Ptr(armmachinelearning.ProvisioningStateSucceeded),
// },
// Name: to.Ptr("compute123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/computes"),
// ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123"),
// Location: to.Ptr("eastus2"),
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json
func ExampleComputeClient_BeginRestart() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginRestart(ctx, "testrg123", "workspaces123", "compute123", nil)
poller, err := clientFactory.NewComputeClient().BeginRestart(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json
func ExampleComputeClient_BeginStart() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStart(ctx, "testrg123", "workspaces123", "compute123", nil)
poller, err := clientFactory.NewComputeClient().BeginStart(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json
func ExampleComputeClient_BeginStop() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStop(ctx, "testrg123", "workspaces123", "compute123", nil)
poller, err := clientFactory.NewComputeClient().BeginStop(ctx, "testrg123", "workspaces123", "compute123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -9,18 +9,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json
func ExampleDataContainersClient_CreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateOrUpdate(ctx, "testrg123", "workspace123", "datacontainer123", armmachinelearning.DataContainer{
res, err := clientFactory.NewDataContainersClient().CreateOrUpdate(ctx, "testrg123", "workspace123", "datacontainer123", armmachinelearning.DataContainer{
Properties: &armmachinelearning.DataContainerProperties{
Description: to.Ptr("string"),
Properties: map[string]*string{
@ -37,6 +37,32 @@ func ExampleDataContainersClient_CreateOrUpdate() {
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DataContainer = armmachinelearning.DataContainer{
// Name: to.Ptr("datacontainer123"),
// Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/data"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspace123/data/datacontainer123"),
// SystemData: &armmachinelearning.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("John Smith"),
// CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T12:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("John Smith"),
// LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
// },
// Properties: &armmachinelearning.DataContainerProperties{
// Description: to.Ptr("string"),
// Properties: map[string]*string{
// "properties1": to.Ptr("value1"),
// "properties2": to.Ptr("value2"),
// },
// Tags: map[string]*string{
// "tag1": to.Ptr("value1"),
// "tag2": to.Ptr("value2"),
// },
// DataType: to.Ptr(armmachinelearning.DataType("UriFile")),
// },
// }
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Просмотреть файл

@ -8,18 +8,18 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json
func ExampleDataContainersClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil)
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "testrg123", "workspace123", "datacontainer123", nil)
_, err = clientFactory.NewDataContainersClient().Delete(ctx, "testrg123", "workspace123", "datacontainer123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.0.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fmachinelearning%2Farmmachinelearning%2Fv3.1.0/sdk/resourcemanager/machinelearning/armmachinelearning/README.md"}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше