diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/CHANGELOG.md b/sdk/resourcemanager/managementgroups/armmanagementgroups/CHANGELOG.md index 45d30f6ec374..a97fc2512d53 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/CHANGELOG.md +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.1.1 (2023-04-04) +### Other Changes + + ## 1.1.0 (2023-03-31) ### Features Added diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/api_client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/api_client_example_test.go deleted file mode 100644 index 937244b7d7c0..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/api_client_example_test.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_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/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/CheckManagementGroupNameAvailability.json -func ExampleAPIClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIClient().CheckNameAvailability(ctx, armmanagementgroups.CheckNameAvailabilityRequest{ - Name: to.Ptr("nameTocheck"), - Type: to.Ptr("Microsoft.Management/managementGroups"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CheckNameAvailabilityResult = armmanagementgroups.CheckNameAvailabilityResult{ - // Message: to.Ptr("Error message"), - // NameAvailable: to.Ptr(false), - // Reason: to.Ptr(armmanagementgroups.ReasonAlreadyExists), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/StartTenantBackfillRequest.json -func ExampleAPIClient_StartTenantBackfill() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIClient().StartTenantBackfill(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TenantBackfillStatusResult = armmanagementgroups.TenantBackfillStatusResult{ - // Status: to.Ptr(armmanagementgroups.StatusStarted), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/TenantBackfillStatusRequest.json -func ExampleAPIClient_TenantBackfillStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAPIClient().TenantBackfillStatus(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TenantBackfillStatusResult = armmanagementgroups.TenantBackfillStatusResult{ - // Status: to.Ptr(armmanagementgroups.StatusStarted), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // } -} diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/autorest.md b/sdk/resourcemanager/managementgroups/armmanagementgroups/autorest.md index 8ebb44117511..ac13ccc70d5a 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/autorest.md +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/managementgroups/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/managementgroups/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.1.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/client_example_test.go deleted file mode 100644 index 064303dc55bd..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/client_example_test.go +++ /dev/null @@ -1,525 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_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/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/ListManagementGroups.json -func ExampleClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListPager(&armmanagementgroups.ClientListOptions{CacheControl: to.Ptr("no-cache"), - Skiptoken: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ManagementGroupListResult = armmanagementgroups.ManagementGroupListResult{ - // Value: []*armmanagementgroups.ManagementGroupInfo{ - // { - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupInfoProperties{ - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // }, - // { - // Name: to.Ptr("20000000-0004-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupInfoProperties{ - // DisplayName: to.Ptr("Group 4 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroup.json -func ExampleClient_Get_getManagementGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "20000000-0001-0000-0000-000000000000", &armmanagementgroups.ClientGetOptions{Expand: nil, - Recurse: nil, - Filter: nil, - CacheControl: to.Ptr("no-cache"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("RootGroup"), - // DisplayName: to.Ptr("RootGroup"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/RootGroup"), - // }, - // UpdatedBy: to.Ptr("16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.00Z"); return t}()), - // Version: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroupWithAncestors.json -func ExampleClient_Get_getManagementGroupWithAncestors() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "20000000-0001-0000-0000-00000000000", &armmanagementgroups.ClientGetOptions{Expand: to.Ptr(armmanagementgroups.ManagementGroupExpandTypeAncestors), - Recurse: nil, - Filter: nil, - CacheControl: to.Ptr("no-cache"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // ManagementGroupAncestorsChain: []*armmanagementgroups.ManagementGroupPathElement{ - // { - // Name: to.Ptr("20000000-0000-0000-0000-000000000001"), - // DisplayName: to.Ptr("Parent display name"), - // }, - // { - // Name: to.Ptr("20000000-0000-0000-0000-000000000000"), - // DisplayName: to.Ptr("Grandparent display name"), - // }}, - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("20000000-0000-0000-0000-000000000001"), - // DisplayName: to.Ptr("Parent display name"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001"), - // }, - // UpdatedBy: to.Ptr("Test"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.00Z"); return t}()), - // Version: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroupWithExpand.json -func ExampleClient_Get_getManagementGroupWithExpand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "20000000-0001-0000-0000-000000000000", &armmanagementgroups.ClientGetOptions{Expand: to.Ptr(armmanagementgroups.ManagementGroupExpandTypeChildren), - Recurse: nil, - Filter: nil, - CacheControl: to.Ptr("no-cache"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // Children: []*armmanagementgroups.ManagementGroupChildInfo{ - // { - // Name: to.Ptr("20000000-0002-0000-0000-000000000000"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeMicrosoftManagementManagementGroups), - // DisplayName: to.Ptr("Group 2 Tenant 2"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), - // }, - // { - // Name: to.Ptr("20000000-0003-0000-0000-000000000000"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeMicrosoftManagementManagementGroups), - // DisplayName: to.Ptr("Group 3 Tenant 2"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0003-0000-0000-000000000000"), - // }, - // { - // Name: to.Ptr("10000000-F004-0000-0000-000000000000"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeSubscriptions), - // DisplayName: to.Ptr("Subscription 4 Tenant 1"), - // ID: to.Ptr("/subscriptions/10000000-F004-0000-0000-000000000000"), - // }, - // { - // Name: to.Ptr("20000000-F005-0000-0000-000000000000"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeSubscriptions), - // DisplayName: to.Ptr("Subscription 5 Tenant 2"), - // ID: to.Ptr("/subscriptions/20000000-F005-0000-0000-000000000000"), - // }, - // { - // Name: to.Ptr("30000000-F003-0000-0000-000000000000"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeSubscriptions), - // DisplayName: to.Ptr("Subscription 3 Tenant 3"), - // ID: to.Ptr("/subscriptions/30000000-F003-0000-0000-000000000000"), - // }}, - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("20000000-0000-0000-0000-000000000000"), - // DisplayName: to.Ptr("20000000-0000-0000-0000-000000000000"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // UpdatedBy: to.Ptr("Test"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.00Z"); return t}()), - // Version: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroupWithPath.json -func ExampleClient_Get_getManagementGroupWithPath() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "20000000-0001-0000-0000-000000000000", &armmanagementgroups.ClientGetOptions{Expand: to.Ptr(armmanagementgroups.ManagementGroupExpandTypePath), - Recurse: nil, - Filter: nil, - CacheControl: to.Ptr("no-cache"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Path: []*armmanagementgroups.ManagementGroupPathElement{ - // { - // Name: to.Ptr("20000000-0000-0000-0000-000000000000"), - // DisplayName: to.Ptr("Grandparent display name"), - // }, - // { - // Name: to.Ptr("20000000-0000-0000-0000-000000000001"), - // DisplayName: to.Ptr("Parent display name"), - // }}, - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("20000000-0000-0000-0000-000000000001"), - // DisplayName: to.Ptr("Parent display name"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001"), - // }, - // UpdatedBy: to.Ptr("Test"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.00Z"); return t}()), - // Version: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetManagementGroupWithExpandAndRecurse.json -func ExampleClient_Get_getManagementGroupsWithExpandAndRecurse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "20000000-0001-0000-0000-000000000000", &armmanagementgroups.ClientGetOptions{Expand: to.Ptr(armmanagementgroups.ManagementGroupExpandTypeChildren), - Recurse: to.Ptr(true), - Filter: nil, - CacheControl: to.Ptr("no-cache"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("RootGroup"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/RootGroup"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // Children: []*armmanagementgroups.ManagementGroupChildInfo{ - // { - // Name: to.Ptr("Child"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeMicrosoftManagementManagementGroups), - // Children: []*armmanagementgroups.ManagementGroupChildInfo{ - // { - // Name: to.Ptr("Leaf"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeMicrosoftManagementManagementGroups), - // Children: []*armmanagementgroups.ManagementGroupChildInfo{ - // { - // Name: to.Ptr("728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeSubscriptions), - // DisplayName: to.Ptr("Pay-As-You-Go"), - // ID: to.Ptr("/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // }}, - // DisplayName: to.Ptr("Leaf"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Leaf"), - // }}, - // DisplayName: to.Ptr("Child"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Child"), - // }, - // { - // Name: to.Ptr("AnotherChild"), - // Type: to.Ptr(armmanagementgroups.ManagementGroupChildTypeMicrosoftManagementManagementGroups), - // DisplayName: to.Ptr("Leaf"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/AnotherChild"), - // }}, - // DisplayName: to.Ptr("RootGroup"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("20000000-0000-0000-0000-000000000000"), - // DisplayName: to.Ptr("20000000-0000-0000-0000-000000000000"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // UpdatedBy: to.Ptr("bd490e30-04cb-433e-b8c8-6066959a8bab"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-25T02:26:49.0022093Z"); return t}()), - // Version: to.Ptr[int32](2), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PutManagementGroup.json -func ExampleClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "ChildGroup", armmanagementgroups.CreateManagementGroupRequest{ - Properties: &armmanagementgroups.CreateManagementGroupProperties{ - DisplayName: to.Ptr("ChildGroup"), - Details: &armmanagementgroups.CreateManagementGroupDetails{ - Parent: &armmanagementgroups.CreateParentGroupInfo{ - ID: to.Ptr("/providers/Microsoft.Management/managementGroups/RootGroup"), - }, - }, - }, - }, &armmanagementgroups.ClientBeginCreateOrUpdateOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("ChildGroup"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ChildGroup"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // DisplayName: to.Ptr("ChildGroup"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("RootGroup"), - // DisplayName: to.Ptr("RootGroup"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/RootGroup"), - // }, - // UpdatedBy: to.Ptr("16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-01T00:00:00.00Z"); return t}()), - // Version: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PatchManagementGroup.json -func ExampleClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Update(ctx, "ChildGroup", armmanagementgroups.PatchManagementGroupRequest{ - DisplayName: to.Ptr("AlternateDisplayName"), - ParentGroupID: to.Ptr("/providers/Microsoft.Management/managementGroups/AlternateRootGroup"), - }, &armmanagementgroups.ClientUpdateOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ManagementGroup = armmanagementgroups.ManagementGroup{ - // Name: to.Ptr("ChildGroup"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/ChildGroup"), - // Properties: &armmanagementgroups.ManagementGroupProperties{ - // DisplayName: to.Ptr("AlternateDisplayName"), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // Details: &armmanagementgroups.ManagementGroupDetails{ - // Parent: &armmanagementgroups.ParentGroupInfo{ - // Name: to.Ptr("AlternateRootGroup"), - // DisplayName: to.Ptr("AlternateRootGroup"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/AlternateRootGroup"), - // }, - // UpdatedBy: to.Ptr("bd490e30-04cb-433e-b8c8-6066959a8bab"), - // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-25T02:46:59.0545645Z"); return t}()), - // Version: to.Ptr[int32](2), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/DeleteManagementGroup.json -func ExampleClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginDelete(ctx, "GroupToDelete", &armmanagementgroups.ClientBeginDeleteOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetDescendants.json -func ExampleClient_NewGetDescendantsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewGetDescendantsPager("20000000-0000-0000-0000-000000000000", &armmanagementgroups.ClientGetDescendantsOptions{Skiptoken: nil, - Top: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DescendantListResult = armmanagementgroups.DescendantListResult{ - // Value: []*armmanagementgroups.DescendantInfo{ - // { - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.DescendantInfoProperties{ - // DisplayName: to.Ptr("Group 1"), - // Parent: &armmanagementgroups.DescendantParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // }, - // }, - // { - // Name: to.Ptr("20000000-0004-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups/subscriptions"), - // ID: to.Ptr("/subscriptions/20000000-0004-0000-0000-000000000000"), - // Properties: &armmanagementgroups.DescendantInfoProperties{ - // DisplayName: to.Ptr("Subscription 4"), - // Parent: &armmanagementgroups.DescendantParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/constants.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/constants.go index 74068c7fef48..aa55c447968f 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/constants.go +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/constants.go @@ -11,7 +11,7 @@ package armmanagementgroups const ( moduleName = "armmanagementgroups" - moduleVersion = "v1.1.0" + moduleVersion = "v1.1.1" ) type EntitySearchType string @@ -91,19 +91,19 @@ func PossibleManagementGroupExpandTypeValues() []ManagementGroupExpandType { type Permissions string const ( - PermissionsDelete Permissions = "delete" - PermissionsEdit Permissions = "edit" PermissionsNoaccess Permissions = "noaccess" PermissionsView Permissions = "view" + PermissionsEdit Permissions = "edit" + PermissionsDelete Permissions = "delete" ) // PossiblePermissionsValues returns the possible values for the Permissions const type. func PossiblePermissionsValues() []Permissions { return []Permissions{ - PermissionsDelete, - PermissionsEdit, PermissionsNoaccess, PermissionsView, + PermissionsEdit, + PermissionsDelete, } } diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/entities_client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/entities_client_example_test.go deleted file mode 100644 index 3b385f31004e..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/entities_client_example_test.go +++ /dev/null @@ -1,101 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetEntities.json -func ExampleEntitiesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEntitiesClient().NewListPager(&armmanagementgroups.EntitiesClientListOptions{Skiptoken: nil, - Skip: nil, - Top: nil, - Select: nil, - Search: nil, - Filter: nil, - View: nil, - GroupName: nil, - CacheControl: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EntityListResult = armmanagementgroups.EntityListResult{ - // Value: []*armmanagementgroups.EntityInfo{ - // { - // Name: to.Ptr("20000000-0001-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), - // Properties: &armmanagementgroups.EntityInfoProperties{ - // DisplayName: to.Ptr("Group 1 Tenant 2"), - // InheritedPermissions: to.Ptr(armmanagementgroups.PermissionsView), - // NumberOfChildGroups: to.Ptr[int32](1), - // NumberOfChildren: to.Ptr[int32](2), - // NumberOfDescendants: to.Ptr[int32](3), - // Parent: &armmanagementgroups.EntityParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // ParentDisplayNameChain: []*string{ - // to.Ptr("Tenant Root Group"), - // to.Ptr("Group 1 Tenant 2 Parent")}, - // ParentNameChain: []*string{ - // to.Ptr("TenantRootGroup"), - // to.Ptr("Group1Tenant2Parent")}, - // Permissions: to.Ptr(armmanagementgroups.PermissionsView), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // }, - // { - // Name: to.Ptr("20000000-0004-0000-0000-000000000000"), - // Type: to.Ptr("Microsoft.Management/managementGroups"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000"), - // Properties: &armmanagementgroups.EntityInfoProperties{ - // DisplayName: to.Ptr("Group 4 Tenant 2"), - // InheritedPermissions: to.Ptr(armmanagementgroups.PermissionsDelete), - // NumberOfChildGroups: to.Ptr[int32](0), - // NumberOfChildren: to.Ptr[int32](0), - // NumberOfDescendants: to.Ptr[int32](0), - // Parent: &armmanagementgroups.EntityParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000"), - // }, - // ParentDisplayNameChain: []*string{ - // to.Ptr("Tenant Root Group"), - // to.Ptr("Group 4 Tenant 2 Parent")}, - // ParentNameChain: []*string{ - // to.Ptr("TenantRootGroup"), - // to.Ptr("Group4 Tenant2Parent")}, - // Permissions: to.Ptr(armmanagementgroups.PermissionsDelete), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/go.mod b/sdk/resourcemanager/managementgroups/armmanagementgroups/go.mod index 3e3f0faced80..07ef9be13189 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/go.mod +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/ar go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/go.sum b/sdk/resourcemanager/managementgroups/armmanagementgroups/go.sum index 8ba445a8c4da..b6bd7eaad1ba 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/go.sum +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/go.sum @@ -1,31 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= 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/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/hierarchysettings_client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/hierarchysettings_client_example_test.go deleted file mode 100644 index 875aba4e1efe..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/hierarchysettings_client_example_test.go +++ /dev/null @@ -1,169 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_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/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/ListHierarchySettings.json -func ExampleHierarchySettingsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHierarchySettingsClient().List(ctx, "root", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HierarchySettingsList = armmanagementgroups.HierarchySettingsList{ - // Value: []*armmanagementgroups.HierarchySettingsInfo{ - // { - // Name: to.Ptr("root"), - // Type: to.Ptr("Microsoft.Management/managementGroups/settings"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/root/settings/default"), - // Properties: &armmanagementgroups.HierarchySettingsProperties{ - // DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - // RequireAuthorizationForGroupCreation: to.Ptr(true), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetHierarchySettings.json -func ExampleHierarchySettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHierarchySettingsClient().Get(ctx, "root", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HierarchySettings = armmanagementgroups.HierarchySettings{ - // Name: to.Ptr("root"), - // Type: to.Ptr("Microsoft.Management/managementGroups/settings"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/root/settings/default"), - // Properties: &armmanagementgroups.HierarchySettingsProperties{ - // DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - // RequireAuthorizationForGroupCreation: to.Ptr(true), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PutHierarchySettings.json -func ExampleHierarchySettingsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHierarchySettingsClient().CreateOrUpdate(ctx, "root", armmanagementgroups.CreateOrUpdateSettingsRequest{ - Properties: &armmanagementgroups.CreateOrUpdateSettingsProperties{ - DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - RequireAuthorizationForGroupCreation: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HierarchySettings = armmanagementgroups.HierarchySettings{ - // Name: to.Ptr("root"), - // Type: to.Ptr("Microsoft.Management/managementGroups/settings"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/root/settings/default"), - // Properties: &armmanagementgroups.HierarchySettingsProperties{ - // DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - // RequireAuthorizationForGroupCreation: to.Ptr(true), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/PatchHierarchySettings.json -func ExampleHierarchySettingsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHierarchySettingsClient().Update(ctx, "root", armmanagementgroups.CreateOrUpdateSettingsRequest{ - Properties: &armmanagementgroups.CreateOrUpdateSettingsProperties{ - DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - RequireAuthorizationForGroupCreation: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HierarchySettings = armmanagementgroups.HierarchySettings{ - // Name: to.Ptr("root"), - // Type: to.Ptr("Microsoft.Management/managementGroups/settings"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/root/settings/default"), - // Properties: &armmanagementgroups.HierarchySettingsProperties{ - // DefaultManagementGroup: to.Ptr("/providers/Microsoft.Management/managementGroups/DefaultGroup"), - // RequireAuthorizationForGroupCreation: to.Ptr(true), - // TenantID: to.Ptr("20000000-0000-0000-0000-000000000000"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/DeleteHierarchySettings.json -func ExampleHierarchySettingsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewHierarchySettingsClient().Delete(ctx, "root", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/managementgroupsubscriptions_client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/managementgroupsubscriptions_client_example_test.go deleted file mode 100644 index 2d56ba63ba59..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/managementgroupsubscriptions_client_example_test.go +++ /dev/null @@ -1,143 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_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/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/AddManagementGroupSubscription.json -func ExampleManagementGroupSubscriptionsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementGroupSubscriptionsClient().Create(ctx, "Group", "728bcbe4-8d56-4510-86c2-4921b8beefbc", &armmanagementgroups.ManagementGroupSubscriptionsClientCreateOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SubscriptionUnderManagementGroup = armmanagementgroups.SubscriptionUnderManagementGroup{ - // Name: to.Ptr("728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Type: to.Ptr("Microsoft.Management/managementGroups/subscriptions"), - // ID: to.Ptr(" /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Properties: &armmanagementgroups.SubscriptionUnderManagementGroupProperties{ - // DisplayName: to.Ptr("Group"), - // Parent: &armmanagementgroups.DescendantParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Group"), - // }, - // State: to.Ptr("Active"), - // Tenant: to.Ptr("e751ac82-623b-4913-8d74-22637c832373"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/RemoveManagementGroupSubscription.json -func ExampleManagementGroupSubscriptionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewManagementGroupSubscriptionsClient().Delete(ctx, "Group", "728bcbe4-8d56-4510-86c2-4921b8beefbc", &armmanagementgroups.ManagementGroupSubscriptionsClientDeleteOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetSubscriptionFromManagementGroup.json -func ExampleManagementGroupSubscriptionsClient_GetSubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagementGroupSubscriptionsClient().GetSubscription(ctx, "Group", "728bcbe4-8d56-4510-86c2-4921b8beefbc", &armmanagementgroups.ManagementGroupSubscriptionsClientGetSubscriptionOptions{CacheControl: to.Ptr("no-cache")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SubscriptionUnderManagementGroup = armmanagementgroups.SubscriptionUnderManagementGroup{ - // Name: to.Ptr("728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Type: to.Ptr("Microsoft.Management/managementGroups/subscriptions"), - // ID: to.Ptr(" /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Properties: &armmanagementgroups.SubscriptionUnderManagementGroupProperties{ - // DisplayName: to.Ptr("Group"), - // Parent: &armmanagementgroups.DescendantParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Group"), - // }, - // State: to.Ptr("Active"), - // Tenant: to.Ptr("e751ac82-623b-4913-8d74-22637c832373"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/GetAllSubscriptionsFromManagementGroup.json -func ExampleManagementGroupSubscriptionsClient_NewGetSubscriptionsUnderManagementGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagementGroupSubscriptionsClient().NewGetSubscriptionsUnderManagementGroupPager("Group", &armmanagementgroups.ManagementGroupSubscriptionsClientGetSubscriptionsUnderManagementGroupOptions{Skiptoken: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListSubscriptionUnderManagementGroup = armmanagementgroups.ListSubscriptionUnderManagementGroup{ - // Value: []*armmanagementgroups.SubscriptionUnderManagementGroup{ - // { - // Name: to.Ptr("728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Type: to.Ptr("Microsoft.Management/managementGroups/subscriptions"), - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc"), - // Properties: &armmanagementgroups.SubscriptionUnderManagementGroupProperties{ - // DisplayName: to.Ptr("S5"), - // Parent: &armmanagementgroups.DescendantParentGroupInfo{ - // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/Group"), - // }, - // State: to.Ptr("Active"), - // Tenant: to.Ptr("e751ac82-623b-4913-8d74-22637c832373"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/models.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/models.go index 5e531d326024..7484c2c8a5fd 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/models.go +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/models.go @@ -474,7 +474,7 @@ type HierarchySettingsList struct { Value []*HierarchySettingsInfo `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string `json:"@nextLink,omitempty" azure:"ro"` } // HierarchySettingsProperties - The generic properties of hierarchy settings. @@ -588,7 +588,7 @@ type ManagementGroupListResult struct { Value []*ManagementGroupInfo `json:"value,omitempty"` // READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string `json:"@nextLink,omitempty" azure:"ro"` } // ManagementGroupPathElement - A path element of a management group ancestors. diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/models_serde.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/models_serde.go index ecaec01eba30..990e0891f020 100644 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/models_serde.go +++ b/sdk/resourcemanager/managementgroups/armmanagementgroups/models_serde.go @@ -887,7 +887,7 @@ func (h *HierarchySettingsInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HierarchySettingsList. func (h HierarchySettingsList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "@nextLink", h.NextLink) populate(objectMap, "value", h.Value) return json.Marshal(objectMap) } @@ -901,7 +901,7 @@ func (h *HierarchySettingsList) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": + case "@nextLink": err = unpopulate(val, "NextLink", &h.NextLink) delete(rawMsg, key) case "value": @@ -1187,7 +1187,7 @@ func (m *ManagementGroupInfoProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagementGroupListResult. func (m ManagementGroupListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "@nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } @@ -1201,7 +1201,7 @@ func (m *ManagementGroupListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": + case "@nextLink": err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) case "value": diff --git a/sdk/resourcemanager/managementgroups/armmanagementgroups/operations_client_example_test.go b/sdk/resourcemanager/managementgroups/armmanagementgroups/operations_client_example_test.go deleted file mode 100644 index 69167c290455..000000000000 --- a/sdk/resourcemanager/managementgroups/armmanagementgroups/operations_client_example_test.go +++ /dev/null @@ -1,55 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armmanagementgroups_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/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() - clientFactory, err := armmanagementgroups.NewClientFactory(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armmanagementgroups.OperationListResult{ - // Value: []*armmanagementgroups.Operation{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Display: &armmanagementgroups.OperationDisplayProperties{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // Operation: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Provider: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // Resource: to.Ptr("aaaaaaaaaaaaa"), - // }, - // }}, - // } - } -}