From dc238e575de882ddfd1821c162c3589c735b95de Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 26 May 2022 20:18:16 +0000 Subject: [PATCH] CodeGen from PR 19170 in Azure/azure-rest-api-specs Merge 41d96e69810c8857cd5736d35890faccd5e27029 into bdbaa4582924baa7c90599a596c9e1f537e5c9c0 --- .../automanage/armautomanage/CHANGELOG.md | 8 + .../automanage/armautomanage/autorest.md | 6 +- .../automanage/armautomanage/go.mod | 12 +- .../automanage/armautomanage/go.sum | 25 +- ...rated_example_bestpractices_client_test.go | 62 ----- ...ample_bestpracticesversions_client_test.go | 64 ------ ...igurationprofileassignments_client_test.go | 217 ------------------ ...rationprofilehciassignments_client_test.go | 90 -------- ...ationprofilehcrpassignments_client_test.go | 90 -------- ...ample_configurationprofiles_client_test.go | 215 ----------------- ...nfigurationprofilesversions_client_test.go | 196 ---------------- ...enerated_example_hcireports_client_test.go | 68 ------ ...nerated_example_hcrpreports_client_test.go | 68 ------ ...enerated_example_operations_client_test.go | 41 ---- ...e_generated_example_reports_client_test.go | 68 ------ ...d_example_serviceprincipals_client_test.go | 61 ----- .../zz_generated_bestpractices_client.go | 8 +- ..._generated_bestpracticesversions_client.go | 8 +- ..._configurationprofileassignments_client.go | 32 +-- ...nfigurationprofilehciassignments_client.go | 12 +- ...figurationprofilehcrpassignments_client.go | 12 +- ..._generated_configurationprofiles_client.go | 24 +- ...ed_configurationprofilesversions_client.go | 79 +------ .../armautomanage/zz_generated_constants.go | 2 +- .../zz_generated_hcireports_client.go | 8 +- .../zz_generated_hcrpreports_client.go | 8 +- .../armautomanage/zz_generated_models.go | 12 +- .../zz_generated_operations_client.go | 4 +- .../zz_generated_reports_client.go | 8 +- .../zz_generated_response_types.go | 5 - .../zz_generated_serviceprincipals_client.go | 8 +- 31 files changed, 92 insertions(+), 1429 deletions(-) delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpractices_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpracticesversions_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofileassignments_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehciassignments_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehcrpassignments_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofiles_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilesversions_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcireports_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcrpreports_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_operations_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_reports_client_test.go delete mode 100644 sdk/resourcemanager/automanage/armautomanage/ze_generated_example_serviceprincipals_client_test.go diff --git a/sdk/resourcemanager/automanage/armautomanage/CHANGELOG.md b/sdk/resourcemanager/automanage/armautomanage/CHANGELOG.md index cf2c610d2b1f..39942af4249e 100644 --- a/sdk/resourcemanager/automanage/armautomanage/CHANGELOG.md +++ b/sdk/resourcemanager/automanage/armautomanage/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +## 0.6.0 (2022-05-26) +### Breaking Changes + +- Function `*ConfigurationProfilesVersionsClient.Update` has been removed +- Struct `ConfigurationProfilesVersionsClientUpdateOptions` has been removed +- Struct `ConfigurationProfilesVersionsClientUpdateResponse` has been removed + + ## 0.5.0 (2022-05-17) ### Breaking Changes diff --git a/sdk/resourcemanager/automanage/armautomanage/autorest.md b/sdk/resourcemanager/automanage/armautomanage/autorest.md index 093422634ce2..fd49e02ca220 100644 --- a/sdk/resourcemanager/automanage/armautomanage/autorest.md +++ b/sdk/resourcemanager/automanage/armautomanage/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/automanage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/automanage/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automanage/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automanage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.5.0 +module-version: 0.6.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/automanage/armautomanage/go.mod b/sdk/resourcemanager/automanage/armautomanage/go.mod index 063ba0709041..23bf4df456bc 100644 --- a/sdk/resourcemanager/automanage/armautomanage/go.mod +++ b/sdk/resourcemanager/automanage/armautomanage/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautom 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/automanage/armautomanage/go.sum b/sdk/resourcemanager/automanage/armautomanage/go.sum index ed5b814680ee..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/automanage/armautomanage/go.sum +++ b/sdk/resourcemanager/automanage/armautomanage/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/automanage/armautomanage/ze_generated_example_bestpractices_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpractices_client_test.go deleted file mode 100644 index 1b67e23484ff..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpractices_client_test.go +++ /dev/null @@ -1,62 +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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getBestPractice.json -func ExampleBestPracticesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewBestPracticesClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "azureBestPracticesProduction", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listBestPracticesByTenant.json -func ExampleBestPracticesClient_NewListByTenantPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewBestPracticesClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByTenantPager(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/automanage/armautomanage/ze_generated_example_bestpracticesversions_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpracticesversions_client_test.go deleted file mode 100644 index 580ab2c56911..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_bestpracticesversions_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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getBestPracticeVersion.json -func ExampleBestPracticesVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewBestPracticesVersionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "azureBestPracticesProduction", - "version1", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listBestPracticesVersionsByTenant.json -func ExampleBestPracticesVersionsClient_NewListByTenantPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewBestPracticesVersionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByTenantPager("azureBestPracticesProduction", - 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/automanage/armautomanage/ze_generated_example_configurationprofileassignments_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofileassignments_client_test.go deleted file mode 100644 index a0a8249bc076..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofileassignments_client_test.go +++ /dev/null @@ -1,217 +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 armautomanage_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/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileAssignment.json -func ExampleConfigurationProfileAssignmentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "default", - "myResourceGroupName", - "myVMName", - armautomanage.ConfigurationProfileAssignment{ - Properties: &armautomanage.ConfigurationProfileAssignmentProperties{ - ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"), - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileAssignment.json -func ExampleConfigurationProfileAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "default", - "myVMName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileAssignment.json -func ExampleConfigurationProfileAssignmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myResourceGroupName", - "default", - "myVMName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByVirtualMachines.json -func ExampleConfigurationProfileAssignmentsClient_NewListByVirtualMachinesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVirtualMachinesPager("myResourceGroupName", - "myVMName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByResourceGroup.json -func ExampleConfigurationProfileAssignmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroupName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsBySubscription.json -func ExampleConfigurationProfileAssignmentsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByMachineName.json -func ExampleConfigurationProfileAssignmentsClient_NewListByMachineNamePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMachineNamePager("myResourceGroupName", - "myMachineName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByClusterName.json -func ExampleConfigurationProfileAssignmentsClient_NewListByClusterNamePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByClusterNamePager("myResourceGroupName", - "myClusterName", - 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/automanage/armautomanage/ze_generated_example_configurationprofilehciassignments_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehciassignments_client_test.go deleted file mode 100644 index 75567bc921f6..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehciassignments_client_test.go +++ /dev/null @@ -1,90 +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 armautomanage_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/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileHCIAssignment.json -func ExampleConfigurationProfileHCIAssignmentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myResourceGroupName", - "myClusterName", - "default", - armautomanage.ConfigurationProfileAssignment{ - Properties: &armautomanage.ConfigurationProfileAssignmentProperties{ - ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"), - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileHCIAssignment.json -func ExampleConfigurationProfileHCIAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "myClusterName", - "default", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileHCIAssignment.json -func ExampleConfigurationProfileHCIAssignmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myResourceGroupName", - "myClusterName", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehcrpassignments_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehcrpassignments_client_test.go deleted file mode 100644 index c4000d29eeab..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilehcrpassignments_client_test.go +++ /dev/null @@ -1,90 +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 armautomanage_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/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileHCRPAssignment.json -func ExampleConfigurationProfileHCRPAssignmentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myResourceGroupName", - "myMachineName", - "default", - armautomanage.ConfigurationProfileAssignment{ - Properties: &armautomanage.ConfigurationProfileAssignmentProperties{ - ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"), - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileHCRPAssignment.json -func ExampleConfigurationProfileHCRPAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "myMachineName", - "default", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileHCRPAssignment.json -func ExampleConfigurationProfileHCRPAssignmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myResourceGroupName", - "myMachineName", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofiles_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofiles_client_test.go deleted file mode 100644 index e0d9509a4e38..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofiles_client_test.go +++ /dev/null @@ -1,215 +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 armautomanage_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/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfile.json -func ExampleConfigurationProfilesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "customConfigurationProfile", - "myResourceGroupName", - armautomanage.ConfigurationProfile{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "Organization": to.Ptr("Administration"), - }, - Properties: &armautomanage.ConfigurationProfileProperties{ - Configuration: map[string]interface{}{ - "Antimalware/Enable": false, - "AzureSecurityCenter/Enable": true, - "Backup/Enable": false, - "BootDiagnostics/Enable": true, - "ChangeTrackingAndInventory/Enable": true, - "GuestConfiguration/Enable": true, - "LogAnalytics/Enable": true, - "UpdateManagement/Enable": true, - "VMInsights/Enable": true, - }, - Overrides: []interface{}{ - map[string]interface{}{ - "if": map[string]interface{}{ - "equals": "eastus", - "field": "$.location", - }, - "priority": float64(100), - "then": map[string]interface{}{ - "LogAnalytics/Enable": true, - "LogAnalytics/Reprovision": true, - "LogAnalytics/Workspace": "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/eastus", - }, - }, - map[string]interface{}{ - "if": map[string]interface{}{ - "equals": "centralcanada", - "field": "$.location", - }, - "priority": float64(200), - "then": map[string]interface{}{ - "LogAnalytics/Enable": true, - "LogAnalytics/Reprovision": true, - "LogAnalytics/Workspace": "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/centralcanada", - }, - }}, - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfile.json -func ExampleConfigurationProfilesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "customConfigurationProfile", - "myResourceGroupName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfile.json -func ExampleConfigurationProfilesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "rg", - "customConfigurationProfile", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/updateConfigurationProfile.json -func ExampleConfigurationProfilesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "customConfigurationProfile", - "myResourceGroupName", - armautomanage.ConfigurationProfileUpdate{ - Tags: map[string]*string{ - "Organization": to.Ptr("Administration"), - }, - Properties: &armautomanage.ConfigurationProfileProperties{ - Configuration: map[string]interface{}{ - "Antimalware/Enable": false, - "AzureSecurityCenter/Enable": true, - "Backup/Enable": false, - "BootDiagnostics/Enable": true, - "ChangeTrackingAndInventory/Enable": true, - "GuestConfiguration/Enable": true, - "LogAnalytics/Enable": true, - "UpdateManagement/Enable": true, - "VMInsights/Enable": true, - }, - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfilesByResourceGroup.json -func ExampleConfigurationProfilesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("myResourceGroupName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfilesBySubscription.json -func ExampleConfigurationProfilesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(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/automanage/armautomanage/ze_generated_example_configurationprofilesversions_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilesversions_client_test.go deleted file mode 100644 index 3e5544a78938..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_configurationprofilesversions_client_test.go +++ /dev/null @@ -1,196 +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 armautomanage_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/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileVersion.json -func ExampleConfigurationProfilesVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "customConfigurationProfile", - "version1", - "myResourceGroupName", - armautomanage.ConfigurationProfile{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "Organization": to.Ptr("Administration"), - }, - Properties: &armautomanage.ConfigurationProfileProperties{ - Configuration: map[string]interface{}{ - "Antimalware/Enable": false, - "AzureSecurityCenter/Enable": true, - "Backup/Enable": false, - "BootDiagnostics/Enable": true, - "ChangeTrackingAndInventory/Enable": true, - "GuestConfiguration/Enable": true, - "LogAnalytics/Enable": true, - "UpdateManagement/Enable": true, - "VMInsights/Enable": true, - }, - Overrides: []interface{}{ - map[string]interface{}{ - "if": map[string]interface{}{ - "equals": "eastus", - "field": "$.location", - }, - "priority": float64(100), - "then": map[string]interface{}{ - "LogAnalytics/Enable": true, - "LogAnalytics/Reprovision": true, - "LogAnalytics/Workspace": "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/eastus", - }, - }, - map[string]interface{}{ - "if": map[string]interface{}{ - "equals": "centralcanada", - "field": "$.location", - }, - "priority": float64(200), - "then": map[string]interface{}{ - "LogAnalytics/Enable": true, - "LogAnalytics/Reprovision": true, - "LogAnalytics/Workspace": "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/centralcanada", - }, - }}, - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileVersion.json -func ExampleConfigurationProfilesVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "customConfigurationProfile", - "version1", - "myResourceGroupName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileVersion.json -func ExampleConfigurationProfilesVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesVersionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "rg", - "customConfigurationProfile", - "version1", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/updateConfigurationProfileVersion.json -func ExampleConfigurationProfilesVersionsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "customConfigurationProfile", - "version1", - "myResourceGroupName", - armautomanage.ConfigurationProfileUpdate{ - Tags: map[string]*string{ - "Organization": to.Ptr("Administration"), - }, - Properties: &armautomanage.ConfigurationProfileProperties{ - Configuration: map[string]interface{}{ - "Antimalware/Enable": false, - "AzureSecurityCenter/Enable": true, - "Backup/Enable": false, - "BootDiagnostics/Enable": true, - "ChangeTrackingAndInventory/Enable": true, - "GuestConfiguration/Enable": true, - "LogAnalytics/Enable": true, - "UpdateManagement/Enable": true, - "VMInsights/Enable": true, - }, - }, - }, - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileVersions.json -func ExampleConfigurationProfilesVersionsClient_NewListChildResourcesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListChildResourcesPager("customConfigurationProfile", - "myResourceGroupName", - 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/automanage/armautomanage/ze_generated_example_hcireports_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcireports_client_test.go deleted file mode 100644 index 9e7d6ef7bb9a..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcireports_client_test.go +++ /dev/null @@ -1,68 +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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getHCIReport.json -func ExampleHCIReportsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewHCIReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "myClusterName", - "default", - "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileHCIAssignment.json -func ExampleHCIReportsClient_NewListByConfigurationProfileAssignmentsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewHCIReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", - "myClusterName", - "default", - 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/automanage/armautomanage/ze_generated_example_hcrpreports_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcrpreports_client_test.go deleted file mode 100644 index 11fb7e4a4ba3..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_hcrpreports_client_test.go +++ /dev/null @@ -1,68 +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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getHCRPReport.json -func ExampleHCRPReportsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewHCRPReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "myMachineName", - "default", - "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileHCRPAssignment.json -func ExampleHCRPReportsClient_NewListByConfigurationProfileAssignmentsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewHCRPReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", - "myMachineName", - "default", - 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/automanage/armautomanage/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_operations_client_test.go deleted file mode 100644 index 88c516de0c67..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.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 := armautomanage.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/automanage/armautomanage/ze_generated_example_reports_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_reports_client_test.go deleted file mode 100644 index 842baa62d542..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_reports_client_test.go +++ /dev/null @@ -1,68 +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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getReport.json -func ExampleReportsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myResourceGroupName", - "default", - "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", - "myVMName", - 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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileAssignment.json -func ExampleReportsClient_NewListByConfigurationProfileAssignmentsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewReportsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", - "default", - "myVMName", - 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/automanage/armautomanage/ze_generated_example_serviceprincipals_client_test.go b/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_serviceprincipals_client_test.go deleted file mode 100644 index 02cffdffeb3f..000000000000 --- a/sdk/resourcemanager/automanage/armautomanage/ze_generated_example_serviceprincipals_client_test.go +++ /dev/null @@ -1,61 +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 armautomanage_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json -func ExampleServicePrincipalsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewServicePrincipalsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(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/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json -func ExampleServicePrincipalsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armautomanage.NewServicePrincipalsClient("mySubscriptionId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpractices_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpractices_client.go index dc6a8b769ffb..f4debd397cbc 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpractices_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpractices_client.go @@ -53,7 +53,7 @@ func NewBestPracticesClient(credential azcore.TokenCredential, options *arm.Clie // Get - Get information about a Automanage best practice // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // bestPracticeName - The Automanage best practice name. // options - BestPracticesClientGetOptions contains the optional parameters for the BestPracticesClient.Get method. func (client *BestPracticesClient) Get(ctx context.Context, bestPracticeName string, options *BestPracticesClientGetOptions) (BestPracticesClientGetResponse, error) { @@ -83,7 +83,7 @@ func (client *BestPracticesClient) getCreateRequest(ctx context.Context, bestPra return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -100,7 +100,7 @@ func (client *BestPracticesClient) getHandleResponse(resp *http.Response) (BestP // NewListByTenantPager - Retrieve a list of Automanage best practices // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // options - BestPracticesClientListByTenantOptions contains the optional parameters for the BestPracticesClient.ListByTenant // method. func (client *BestPracticesClient) NewListByTenantPager(options *BestPracticesClientListByTenantOptions) *runtime.Pager[BestPracticesClientListByTenantResponse] { @@ -133,7 +133,7 @@ func (client *BestPracticesClient) listByTenantCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpracticesversions_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpracticesversions_client.go index 07d817e8c118..cca059567190 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpracticesversions_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_bestpracticesversions_client.go @@ -53,7 +53,7 @@ func NewBestPracticesVersionsClient(credential azcore.TokenCredential, options * // Get - Get information about a Automanage best practice version // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // bestPracticeName - The Automanage best practice name. // versionName - The Automanage best practice version name. // options - BestPracticesVersionsClientGetOptions contains the optional parameters for the BestPracticesVersionsClient.Get @@ -89,7 +89,7 @@ func (client *BestPracticesVersionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +106,7 @@ func (client *BestPracticesVersionsClient) getHandleResponse(resp *http.Response // NewListByTenantPager - Retrieve a list of Automanage best practices versions // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // bestPracticeName - The Automanage best practice name. // options - BestPracticesVersionsClientListByTenantOptions contains the optional parameters for the BestPracticesVersionsClient.ListByTenant // method. @@ -144,7 +144,7 @@ func (client *BestPracticesVersionsClient) listByTenantCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofileassignments_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofileassignments_client.go index 758200b0a381..0d6c270cf80c 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofileassignments_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofileassignments_client.go @@ -56,7 +56,7 @@ func NewConfigurationProfileAssignmentsClient(subscriptionID string, credential // CreateOrUpdate - Creates an association between a VM and Automanage configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. // resourceGroupName - The name of the resource group. The name is case insensitive. // vmName - The name of the virtual machine. @@ -102,7 +102,7 @@ func (client *ConfigurationProfileAssignmentsClient) createOrUpdateCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ func (client *ConfigurationProfileAssignmentsClient) createOrUpdateHandleRespons // Delete - Delete a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileAssignmentName - Name of the configuration profile assignment // vmName - The name of the virtual machine. @@ -164,7 +164,7 @@ func (client *ConfigurationProfileAssignmentsClient) deleteCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *ConfigurationProfileAssignmentsClient) deleteCreateRequest(ctx con // Get - Get information about a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileAssignmentName - The configuration profile assignment name. // vmName - The name of the virtual machine. @@ -217,7 +217,7 @@ func (client *ConfigurationProfileAssignmentsClient) getCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *ConfigurationProfileAssignmentsClient) getHandleResponse(resp *htt // NewListPager - Get list of configuration profile assignments // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // options - ConfigurationProfileAssignmentsClientListOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.List // method. @@ -276,7 +276,7 @@ func (client *ConfigurationProfileAssignmentsClient) listCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,7 +293,7 @@ func (client *ConfigurationProfileAssignmentsClient) listHandleResponse(resp *ht // NewListByClusterNamePager - Get list of configuration profile assignments // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // options - ConfigurationProfileAssignmentsClientListByClusterNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByClusterName @@ -340,7 +340,7 @@ func (client *ConfigurationProfileAssignmentsClient) listByClusterNameCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -357,7 +357,7 @@ func (client *ConfigurationProfileAssignmentsClient) listByClusterNameHandleResp // NewListByMachineNamePager - Get list of configuration profile assignments // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // options - ConfigurationProfileAssignmentsClientListByMachineNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByMachineName @@ -404,7 +404,7 @@ func (client *ConfigurationProfileAssignmentsClient) listByMachineNameCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -421,7 +421,7 @@ func (client *ConfigurationProfileAssignmentsClient) listByMachineNameHandleResp // NewListBySubscriptionPager - Get list of configuration profile assignments under a given subscription // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // options - ConfigurationProfileAssignmentsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListBySubscription // method. func (client *ConfigurationProfileAssignmentsClient) NewListBySubscriptionPager(options *ConfigurationProfileAssignmentsClientListBySubscriptionOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListBySubscriptionResponse] { @@ -458,7 +458,7 @@ func (client *ConfigurationProfileAssignmentsClient) listBySubscriptionCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -475,7 +475,7 @@ func (client *ConfigurationProfileAssignmentsClient) listBySubscriptionHandleRes // NewListByVirtualMachinesPager - Get list of configuration profile assignments // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // vmName - The name of the virtual machine. // options - ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByVirtualMachines @@ -522,7 +522,7 @@ func (client *ConfigurationProfileAssignmentsClient) listByVirtualMachinesCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehciassignments_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehciassignments_client.go index 44f2a335d587..6e1fa7b908a2 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehciassignments_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehciassignments_client.go @@ -56,7 +56,7 @@ func NewConfigurationProfileHCIAssignmentsClient(subscriptionID string, credenti // CreateOrUpdate - Creates an association between a AzureStackHCI cluster and Automanage configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. @@ -102,7 +102,7 @@ func (client *ConfigurationProfileHCIAssignmentsClient) createOrUpdateCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ func (client *ConfigurationProfileHCIAssignmentsClient) createOrUpdateHandleResp // Delete - Delete a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // configurationProfileAssignmentName - Name of the configuration profile assignment @@ -164,7 +164,7 @@ func (client *ConfigurationProfileHCIAssignmentsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *ConfigurationProfileHCIAssignmentsClient) deleteCreateRequest(ctx // Get - Get information about a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -217,7 +217,7 @@ func (client *ConfigurationProfileHCIAssignmentsClient) getCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehcrpassignments_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehcrpassignments_client.go index 6b6a436bbb0f..2eb5e177082e 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehcrpassignments_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilehcrpassignments_client.go @@ -56,7 +56,7 @@ func NewConfigurationProfileHCRPAssignmentsClient(subscriptionID string, credent // CreateOrUpdate - Creates an association between a ARC machine and Automanage configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. @@ -102,7 +102,7 @@ func (client *ConfigurationProfileHCRPAssignmentsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ func (client *ConfigurationProfileHCRPAssignmentsClient) createOrUpdateHandleRes // Delete - Delete a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // configurationProfileAssignmentName - Name of the configuration profile assignment @@ -164,7 +164,7 @@ func (client *ConfigurationProfileHCRPAssignmentsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *ConfigurationProfileHCRPAssignmentsClient) deleteCreateRequest(ctx // Get - Get information about a configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -217,7 +217,7 @@ func (client *ConfigurationProfileHCRPAssignmentsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofiles_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofiles_client.go index 6329c808d83e..7b4030496c55 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofiles_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofiles_client.go @@ -56,7 +56,7 @@ func NewConfigurationProfilesClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Creates a configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - Name of the configuration profile. // resourceGroupName - The name of the resource group. The name is case insensitive. // parameters - Parameters supplied to create or update configuration profile. @@ -97,7 +97,7 @@ func (client *ConfigurationProfilesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -114,7 +114,7 @@ func (client *ConfigurationProfilesClient) createOrUpdateHandleResponse(resp *ht // Delete - Delete a configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileName - Name of the configuration profile // options - ConfigurationProfilesClientDeleteOptions contains the optional parameters for the ConfigurationProfilesClient.Delete @@ -154,7 +154,7 @@ func (client *ConfigurationProfilesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +162,7 @@ func (client *ConfigurationProfilesClient) deleteCreateRequest(ctx context.Conte // Get - Get information about a configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - The configuration profile name. // resourceGroupName - The name of the resource group. The name is case insensitive. // options - ConfigurationProfilesClientGetOptions contains the optional parameters for the ConfigurationProfilesClient.Get @@ -202,7 +202,7 @@ func (client *ConfigurationProfilesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -219,7 +219,7 @@ func (client *ConfigurationProfilesClient) getHandleResponse(resp *http.Response // NewListByResourceGroupPager - Retrieve a list of configuration profile within a given resource group // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // options - ConfigurationProfilesClientListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilesClient.ListByResourceGroup // method. @@ -261,7 +261,7 @@ func (client *ConfigurationProfilesClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -278,7 +278,7 @@ func (client *ConfigurationProfilesClient) listByResourceGroupHandleResponse(res // NewListBySubscriptionPager - Retrieve a list of configuration profile within a subscription // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // options - ConfigurationProfilesClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilesClient.ListBySubscription // method. func (client *ConfigurationProfilesClient) NewListBySubscriptionPager(options *ConfigurationProfilesClientListBySubscriptionOptions) *runtime.Pager[ConfigurationProfilesClientListBySubscriptionResponse] { @@ -315,7 +315,7 @@ func (client *ConfigurationProfilesClient) listBySubscriptionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,7 +332,7 @@ func (client *ConfigurationProfilesClient) listBySubscriptionHandleResponse(resp // Update - Updates a configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - Name of the configuration profile. // resourceGroupName - The name of the resource group. The name is case insensitive. // parameters - Parameters supplied to update configuration profile. @@ -373,7 +373,7 @@ func (client *ConfigurationProfilesClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilesversions_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilesversions_client.go index 6d9aa0a9d9f7..384cf6146f44 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilesversions_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_configurationprofilesversions_client.go @@ -56,7 +56,7 @@ func NewConfigurationProfilesVersionsClient(subscriptionID string, credential az // CreateOrUpdate - Creates a configuration profile version // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - Name of the configuration profile. // versionName - The configuration profile version name. // resourceGroupName - The name of the resource group. The name is case insensitive. @@ -102,7 +102,7 @@ func (client *ConfigurationProfilesVersionsClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ func (client *ConfigurationProfilesVersionsClient) createOrUpdateHandleResponse( // Delete - Delete a configuration profile version // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileName - Name of the configuration profile // versionName - The configuration profile version name. @@ -164,7 +164,7 @@ func (client *ConfigurationProfilesVersionsClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *ConfigurationProfilesVersionsClient) deleteCreateRequest(ctx conte // Get - Get information about a configuration profile version // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - The configuration profile name. // versionName - The configuration profile version name. // resourceGroupName - The name of the resource group. The name is case insensitive. @@ -217,7 +217,7 @@ func (client *ConfigurationProfilesVersionsClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *ConfigurationProfilesVersionsClient) getHandleResponse(resp *http. // NewListChildResourcesPager - Retrieve a list of configuration profile version for a configuration profile // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // configurationProfileName - Name of the configuration profile. // resourceGroupName - The name of the resource group. The name is case insensitive. // options - ConfigurationProfilesVersionsClientListChildResourcesOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.ListChildResources @@ -281,7 +281,7 @@ func (client *ConfigurationProfilesVersionsClient) listChildResourcesCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,66 +295,3 @@ func (client *ConfigurationProfilesVersionsClient) listChildResourcesHandleRespo } return result, nil } - -// Update - Updates a configuration profile version -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview -// configurationProfileName - Name of the configuration profile. -// versionName - The configuration profile version name. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// parameters - Parameters supplied to update configuration profile. -// options - ConfigurationProfilesVersionsClientUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Update -// method. -func (client *ConfigurationProfilesVersionsClient) Update(ctx context.Context, configurationProfileName string, versionName string, resourceGroupName string, parameters ConfigurationProfileUpdate, options *ConfigurationProfilesVersionsClientUpdateOptions) (ConfigurationProfilesVersionsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, configurationProfileName, versionName, resourceGroupName, parameters, options) - if err != nil { - return ConfigurationProfilesVersionsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigurationProfilesVersionsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationProfilesVersionsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ConfigurationProfilesVersionsClient) updateCreateRequest(ctx context.Context, configurationProfileName string, versionName string, resourceGroupName string, parameters ConfigurationProfileUpdate, options *ConfigurationProfilesVersionsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automanage/configurationProfiles/{configurationProfileName}/versions/{versionName}" - if configurationProfileName == "" { - return nil, errors.New("parameter configurationProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationProfileName}", url.PathEscape(configurationProfileName)) - if versionName == "" { - return nil, errors.New("parameter versionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{versionName}", url.PathEscape(versionName)) - 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)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *ConfigurationProfilesVersionsClient) updateHandleResponse(resp *http.Response) (ConfigurationProfilesVersionsClientUpdateResponse, error) { - result := ConfigurationProfilesVersionsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConfigurationProfile); err != nil { - return ConfigurationProfilesVersionsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_constants.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_constants.go index 87d589027fc1..1355b042a6b8 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_constants.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_constants.go @@ -10,7 +10,7 @@ package armautomanage const ( moduleName = "armautomanage" - moduleVersion = "v0.5.0" + moduleVersion = "v0.6.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcireports_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcireports_client.go index 4e26e2c83257..55f171afdf19 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcireports_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcireports_client.go @@ -56,7 +56,7 @@ func NewHCIReportsClient(subscriptionID string, credential azcore.TokenCredentia // Get - Get information about a report associated with a configuration profile assignment run // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -105,7 +105,7 @@ func (client *HCIReportsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -122,7 +122,7 @@ func (client *HCIReportsClient) getHandleResponse(resp *http.Response) (HCIRepor // NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // clusterName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -174,7 +174,7 @@ func (client *HCIReportsClient) listByConfigurationProfileAssignmentsCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcrpreports_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcrpreports_client.go index 9388923d7aec..f5f069c28ca4 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcrpreports_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_hcrpreports_client.go @@ -56,7 +56,7 @@ func NewHCRPReportsClient(subscriptionID string, credential azcore.TokenCredenti // Get - Get information about a report associated with a configuration profile assignment run // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -105,7 +105,7 @@ func (client *HCRPReportsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -122,7 +122,7 @@ func (client *HCRPReportsClient) getHandleResponse(resp *http.Response) (HCRPRep // NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // machineName - The name of the Arc machine. // configurationProfileAssignmentName - The configuration profile assignment name. @@ -174,7 +174,7 @@ func (client *HCRPReportsClient) listByConfigurationProfileAssignmentsCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_models.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_models.go index 8d5c3bad394a..f81e153c67b8 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_models.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_models.go @@ -145,11 +145,11 @@ type ConfigurationProfileAssignmentProperties struct { // The profileOverrides setting for the configuration profile assignment. ProfileOverrides map[string]interface{} `json:"profileOverrides,omitempty"` - // The target VM resource URI - TargetID *string `json:"targetId,omitempty"` - // READ-ONLY; The status of onboarding, which only appears in the response. Status *string `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; The target VM resource URI + TargetID *string `json:"targetId,omitempty" azure:"ro"` } // ConfigurationProfileAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.CreateOrUpdate @@ -317,12 +317,6 @@ type ConfigurationProfilesVersionsClientListChildResourcesOptions struct { // placeholder for future optional parameters } -// ConfigurationProfilesVersionsClientUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Update -// method. -type ConfigurationProfilesVersionsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_operations_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_operations_client.go index 9dfcbea68720..b56751d2b9a9 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_operations_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Automanage REST API operations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // 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]{ @@ -82,7 +82,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_reports_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_reports_client.go index 31b1d391fd4b..b3b7bba53065 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_reports_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_reports_client.go @@ -56,7 +56,7 @@ func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get information about a report associated with a configuration profile assignment run // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileAssignmentName - The configuration profile assignment name. // reportName - The report name. @@ -105,7 +105,7 @@ func (client *ReportsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -122,7 +122,7 @@ func (client *ReportsClient) getHandleResponse(resp *http.Response) (ReportsClie // NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // resourceGroupName - The name of the resource group. The name is case insensitive. // configurationProfileAssignmentName - The configuration profile assignment name. // vmName - The name of the virtual machine. @@ -174,7 +174,7 @@ func (client *ReportsClient) listByConfigurationProfileAssignmentsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_response_types.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_response_types.go index 5f6c09092e73..6db98826906f 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_response_types.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_response_types.go @@ -148,11 +148,6 @@ type ConfigurationProfilesVersionsClientListChildResourcesResponse struct { ConfigurationProfileList } -// ConfigurationProfilesVersionsClientUpdateResponse contains the response from method ConfigurationProfilesVersionsClient.Update. -type ConfigurationProfilesVersionsClientUpdateResponse struct { - ConfigurationProfile -} - // HCIReportsClientGetResponse contains the response from method HCIReportsClient.Get. type HCIReportsClientGetResponse struct { Report diff --git a/sdk/resourcemanager/automanage/armautomanage/zz_generated_serviceprincipals_client.go b/sdk/resourcemanager/automanage/armautomanage/zz_generated_serviceprincipals_client.go index 31bc65c923d2..61810789e6f1 100644 --- a/sdk/resourcemanager/automanage/armautomanage/zz_generated_serviceprincipals_client.go +++ b/sdk/resourcemanager/automanage/armautomanage/zz_generated_serviceprincipals_client.go @@ -56,7 +56,7 @@ func NewServicePrincipalsClient(subscriptionID string, credential azcore.TokenCr // Get - Get the Automanage AAD first party Application Service Principal details for the subscription id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // options - ServicePrincipalsClientGetOptions contains the optional parameters for the ServicePrincipalsClient.Get method. func (client *ServicePrincipalsClient) Get(ctx context.Context, options *ServicePrincipalsClientGetOptions) (ServicePrincipalsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, options) @@ -85,7 +85,7 @@ func (client *ServicePrincipalsClient) getCreateRequest(ctx context.Context, opt return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +103,7 @@ func (client *ServicePrincipalsClient) getHandleResponse(resp *http.Response) (S // NewListBySubscriptionPager - Get the Automanage AAD first party Application Service Principal details for the subscription // id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-04-30-preview +// Generated from API version 2022-05-04 // options - ServicePrincipalsClientListBySubscriptionOptions contains the optional parameters for the ServicePrincipalsClient.ListBySubscription // method. func (client *ServicePrincipalsClient) NewListBySubscriptionPager(options *ServicePrincipalsClientListBySubscriptionOptions) *runtime.Pager[ServicePrincipalsClientListBySubscriptionResponse] { @@ -140,7 +140,7 @@ func (client *ServicePrincipalsClient) listBySubscriptionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-04-30-preview") + reqQP.Set("api-version", "2022-05-04") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil