diff --git a/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md b/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md index 18f569794de4..8c6cdaf4ddd4 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.1.2 (2023-06-08) +### Other Changes + + ## 1.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/resources/armmanagedapplications/application_client_example_test.go b/sdk/resourcemanager/resources/armmanagedapplications/application_client_example_test.go deleted file mode 100644 index a65aa4faf1de..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/application_client_example_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. -// DO NOT EDIT. - -package armmanagedapplications_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json -func ExampleApplicationClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationClient().NewListOperationsPager(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 = armmanagedapplications.OperationListResult{ - // Value: []*armmanagedapplications.Operation{ - // { - // Name: to.Ptr("SolutionsOpeartion1"), - // Display: &armmanagedapplications.OperationDisplay{ - // Operation: to.Ptr("Read"), - // Provider: to.Ptr("Microsoft.ResourceProvider"), - // Resource: to.Ptr("Resource1"), - // }, - // }, - // { - // Name: to.Ptr("SolutionssOpeartion2"), - // Display: &armmanagedapplications.OperationDisplay{ - // Operation: to.Ptr("Write"), - // Provider: to.Ptr("Microsoft.ResourceProvider"), - // Resource: to.Ptr("Resource2"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/applicationdefinitions_client_example_test.go b/sdk/resourcemanager/resources/armmanagedapplications/applicationdefinitions_client_example_test.go deleted file mode 100644 index 2cc2e38b19b3..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/applicationdefinitions_client_example_test.go +++ /dev/null @@ -1,237 +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 armmanagedapplications_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/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json -func ExampleApplicationDefinitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationDefinitionsClient().Get(ctx, "rg", "myManagedApplicationDef", 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.ApplicationDefinition = armmanagedapplications.ApplicationDefinition{ - // Name: to.Ptr("myManagedApplicationDef"), - // Type: to.Ptr("Microsoft.Solutions/applicationDefinitions"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef"), - // Location: to.Ptr("East US 2"), - // Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - // Description: to.Ptr("myManagedApplicationDef description"), - // Artifacts: []*armmanagedapplications.ApplicationArtifact{ - // { - // Name: to.Ptr("CreateUiDefinition"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeCustom), - // URI: to.Ptr("https://path/to/managedApplicationCreateUiDefinition.json"), - // }, - // { - // Name: to.Ptr("ManagedApplicationResourceTemplate"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeTemplate), - // URI: to.Ptr("https://path/to/mainTemplate.json"), - // }}, - // Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - // { - // PrincipalID: to.Ptr("validprincipalguid"), - // RoleDefinitionID: to.Ptr("validroleguid"), - // }}, - // DisplayName: to.Ptr("myManagedApplicationDef"), - // LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - // PackageFileURI: to.Ptr("https://path/to/packagezipfile"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json -func ExampleApplicationDefinitionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationDefinitionsClient().BeginDelete(ctx, "rg", "myManagedApplicationDef", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json -func ExampleApplicationDefinitionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationDefinitionsClient().BeginCreateOrUpdate(ctx, "rg", "myManagedApplicationDef", armmanagedapplications.ApplicationDefinition{ - Location: to.Ptr("East US 2"), - Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - Description: to.Ptr("myManagedApplicationDef description"), - Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - { - PrincipalID: to.Ptr("validprincipalguid"), - RoleDefinitionID: to.Ptr("validroleguid"), - }}, - DisplayName: to.Ptr("myManagedApplicationDef"), - LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - PackageFileURI: to.Ptr("https://path/to/packagezipfile"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ApplicationDefinition = armmanagedapplications.ApplicationDefinition{ - // Name: to.Ptr("myManagedApplicationDef"), - // Type: to.Ptr("Microsoft.Solutions/applicationDefinitions"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef"), - // Location: to.Ptr("East US 2"), - // Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - // Description: to.Ptr("myManagedApplicationDef description"), - // Artifacts: []*armmanagedapplications.ApplicationArtifact{ - // { - // Name: to.Ptr("CreateUiDefinition"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeCustom), - // URI: to.Ptr("https://path/to/managedApplicationCreateUiDefinition.json"), - // }, - // { - // Name: to.Ptr("ManagedApplicationResourceTemplate"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeTemplate), - // URI: to.Ptr("https://path/to/mainTemplate.json"), - // }}, - // Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - // { - // PrincipalID: to.Ptr("validprincipalguid"), - // RoleDefinitionID: to.Ptr("validroleguid"), - // }}, - // DisplayName: to.Ptr("myManagedApplicationDef"), - // LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - // PackageFileURI: to.Ptr("https://path/to/packagezipfile"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json -func ExampleApplicationDefinitionsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationDefinitionsClient().NewListByResourceGroupPager("rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ApplicationDefinitionListResult = armmanagedapplications.ApplicationDefinitionListResult{ - // Value: []*armmanagedapplications.ApplicationDefinition{ - // { - // Name: to.Ptr("myManagedApplicationDef"), - // Type: to.Ptr("Microsoft.Solutions/applicationDefinitions"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef"), - // Location: to.Ptr("East US 2"), - // Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - // Description: to.Ptr("myManagedApplicationDef description"), - // Artifacts: []*armmanagedapplications.ApplicationArtifact{ - // { - // Name: to.Ptr("CreateUiDefinition"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeCustom), - // URI: to.Ptr("https://path/to/managedApplicationCreateUiDefinition.json"), - // }, - // { - // Name: to.Ptr("ManagedApplicationResourceTemplate"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeTemplate), - // URI: to.Ptr("https://path/to/mainTemplate.json"), - // }}, - // Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - // { - // PrincipalID: to.Ptr("validprincipalguid"), - // RoleDefinitionID: to.Ptr("validroleguid"), - // }}, - // DisplayName: to.Ptr("myManagedApplicationDef"), - // LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - // PackageFileURI: to.Ptr("https://path/to/packagezipfile"), - // }, - // }, - // { - // Name: to.Ptr("myManagedApplicationDef2"), - // Type: to.Ptr("Microsoft.Solutions/applicationDefinitions"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myManagedApplicationDef2"), - // Location: to.Ptr("West US"), - // Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - // Description: to.Ptr("myManagedApplicationDef2 description"), - // Artifacts: []*armmanagedapplications.ApplicationArtifact{ - // { - // Name: to.Ptr("CreateUiDefinition"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeCustom), - // URI: to.Ptr("https://path/to/managedApplicationCreateUiDefinition.json"), - // }, - // { - // Name: to.Ptr("ManagedApplicationResourceTemplate"), - // Type: to.Ptr(armmanagedapplications.ApplicationArtifactTypeTemplate), - // URI: to.Ptr("https://path/to/mainTemplate.json"), - // }}, - // Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - // { - // PrincipalID: to.Ptr("validprincipalguid"), - // RoleDefinitionID: to.Ptr("validroleguid"), - // }}, - // DisplayName: to.Ptr("myManagedApplicationDef2"), - // LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - // PackageFileURI: to.Ptr("https://path/to/packagezipfile"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/applications_client_example_test.go b/sdk/resourcemanager/resources/armmanagedapplications/applications_client_example_test.go deleted file mode 100644 index 63b8f7224a2c..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/applications_client_example_test.go +++ /dev/null @@ -1,381 +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 armmanagedapplications_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/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json -func ExampleApplicationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationsClient().Get(ctx, "rg", "myManagedApplication", 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.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplication.json -func ExampleApplicationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationsClient().BeginDelete(ctx, "rg", "myManagedApplication", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json -func ExampleApplicationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationsClient().BeginCreateOrUpdate(ctx, "rg", "myManagedApplication", armmanagedapplications.Application{ - Location: to.Ptr("East US 2"), - Kind: to.Ptr("ServiceCatalog"), - Properties: &armmanagedapplications.ApplicationProperties{ - ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/updateApplication.json -func ExampleApplicationsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationsClient().Update(ctx, "rg", "myManagedApplication", &armmanagedapplications.ApplicationsClientUpdateOptions{Parameters: &armmanagedapplications.ApplicationPatchable{ - Kind: to.Ptr("ServiceCatalog"), - Properties: &armmanagedapplications.ApplicationPropertiesPatchable{ - ApplicationDefinitionID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"), - ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - }, - }, - }) - 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.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ApplicationDefinitionID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"), - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json -func ExampleApplicationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationsClient().NewListByResourceGroupPager("rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ApplicationListResult = armmanagedapplications.ApplicationListResult{ - // Value: []*armmanagedapplications.Application{ - // { - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // }, - // { - // Name: to.Ptr("myManagedApplication2"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication2"), - // Location: to.Ptr("West US"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsBySubscription.json -func ExampleApplicationsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewApplicationsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ApplicationListResult = armmanagedapplications.ApplicationListResult{ - // Value: []*armmanagedapplications.Application{ - // { - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // }, - // { - // Name: to.Ptr("myManagedApplication2"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication2"), - // Location: to.Ptr("West US"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationById.json -func ExampleApplicationsClient_GetByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationsClient().GetByID(ctx, "myApplicationId", 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.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationById.json -func ExampleApplicationsClient_BeginDeleteByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationsClient().BeginDeleteByID(ctx, "myApplicationId", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationById.json -func ExampleApplicationsClient_BeginCreateOrUpdateByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewApplicationsClient().BeginCreateOrUpdateByID(ctx, "myApplicationId", armmanagedapplications.Application{ - Location: to.Ptr("East US 2"), - Kind: to.Ptr("ServiceCatalog"), - Properties: &armmanagedapplications.ApplicationProperties{ - ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Location: to.Ptr("East US 2"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/updateApplicationById.json -func ExampleApplicationsClient_UpdateByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmanagedapplications.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewApplicationsClient().UpdateByID(ctx, "myApplicationId", &armmanagedapplications.ApplicationsClientUpdateByIDOptions{Parameters: &armmanagedapplications.Application{ - Kind: to.Ptr("ServiceCatalog"), - Properties: &armmanagedapplications.ApplicationProperties{ - ApplicationDefinitionID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"), - ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - }, - }, - }) - 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.Application = armmanagedapplications.Application{ - // Name: to.Ptr("myManagedApplication"), - // Type: to.Ptr("Microsoft.Solutions/applications"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication"), - // Kind: to.Ptr("ServiceCatalog"), - // Properties: &armmanagedapplications.ApplicationProperties{ - // ApplicationDefinitionID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"), - // ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), - // ProvisioningState: to.Ptr(armmanagedapplications.ProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/autorest.md b/sdk/resourcemanager/resources/armmanagedapplications/autorest.md index dc4d55881acf..4b2d9ace7346 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/autorest.md +++ b/sdk/resourcemanager/resources/armmanagedapplications/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.1.2 package-managedapplications: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/resources/armmanagedapplications/constants.go b/sdk/resourcemanager/resources/armmanagedapplications/constants.go index f1134cea935b..781517d63b32 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/constants.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/constants.go @@ -11,7 +11,7 @@ package armmanagedapplications const ( moduleName = "armmanagedapplications" - moduleVersion = "v1.1.1" + moduleVersion = "v1.1.2" ) // ApplicationArtifactType - The managed application artifact type. diff --git a/sdk/resourcemanager/resources/armmanagedapplications/go.mod b/sdk/resourcemanager/resources/armmanagedapplications/go.mod index eb8afbb60516..443ebe49328f 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/go.mod +++ b/sdk/resourcemanager/resources/armmanagedapplications/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanage 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/resources/armmanagedapplications/go.sum b/sdk/resourcemanager/resources/armmanagedapplications/go.sum index 8ba445a8c4da..b6bd7eaad1ba 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/go.sum +++ b/sdk/resourcemanager/resources/armmanagedapplications/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=