From 587499de9dc41534759b65bb76b141f1f4eee4df Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 27 May 2022 01:25:00 +0000 Subject: [PATCH] CodeGen from PR 18940 in Azure/azure-rest-api-specs Mipatera 2022 06 01 batch management (#18940) * Baseline commit * Swagger file and readme Swapped swaggers * Examples * Ran prettier Prettier * Added identifiers minor Missing identifier * Prettier * removing 200 response * Removed 200 from example Co-authored-by: wiboris --- .../batch/armbatch/CHANGELOG.md | 25 ++ .../batch/armbatch/autorest.md | 6 +- sdk/resourcemanager/batch/armbatch/go.mod | 12 +- sdk/resourcemanager/batch/armbatch/go.sum | 25 +- ...nerated_example_application_client_test.go | 147 -------- ..._example_applicationpackage_client_test.go | 142 -------- ...erated_example_batchaccount_client_test.go | 323 ------------------ ...nerated_example_certificate_client_test.go | 181 ---------- ..._generated_example_location_client_test.go | 64 ---- ...enerated_example_operations_client_test.go | 41 --- .../ze_generated_example_pool_client_test.go | 211 ------------ ...e_privateendpointconnection_client_test.go | 102 ------ ...example_privatelinkresource_client_test.go | 66 ---- .../armbatch/zz_generated_account_client.go | 52 +-- .../zz_generated_application_client.go | 20 +- .../zz_generated_applicationpackage_client.go | 20 +- .../zz_generated_certificate_client.go | 26 +- .../batch/armbatch/zz_generated_constants.go | 41 ++- .../armbatch/zz_generated_location_client.go | 16 +- .../batch/armbatch/zz_generated_models.go | 86 +++-- .../armbatch/zz_generated_models_serde.go | 21 ++ .../zz_generated_operations_client.go | 4 +- .../armbatch/zz_generated_pool_client.go | 30 +- ...erated_privateendpointconnection_client.go | 84 ++++- ...zz_generated_privatelinkresource_client.go | 8 +- .../armbatch/zz_generated_response_types.go | 5 + 26 files changed, 323 insertions(+), 1435 deletions(-) delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_application_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_applicationpackage_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_batchaccount_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_certificate_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_location_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_operations_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_pool_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_privateendpointconnection_client_test.go delete mode 100644 sdk/resourcemanager/batch/armbatch/ze_generated_example_privatelinkresource_client_test.go diff --git a/sdk/resourcemanager/batch/armbatch/CHANGELOG.md b/sdk/resourcemanager/batch/armbatch/CHANGELOG.md index 05223730557e..d8189d8837b1 100644 --- a/sdk/resourcemanager/batch/armbatch/CHANGELOG.md +++ b/sdk/resourcemanager/batch/armbatch/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 1.1.0 (2022-05-27) +### Features Added + +- New const `EndpointAccessDefaultActionDeny` +- New const `EndpointAccessDefaultActionAllow` +- New const `PrivateEndpointConnectionProvisioningStateCancelled` +- New const `PrivateEndpointConnectionProvisioningStateCreating` +- New const `PrivateEndpointConnectionProvisioningStateDeleting` +- New function `PrivateEndpointConnectionProperties.MarshalJSON() ([]byte, error)` +- New function `EndpointAccessProfile.MarshalJSON() ([]byte, error)` +- New function `PossibleEndpointAccessDefaultActionValues() []EndpointAccessDefaultAction` +- New function `*PrivateEndpointConnectionClient.BeginDelete(context.Context, string, string, string, *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)` +- New struct `EndpointAccessProfile` +- New struct `IPRule` +- New struct `NetworkProfile` +- New struct `PrivateEndpointConnectionClientBeginDeleteOptions` +- New struct `PrivateEndpointConnectionClientDeleteResponse` +- New field `NetworkProfile` in struct `AccountUpdateProperties` +- New field `PublicNetworkAccess` in struct `AccountUpdateProperties` +- New field `GroupIDs` in struct `PrivateEndpointConnectionProperties` +- New field `NetworkProfile` in struct `AccountCreateProperties` +- New field `NodeManagementEndpoint` in struct `AccountProperties` +- New field `NetworkProfile` in struct `AccountProperties` + + ## 1.0.0 (2022-05-17) ### Breaking Changes diff --git a/sdk/resourcemanager/batch/armbatch/autorest.md b/sdk/resourcemanager/batch/armbatch/autorest.md index d8e36ad19a79..9e1034014f74 100644 --- a/sdk/resourcemanager/batch/armbatch/autorest.md +++ b/sdk/resourcemanager/batch/armbatch/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/batch/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/batch/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/batch/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/batch/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/batch/armbatch/go.mod b/sdk/resourcemanager/batch/armbatch/go.mod index d2f7f2460c2e..6c41794a6a8d 100644 --- a/sdk/resourcemanager/batch/armbatch/go.mod +++ b/sdk/resourcemanager/batch/armbatch/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/batch/armbatch/go.sum b/sdk/resourcemanager/batch/armbatch/go.sum index ed5b814680ee..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/batch/armbatch/go.sum +++ b/sdk/resourcemanager/batch/armbatch/go.sum @@ -1,33 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_application_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_application_client_test.go deleted file mode 100644 index cf3d7e55df8a..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_application_client_test.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationCreate.json -func ExampleApplicationClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - &armbatch.ApplicationClientCreateOptions{Parameters: &armbatch.Application{ - Properties: &armbatch.ApplicationProperties{ - AllowUpdates: to.Ptr(false), - DisplayName: to.Ptr("myAppName"), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationDelete.json -func ExampleApplicationClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationGet.json -func ExampleApplicationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationUpdate.json -func ExampleApplicationClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - armbatch.Application{ - Properties: &armbatch.ApplicationProperties{ - AllowUpdates: to.Ptr(true), - DefaultVersion: to.Ptr("2"), - DisplayName: to.Ptr("myAppName"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationList.json -func ExampleApplicationClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("default-azurebatch-japaneast", - "sampleacct", - &armbatch.ApplicationClientListOptions{Maxresults: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_applicationpackage_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_applicationpackage_client_test.go deleted file mode 100644 index e951e71161b7..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_applicationpackage_client_test.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageActivate.json -func ExampleApplicationPackageClient_Activate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationPackageClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Activate(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - "1", - armbatch.ActivateApplicationPackageParameters{ - Format: to.Ptr("zip"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageCreate.json -func ExampleApplicationPackageClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationPackageClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - "1", - &armbatch.ApplicationPackageClientCreateOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageDelete.json -func ExampleApplicationPackageClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationPackageClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - "1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageGet.json -func ExampleApplicationPackageClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationPackageClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "app1", - "1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageList.json -func ExampleApplicationPackageClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewApplicationPackageClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("default-azurebatch-japaneast", - "sampleacct", - "app1", - &armbatch.ApplicationPackageClientListOptions{Maxresults: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_batchaccount_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_batchaccount_client_test.go deleted file mode 100644 index 47e6c10ce46c..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_batchaccount_client_test.go +++ /dev/null @@ -1,323 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_BYOS.json -func ExampleAccountClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "default-azurebatch-japaneast", - "sampleacct", - armbatch.AccountCreateParameters{ - Location: to.Ptr("japaneast"), - Properties: &armbatch.AccountCreateProperties{ - AutoStorage: &armbatch.AutoStorageBaseProperties{ - StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"), - }, - KeyVaultReference: &armbatch.KeyVaultReference{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"), - URL: to.Ptr("http://sample.vault.azure.net/"), - }, - PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountUpdate.json -func ExampleAccountClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "default-azurebatch-japaneast", - "sampleacct", - armbatch.AccountUpdateParameters{ - Properties: &armbatch.AccountUpdateProperties{ - AutoStorage: &armbatch.AutoStorageBaseProperties{ - StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountDelete.json -func ExampleAccountClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "default-azurebatch-japaneast", - "sampleacct", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGet.json -func ExampleAccountClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountList.json -func ExampleAccountClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListByResourceGroup.json -func ExampleAccountClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("default-azurebatch-japaneast", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountSynchronizeAutoStorageKeys.json -func ExampleAccountClient_SynchronizeAutoStorageKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.SynchronizeAutoStorageKeys(ctx, - "default-azurebatch-japaneast", - "sampleacct", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountRegenerateKey.json -func ExampleAccountClient_RegenerateKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.RegenerateKey(ctx, - "default-azurebatch-japaneast", - "sampleacct", - armbatch.AccountRegenerateKeyParameters{ - KeyName: to.Ptr(armbatch.AccountKeyTypePrimary), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGetKeys.json -func ExampleAccountClient_GetKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetKeys(ctx, - "default-azurebatch-japaneast", - "sampleacct", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorList.json -func ExampleAccountClient_NewListDetectorsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListDetectorsPager("default-azurebatch-japaneast", - "sampleacct", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorGet.json -func ExampleAccountClient_GetDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDetector(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "poolsAndNodes", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json -func ExampleAccountClient_NewListOutboundNetworkDependenciesEndpointsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewAccountClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOutboundNetworkDependenciesEndpointsPager("default-azurebatch-japaneast", - "sampleacct", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_certificate_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_certificate_client_test.go deleted file mode 100644 index 7fe0cd55b6e6..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_certificate_client_test.go +++ /dev/null @@ -1,181 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateList.json -func ExampleCertificateClient_NewListByBatchAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByBatchAccountPager("default-azurebatch-japaneast", - "sampleacct", - &armbatch.CertificateClientListByBatchAccountOptions{Maxresults: nil, - Select: nil, - Filter: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_Full.json -func ExampleCertificateClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - armbatch.CertificateCreateOrUpdateParameters{ - Properties: &armbatch.CertificateCreateOrUpdateProperties{ - Format: to.Ptr(armbatch.CertificateFormatPfx), - Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"), - ThumbprintAlgorithm: to.Ptr("sha1"), - Data: to.Ptr("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."), - Password: to.Ptr(""), - }, - }, - &armbatch.CertificateClientCreateOptions{IfMatch: nil, - IfNoneMatch: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateUpdate.json -func ExampleCertificateClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - armbatch.CertificateCreateOrUpdateParameters{ - Properties: &armbatch.CertificateCreateOrUpdateProperties{ - Data: to.Ptr("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."), - Password: to.Ptr(""), - }, - }, - &armbatch.CertificateClientUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateDelete.json -func ExampleCertificateClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateGet.json -func ExampleCertificateClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCancelDeletion.json -func ExampleCertificateClient_CancelDeletion() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewCertificateClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CancelDeletion(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_location_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_location_client_test.go deleted file mode 100644 index a56c34ca9f4b..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_location_client_test.go +++ /dev/null @@ -1,64 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationGetQuotas.json -func ExampleLocationClient_GetQuotas() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewLocationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetQuotas(ctx, - "japaneast", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationCheckNameAvailability_AlreadyExists.json -func ExampleLocationClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewLocationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "japaneast", - armbatch.CheckNameAvailabilityParameters{ - Name: to.Ptr("existingaccountname"), - Type: to.Ptr("Microsoft.Batch/batchAccounts"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_operations_client_test.go deleted file mode 100644 index 78fd5cbbef08..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_operations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/OperationsList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_pool_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_pool_client_test.go deleted file mode 100644 index db029a1496bd..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_pool_client_test.go +++ /dev/null @@ -1,211 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolList.json -func ExamplePoolClient_NewListByBatchAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByBatchAccountPager("default-azurebatch-japaneast", - "sampleacct", - &armbatch.PoolClientListByBatchAccountOptions{Maxresults: nil, - Select: nil, - Filter: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_SharedImageGallery.json -func ExamplePoolClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - armbatch.Pool{ - Properties: &armbatch.PoolProperties{ - DeploymentConfiguration: &armbatch.DeploymentConfiguration{ - VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ - ImageReference: &armbatch.ImageReference{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"), - }, - NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), - }, - }, - VMSize: to.Ptr("STANDARD_D4"), - }, - }, - &armbatch.PoolClientCreateOptions{IfMatch: nil, - IfNoneMatch: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_EnableAutoScale.json -func ExamplePoolClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - armbatch.Pool{ - Properties: &armbatch.PoolProperties{ - ScaleSettings: &armbatch.ScaleSettings{ - AutoScale: &armbatch.AutoScaleSettings{ - Formula: to.Ptr("$TargetDedicatedNodes=34"), - }, - }, - }, - }, - &armbatch.PoolClientUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDelete.json -func ExamplePoolClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolGet.json -func ExamplePoolClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDisableAutoScale.json -func ExamplePoolClient_DisableAutoScale() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.DisableAutoScale(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolStopResize.json -func ExamplePoolClient_StopResize() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPoolClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.StopResize(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testpool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_privateendpointconnection_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_privateendpointconnection_client_test.go deleted file mode 100644 index 8d47d8e27656..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_privateendpointconnection_client_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionsList.json -func ExamplePrivateEndpointConnectionClient_NewListByBatchAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPrivateEndpointConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByBatchAccountPager("default-azurebatch-japaneast", - "sampleacct", - &armbatch.PrivateEndpointConnectionClientListByBatchAccountOptions{Maxresults: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionGet.json -func ExamplePrivateEndpointConnectionClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPrivateEndpointConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionUpdate.json -func ExamplePrivateEndpointConnectionClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPrivateEndpointConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - armbatch.PrivateEndpointConnection{ - Properties: &armbatch.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Approved by xyz.abc@company.com"), - Status: to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved), - }, - }, - }, - &armbatch.PrivateEndpointConnectionClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/batch/armbatch/ze_generated_example_privatelinkresource_client_test.go b/sdk/resourcemanager/batch/armbatch/ze_generated_example_privatelinkresource_client_test.go deleted file mode 100644 index 6b2e16942a8d..000000000000 --- a/sdk/resourcemanager/batch/armbatch/ze_generated_example_privatelinkresource_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armbatch_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourcesList.json -func ExamplePrivateLinkResourceClient_NewListByBatchAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPrivateLinkResourceClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByBatchAccountPager("default-azurebatch-japaneast", - "sampleacct", - &armbatch.PrivateLinkResourceClientListByBatchAccountOptions{Maxresults: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourceGet.json -func ExamplePrivateLinkResourceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armbatch.NewPrivateLinkResourceClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "default-azurebatch-japaneast", - "sampleacct", - "sampleacct", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_account_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_account_client.go index a431ee5fdeaa..e1f5f5de0612 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_account_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_account_client.go @@ -57,7 +57,7 @@ func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this // API and should instead be updated with the Update Batch Account API. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - A name for the Batch account which must be unique within the region. Batch account names must be between // 3 and 24 characters in length and must use only numbers and lowercase letters. This name is @@ -82,7 +82,7 @@ func (client *AccountClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and // should instead be updated with the Update Batch Account API. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 func (client *AccountClient) create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, parameters, options) if err != nil { @@ -118,7 +118,7 @@ func (client *AccountClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -126,7 +126,7 @@ func (client *AccountClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Deletes the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientBeginDeleteOptions contains the optional parameters for the AccountClient.BeginDelete method. @@ -146,7 +146,7 @@ func (client *AccountClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 func (client *AccountClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, options) if err != nil { @@ -182,7 +182,7 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets information about the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. @@ -229,7 +229,7 @@ func (client *AccountClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,7 +246,7 @@ func (client *AccountClient) getHandleResponse(resp *http.Response) (AccountClie // GetDetector - Gets information about the given detector for a given Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // detectorID - The name of the detector. @@ -290,7 +290,7 @@ func (client *AccountClient) getDetectorCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *AccountClient) getDetectorHandleResponse(resp *http.Response) (Acc // use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys // will fail. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientGetKeysOptions contains the optional parameters for the AccountClient.GetKeys method. @@ -349,7 +349,7 @@ func (client *AccountClient) getKeysCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -366,7 +366,7 @@ func (client *AccountClient) getKeysHandleResponse(resp *http.Response) (Account // NewListPager - Gets information about the Batch accounts associated with the subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // options - AccountClientListOptions contains the optional parameters for the AccountClient.List method. func (client *AccountClient) NewListPager(options *AccountClientListOptions) *runtime.Pager[AccountClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AccountClientListResponse]{ @@ -408,7 +408,7 @@ func (client *AccountClient) listCreateRequest(ctx context.Context, options *Acc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -425,7 +425,7 @@ func (client *AccountClient) listHandleResponse(resp *http.Response) (AccountCli // NewListByResourceGroupPager - Gets information about the Batch accounts associated with the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // options - AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.ListByResourceGroup // method. @@ -473,7 +473,7 @@ func (client *AccountClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -490,7 +490,7 @@ func (client *AccountClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListDetectorsPager - Gets information about the detectors available for a given Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientListDetectorsOptions contains the optional parameters for the AccountClient.ListDetectors method. @@ -542,7 +542,7 @@ func (client *AccountClient) listDetectorsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -564,7 +564,7 @@ func (client *AccountClient) listDetectorsHandleResponse(resp *http.Response) (A // Batch to mark the affected nodes as unusable. For more information about // creating a pool inside of a virtual network, see https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the AccountClient.ListOutboundNetworkDependenciesEndpoints @@ -617,7 +617,7 @@ func (client *AccountClient) listOutboundNetworkDependenciesEndpointsCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -637,7 +637,7 @@ func (client *AccountClient) listOutboundNetworkDependenciesEndpointsHandleRespo // use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the // keys will fail. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // parameters - The type of key to regenerate. @@ -677,7 +677,7 @@ func (client *AccountClient) regenerateKeyCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -695,7 +695,7 @@ func (client *AccountClient) regenerateKeyHandleResponse(resp *http.Response) (A // SynchronizeAutoStorageKeys - Synchronizes access keys for the auto-storage account configured for the specified Batch account, // only if storage key authentication is being used. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - AccountClientSynchronizeAutoStorageKeysOptions contains the optional parameters for the AccountClient.SynchronizeAutoStorageKeys @@ -735,7 +735,7 @@ func (client *AccountClient) synchronizeAutoStorageKeysCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -743,7 +743,7 @@ func (client *AccountClient) synchronizeAutoStorageKeysCreateRequest(ctx context // Update - Updates the properties of an existing Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // parameters - Additional parameters for account update. @@ -783,7 +783,7 @@ func (client *AccountClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_application_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_application_client.go index ce34766564a6..3a74b700ddf3 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_application_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_application_client.go @@ -57,7 +57,7 @@ func NewApplicationClient(subscriptionID string, credential azcore.TokenCredenti // Create - Adds an application to the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -101,7 +101,7 @@ func (client *ApplicationClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -121,7 +121,7 @@ func (client *ApplicationClient) createHandleResponse(resp *http.Response) (Appl // Delete - Deletes an application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -165,7 +165,7 @@ func (client *ApplicationClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,7 +173,7 @@ func (client *ApplicationClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets information about the specified application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -217,7 +217,7 @@ func (client *ApplicationClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *ApplicationClient) getHandleResponse(resp *http.Response) (Applica // NewListPager - Lists all of the applications in the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - ApplicationClientListOptions contains the optional parameters for the ApplicationClient.List method. @@ -289,7 +289,7 @@ func (client *ApplicationClient) listCreateRequest(ctx context.Context, resource if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *ApplicationClient) listHandleResponse(resp *http.Response) (Applic // Update - Updates settings for the specified application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -351,7 +351,7 @@ func (client *ApplicationClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_applicationpackage_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_applicationpackage_client.go index 74f68ee3ddcf..c1ff3a0703bb 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_applicationpackage_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_applicationpackage_client.go @@ -59,7 +59,7 @@ func NewApplicationPackageClient(subscriptionID string, credential azcore.TokenC // uploaded. This needs to be done before an ApplicationPackage can be used on Pools or // Tasks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -110,7 +110,7 @@ func (client *ApplicationPackageClient) activateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -130,7 +130,7 @@ func (client *ApplicationPackageClient) activateHandleResponse(resp *http.Respon // ApplicationPackageActive before it can be used. If the auto storage account was configured to use storage keys, the URL // returned will contain a SAS. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -180,7 +180,7 @@ func (client *ApplicationPackageClient) createCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -200,7 +200,7 @@ func (client *ApplicationPackageClient) createHandleResponse(resp *http.Response // Delete - Deletes an application package record and its associated binary file. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -250,7 +250,7 @@ func (client *ApplicationPackageClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ func (client *ApplicationPackageClient) deleteCreateRequest(ctx context.Context, // Get - Gets information about the specified application package. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -307,7 +307,7 @@ func (client *ApplicationPackageClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +324,7 @@ func (client *ApplicationPackageClient) getHandleResponse(resp *http.Response) ( // NewListPager - Lists all of the application packages in the specified application. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // applicationName - The name of the application. This must be unique within the account. @@ -384,7 +384,7 @@ func (client *ApplicationPackageClient) listCreateRequest(ctx context.Context, r if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_certificate_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_certificate_client.go index c07c16388308..9f79cb534cc4 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_certificate_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_certificate_client.go @@ -61,7 +61,7 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // you do not need to run this operation after the deletion failed. You must make // sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -107,7 +107,7 @@ func (client *CertificateClient) cancelDeletionCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,7 +127,7 @@ func (client *CertificateClient) cancelDeletionHandleResponse(resp *http.Respons // Create - Creates a new certificate inside the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -173,7 +173,7 @@ func (client *CertificateClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -199,7 +199,7 @@ func (client *CertificateClient) createHandleResponse(resp *http.Response) (Cert // BeginDelete - Deletes the specified certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -221,7 +221,7 @@ func (client *CertificateClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 func (client *CertificateClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, certificateName string, options *CertificateClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, certificateName, options) if err != nil { @@ -261,7 +261,7 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +269,7 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets information about the specified certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -314,7 +314,7 @@ func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -334,7 +334,7 @@ func (client *CertificateClient) getHandleResponse(resp *http.Response) (Certifi // NewListByBatchAccountPager - Lists all of the certificates in the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - CertificateClientListByBatchAccountOptions contains the optional parameters for the CertificateClient.ListByBatchAccount @@ -396,7 +396,7 @@ func (client *CertificateClient) listByBatchAccountCreateRequest(ctx context.Con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -413,7 +413,7 @@ func (client *CertificateClient) listByBatchAccountHandleResponse(resp *http.Res // Update - Updates the properties of an existing certificate. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -459,7 +459,7 @@ func (client *CertificateClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_constants.go b/sdk/resourcemanager/batch/armbatch/zz_generated_constants.go index b077df24deda..9b266a3d967d 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_constants.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_constants.go @@ -10,7 +10,7 @@ package armbatch const ( moduleName = "armbatch" - moduleVersion = "v1.0.0" + moduleVersion = "v1.1.0" ) // AccountKeyType - The type of account key to regenerate. @@ -321,8 +321,8 @@ type DynamicVNetAssignmentScope string const ( // DynamicVNetAssignmentScopeNone - No dynamic VNet assignment is enabled. DynamicVNetAssignmentScopeNone DynamicVNetAssignmentScope = "none" - // DynamicVNetAssignmentScopeJob - Dynamic VNet assignment is done per-job. Don't use this option unless your batch account - // has been approved to use this feature. + // DynamicVNetAssignmentScopeJob - Dynamic VNet assignment is done per-job. If this value is set, the network configuration + // subnet ID must also be set. This feature requires approval before use, please contact support DynamicVNetAssignmentScopeJob DynamicVNetAssignmentScope = "job" ) @@ -352,6 +352,24 @@ func PossibleElevationLevelValues() []ElevationLevel { } } +// EndpointAccessDefaultAction - Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. +type EndpointAccessDefaultAction string + +const ( + // EndpointAccessDefaultActionAllow - Allow client access. + EndpointAccessDefaultActionAllow EndpointAccessDefaultAction = "Allow" + // EndpointAccessDefaultActionDeny - Deny client access. + EndpointAccessDefaultActionDeny EndpointAccessDefaultAction = "Deny" +) + +// PossibleEndpointAccessDefaultActionValues returns the possible values for the EndpointAccessDefaultAction const type. +func PossibleEndpointAccessDefaultActionValues() []EndpointAccessDefaultAction { + return []EndpointAccessDefaultAction{ + EndpointAccessDefaultActionAllow, + EndpointAccessDefaultActionDeny, + } +} + // IPAddressProvisioningType - The provisioning type for Public IP Addresses for the Batch Pool. type IPAddressProvisioningType string @@ -585,23 +603,32 @@ func PossiblePoolProvisioningStateValues() []PoolProvisioningState { type PrivateEndpointConnectionProvisioningState string const ( - // PrivateEndpointConnectionProvisioningStateSucceeded - The connection status is final and is ready for use if Status is - // Approved. - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" + // PrivateEndpointConnectionProvisioningStateCreating - The connection is creating. + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" // PrivateEndpointConnectionProvisioningStateUpdating - The user has requested that the connection status be updated, but // the update operation has not yet completed. You may not reference the connection when connecting the Batch account. PrivateEndpointConnectionProvisioningStateUpdating PrivateEndpointConnectionProvisioningState = "Updating" + // PrivateEndpointConnectionProvisioningStateDeleting - The connection is deleting. + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + // PrivateEndpointConnectionProvisioningStateSucceeded - The connection status is final and is ready for use if Status is + // Approved. + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" // PrivateEndpointConnectionProvisioningStateFailed - The user requested that the connection be updated and it failed. You // may retry the update operation. PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + // PrivateEndpointConnectionProvisioningStateCancelled - The user has cancelled the connection creation. + PrivateEndpointConnectionProvisioningStateCancelled PrivateEndpointConnectionProvisioningState = "Cancelled" ) // PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { return []PrivateEndpointConnectionProvisioningState{ - PrivateEndpointConnectionProvisioningStateSucceeded, + PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateUpdating, + PrivateEndpointConnectionProvisioningStateDeleting, + PrivateEndpointConnectionProvisioningStateSucceeded, PrivateEndpointConnectionProvisioningStateFailed, + PrivateEndpointConnectionProvisioningStateCancelled, } } diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_location_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_location_client.go index 391f6759cfaf..babf7c70bd5a 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_location_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_location_client.go @@ -57,7 +57,7 @@ func NewLocationClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks whether the Batch account name is available in the specified region. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // locationName - The desired region for the name check. // parameters - Properties needed to check the availability of a name. // options - LocationClientCheckNameAvailabilityOptions contains the optional parameters for the LocationClient.CheckNameAvailability @@ -93,7 +93,7 @@ func (client *LocationClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -110,7 +110,7 @@ func (client *LocationClient) checkNameAvailabilityHandleResponse(resp *http.Res // GetQuotas - Gets the Batch service quotas for the specified subscription at the given location. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // locationName - The region for which to retrieve Batch service quotas. // options - LocationClientGetQuotasOptions contains the optional parameters for the LocationClient.GetQuotas method. func (client *LocationClient) GetQuotas(ctx context.Context, locationName string, options *LocationClientGetQuotasOptions) (LocationClientGetQuotasResponse, error) { @@ -144,7 +144,7 @@ func (client *LocationClient) getQuotasCreateRequest(ctx context.Context, locati return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +162,7 @@ func (client *LocationClient) getQuotasHandleResponse(resp *http.Response) (Loca // NewListSupportedCloudServiceSKUsPager - Gets the list of Batch supported Cloud Service VM sizes available at the given // location. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // locationName - The region for which to retrieve Batch service supported SKUs. // options - LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.ListSupportedCloudServiceSKUs // method. @@ -216,7 +216,7 @@ func (client *LocationClient) listSupportedCloudServiceSKUsCreateRequest(ctx con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *LocationClient) listSupportedCloudServiceSKUsHandleResponse(resp * // NewListSupportedVirtualMachineSKUsPager - Gets the list of Batch supported Virtual Machine VM sizes available at the given // location. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // locationName - The region for which to retrieve Batch service supported SKUs. // options - LocationClientListSupportedVirtualMachineSKUsOptions contains the optional parameters for the LocationClient.ListSupportedVirtualMachineSKUs // method. @@ -288,7 +288,7 @@ func (client *LocationClient) listSupportedVirtualMachineSKUsCreateRequest(ctx c if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_models.go b/sdk/resourcemanager/batch/armbatch/zz_generated_models.go index fc5eb316f31b..e9ed05a5051e 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_models.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_models.go @@ -130,6 +130,9 @@ type AccountCreateProperties struct { // A reference to the Azure key vault associated with the Batch account. KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"` + // The network profile only takes effect when publicNetworkAccess is enabled. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, // clients may authenticate using access keys or Azure Active Directory. If the // mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. @@ -179,6 +182,12 @@ type AccountListResult struct { // AccountProperties - Account specific properties. type AccountProperties struct { + // The network profile only takes effect when publicNetworkAccess is enabled. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + + // If not specified, the default value is 'enabled'. + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` + // READ-ONLY; The account endpoint used to interact with the Batch service. AccountEndpoint *string `json:"accountEndpoint,omitempty" azure:"ro"` @@ -201,12 +210,9 @@ type AccountProperties struct { // not returned. DedicatedCoreQuotaPerVMFamily []*VirtualMachineFamilyCoreQuota `json:"dedicatedCoreQuotaPerVMFamily,omitempty" azure:"ro"` - // READ-ONLY; Batch is transitioning its core quota system for dedicated cores to be enforced per Virtual Machine family. - // During this transitional phase, the dedicated core quota per Virtual Machine family may not - // yet be enforced. If this flag is false, dedicated core quota is enforced via the old dedicatedCoreQuota property on the - // account and does not consider Virtual Machine family. If this flag is true, - // dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the account, and the old dedicatedCoreQuota - // does not apply. + // READ-ONLY; If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota + // properties on the account. If this flag is false, dedicated core quota is + // enforced only via the dedicatedCoreQuota property on the account and does not consider Virtual Machine family. DedicatedCoreQuotaPerVMFamilyEnforced *bool `json:"dedicatedCoreQuotaPerVMFamilyEnforced,omitempty" azure:"ro"` // READ-ONLY; Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using @@ -221,6 +227,9 @@ type AccountProperties struct { // is not returned. LowPriorityCoreQuota *int32 `json:"lowPriorityCoreQuota,omitempty" azure:"ro"` + // READ-ONLY; The endpoint used by compute node to connect to the Batch node management service. + NodeManagementEndpoint *string `json:"nodeManagementEndpoint,omitempty" azure:"ro"` + // READ-ONLY; The allocation mode for creating pools in the Batch account. PoolAllocationMode *PoolAllocationMode `json:"poolAllocationMode,omitempty" azure:"ro"` @@ -232,9 +241,6 @@ type AccountProperties struct { // READ-ONLY; The provisioned state of the resource ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; If not specified, the default value is 'enabled'. - PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty" azure:"ro"` } // AccountRegenerateKeyParameters - Parameters supplied to the RegenerateKey operation. @@ -268,6 +274,12 @@ type AccountUpdateProperties struct { // managed key. For additional control, a customer-managed key can be used // instead. Encryption *EncryptionProperties `json:"encryption,omitempty"` + + // The network profile only takes effect when publicNetworkAccess is enabled. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + + // If not specified, the default value is 'enabled'. + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` } // ActivateApplicationPackageParameters - Parameters for an activating an application package. @@ -915,6 +927,15 @@ type EncryptionProperties struct { KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` } +// EndpointAccessProfile - Network access profile for Batch endpoint. +type EndpointAccessProfile struct { + // REQUIRED; Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. + DefaultAction *EndpointAccessDefaultAction `json:"defaultAction,omitempty"` + + // Array of IP ranges to filter client IP address. + IPRules []*IPRule `json:"ipRules,omitempty"` +} + // EndpointDependency - A domain name and connection details used to access a dependency. type EndpointDependency struct { // READ-ONLY; Human-readable supplemental information about the dependency and when it is applicable. @@ -959,6 +980,15 @@ type FixedScaleSettings struct { TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` } +// IPRule - Rule to filter client IP address. +type IPRule struct { + // REQUIRED; Action when client IP address is matched. + Action *string `json:"action,omitempty"` + + // REQUIRED; IPv4 address, or IPv4 address range in CIDR format. + Value *string `json:"value,omitempty"` +} + // ImageReference - A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual // Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List // supported node agent SKUs' operation. @@ -1204,6 +1234,15 @@ type NetworkConfiguration struct { SubnetID *string `json:"subnetId,omitempty"` } +// NetworkProfile - Network profile for Batch account, which contains network rule settings for each endpoint. +type NetworkProfile struct { + // Network access profile for batchAccount endpoint (Batch account data plane API). + AccountAccess *EndpointAccessProfile `json:"accountAccess,omitempty"` + + // Network access profile for nodeManagement endpoint (Batch service managing compute nodes for Batch pools). + NodeManagementAccess *EndpointAccessProfile `json:"nodeManagementAccess,omitempty"` +} + // NetworkSecurityGroupRule - A network security group rule to apply to an inbound endpoint. type NetworkSecurityGroupRule struct { // REQUIRED; The action that should be taken for a specified IP address, subnet range or tag. @@ -1479,7 +1518,7 @@ type PoolProperties struct { // READ-ONLY; The number of compute nodes currently in the pool. CurrentDedicatedNodes *int32 `json:"currentDedicatedNodes,omitempty" azure:"ro"` - // READ-ONLY; The number of Spot/low-priority compute nodes currently in the pool. + // READ-ONLY; The number of low-priority compute nodes currently in the pool. CurrentLowPriorityNodes *int32 `json:"currentLowPriorityNodes,omitempty" azure:"ro"` // READ-ONLY; This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. @@ -1521,6 +1560,13 @@ type PrivateEndpointConnection struct { Type *string `json:"type,omitempty" azure:"ro"` } +// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +type PrivateEndpointConnectionClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // PrivateEndpointConnectionClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginUpdate // method. type PrivateEndpointConnectionClientBeginUpdateOptions struct { @@ -1546,12 +1592,15 @@ type PrivateEndpointConnectionClientListByBatchAccountOptions struct { // PrivateEndpointConnectionProperties - Private endpoint connection properties. type PrivateEndpointConnectionProperties struct { - // The private endpoint of the private endpoint connection. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - // The private link service connection state of the private endpoint connection PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // READ-ONLY; The value has one and only one group id. + GroupIDs []*string `json:"groupIds,omitempty" azure:"ro"` + + // READ-ONLY; The private endpoint of the private endpoint connection. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"` + // READ-ONLY; The provisioning state of the private endpoint connection. ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } @@ -1627,9 +1676,9 @@ type ProxyResource struct { // PublicIPAddressConfiguration - The public IP Address configuration of the networking configuration of a Pool. type PublicIPAddressConfiguration struct { - // The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/low-priority nodes - // can be allocated for each public IP. For example, a pool needing 250 dedicated - // VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + // The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 low-priority nodes can + // be allocated for each public IP. For example, a pool needing 250 dedicated VMs + // would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. IPAddressIDs []*string `json:"ipAddressIds,omitempty"` // The default value is BatchManaged @@ -1668,7 +1717,7 @@ type ResizeOperationStatus struct { // The desired number of dedicated compute nodes in the pool. TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"` - // The desired number of Spot/low-priority compute nodes in the pool. + // The desired number of low-priority compute nodes in the pool. TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"` } @@ -1777,8 +1826,7 @@ type StartTask struct { // retries. The Batch service will try the task once, and may then retry up to this // limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). // If the maximum retry count is 0, the Batch service does not retry the task. If - // the maximum retry count is -1, the Batch service retries the task without limit, however this is not recommended for a - // start task or any task. The default value is 0 (no retries). + // the maximum retry count is -1, the Batch service retries the task without limit. MaxTaskRetryCount *int32 `json:"maxTaskRetryCount,omitempty"` // A list of files that the Batch service will download to the compute node before running the command line. diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_models_serde.go b/sdk/resourcemanager/batch/armbatch/zz_generated_models_serde.go index e83e9d447943..b049c28c115e 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_models_serde.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_models_serde.go @@ -32,6 +32,7 @@ func (a AccountCreateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "autoStorage", a.AutoStorage) populate(objectMap, "encryption", a.Encryption) populate(objectMap, "keyVaultReference", a.KeyVaultReference) + populate(objectMap, "networkProfile", a.NetworkProfile) populate(objectMap, "poolAllocationMode", a.PoolAllocationMode) populate(objectMap, "publicNetworkAccess", a.PublicNetworkAccess) return json.Marshal(objectMap) @@ -62,6 +63,8 @@ func (a AccountUpdateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "allowedAuthenticationModes", a.AllowedAuthenticationModes) populate(objectMap, "autoStorage", a.AutoStorage) populate(objectMap, "encryption", a.Encryption) + populate(objectMap, "networkProfile", a.NetworkProfile) + populate(objectMap, "publicNetworkAccess", a.PublicNetworkAccess) return json.Marshal(objectMap) } @@ -308,6 +311,14 @@ func (d DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// MarshalJSON implements the json.Marshaller interface for type EndpointAccessProfile. +func (e EndpointAccessProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultAction", e.DefaultAction) + populate(objectMap, "ipRules", e.IPRules) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type InboundNatPool. func (i InboundNatPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -491,6 +502,16 @@ func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_operations_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_operations_client.go index fa6b4865ee0e..bca3a12d0c4a 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_operations_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists available operations for the Microsoft.Batch provider // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -88,7 +88,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_pool_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_pool_client.go index 13fb12645b74..dee7d209d329 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_pool_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_pool_client.go @@ -57,7 +57,7 @@ func NewPoolClient(subscriptionID string, credential azcore.TokenCredential, opt // Create - Creates a new pool inside the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -102,7 +102,7 @@ func (client *PoolClient) createCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -128,7 +128,7 @@ func (client *PoolClient) createHandleResponse(resp *http.Response) (PoolClientC // BeginDelete - Deletes the specified pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -149,7 +149,7 @@ func (client *PoolClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes the specified pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 func (client *PoolClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, options) if err != nil { @@ -189,7 +189,7 @@ func (client *PoolClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ func (client *PoolClient) deleteCreateRequest(ctx context.Context, resourceGroup // DisableAutoScale - Disables automatic scaling for a pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -241,7 +241,7 @@ func (client *PoolClient) disableAutoScaleCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,7 +261,7 @@ func (client *PoolClient) disableAutoScaleHandleResponse(resp *http.Response) (P // Get - Gets information about the specified pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -305,7 +305,7 @@ func (client *PoolClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +325,7 @@ func (client *PoolClient) getHandleResponse(resp *http.Response) (PoolClientGetR // NewListByBatchAccountPager - Lists all of the pools in the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - PoolClientListByBatchAccountOptions contains the optional parameters for the PoolClient.ListByBatchAccount method. @@ -386,7 +386,7 @@ func (client *PoolClient) listByBatchAccountCreateRequest(ctx context.Context, r if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -407,7 +407,7 @@ func (client *PoolClient) listByBatchAccountHandleResponse(resp *http.Response) // state changes first to stopping and then to steady. A resize operation need // not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -451,7 +451,7 @@ func (client *PoolClient) stopResizeCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -471,7 +471,7 @@ func (client *PoolClient) stopResizeHandleResponse(resp *http.Response) (PoolCli // Update - Updates the properties of an existing pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // poolName - The pool name. This must be unique within the account. @@ -517,7 +517,7 @@ func (client *PoolClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_privateendpointconnection_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_privateendpointconnection_client.go index b6d8be8830a5..b8e53786d757 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_privateendpointconnection_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_privateendpointconnection_client.go @@ -55,9 +55,79 @@ func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore return client, nil } +// BeginDelete - Deletes the specified private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-06-01 +// resourceGroupName - The name of the resource group that contains the Batch account. +// accountName - The name of the Batch account. +// privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. +// options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateEndpointConnectionClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Deletes the specified private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-06-01 +func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-06-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // Get - Gets information about the specified private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. @@ -102,7 +172,7 @@ func (client *PrivateEndpointConnectionClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +189,7 @@ func (client *PrivateEndpointConnectionClient) getHandleResponse(resp *http.Resp // NewListByBatchAccountPager - Lists all of the private endpoint connections in the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - PrivateEndpointConnectionClientListByBatchAccountOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListByBatchAccount @@ -172,7 +242,7 @@ func (client *PrivateEndpointConnectionClient) listByBatchAccountCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } @@ -192,7 +262,7 @@ func (client *PrivateEndpointConnectionClient) listByBatchAccountHandleResponse( // BeginUpdate - Updates the properties of an existing private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. @@ -216,7 +286,7 @@ func (client *PrivateEndpointConnectionClient) BeginUpdate(ctx context.Context, // Update - Updates the properties of an existing private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 func (client *PrivateEndpointConnectionClient) update(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, privateEndpointConnectionName, parameters, options) if err != nil { @@ -256,7 +326,7 @@ func (client *PrivateEndpointConnectionClient) updateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_privatelinkresource_client.go b/sdk/resourcemanager/batch/armbatch/zz_generated_privatelinkresource_client.go index 5f56860df3d9..ae52c47badf4 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_privatelinkresource_client.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_privatelinkresource_client.go @@ -57,7 +57,7 @@ func NewPrivateLinkResourceClient(subscriptionID string, credential azcore.Token // Get - Gets information about the specified private link resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // privateLinkResourceName - The private link resource name. This must be unique within the account. @@ -101,7 +101,7 @@ func (client *PrivateLinkResourceClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *PrivateLinkResourceClient) getHandleResponse(resp *http.Response) // NewListByBatchAccountPager - Lists all of the private link resources in the specified account. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 +// Generated from API version 2022-06-01 // resourceGroupName - The name of the resource group that contains the Batch account. // accountName - The name of the Batch account. // options - PrivateLinkResourceClientListByBatchAccountOptions contains the optional parameters for the PrivateLinkResourceClient.ListByBatchAccount @@ -171,7 +171,7 @@ func (client *PrivateLinkResourceClient) listByBatchAccountCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") + reqQP.Set("api-version", "2022-06-01") if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } diff --git a/sdk/resourcemanager/batch/armbatch/zz_generated_response_types.go b/sdk/resourcemanager/batch/armbatch/zz_generated_response_types.go index d7355c820f62..706aad487f2a 100644 --- a/sdk/resourcemanager/batch/armbatch/zz_generated_response_types.go +++ b/sdk/resourcemanager/batch/armbatch/zz_generated_response_types.go @@ -226,6 +226,11 @@ type PoolClientUpdateResponse struct { ETag *string } +// PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.Delete. +type PrivateEndpointConnectionClientDeleteResponse struct { + // placeholder for future response values +} + // PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get. type PrivateEndpointConnectionClientGetResponse struct { PrivateEndpointConnection