diff --git a/sdk/resourcemanager/servicebus/armservicebus/CHANGELOG.md b/sdk/resourcemanager/servicebus/armservicebus/CHANGELOG.md index 5608f336ba7d..dcf724e3134d 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/CHANGELOG.md +++ b/sdk/resourcemanager/servicebus/armservicebus/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 2.0.0-beta.4 (2023-04-06) +### Other Changes + + ## 2.0.0-beta.3 (2023-03-27) ### Features Added diff --git a/sdk/resourcemanager/servicebus/armservicebus/autorest.md b/sdk/resourcemanager/servicebus/armservicebus/autorest.md index 7543dba6beb3..e31d278f1d5b 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/autorest.md +++ b/sdk/resourcemanager/servicebus/armservicebus/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/servicebus/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.3 +module-version: 2.0.0-beta.4 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/servicebus/armservicebus/constants.go b/sdk/resourcemanager/servicebus/armservicebus/constants.go index afacfcf48b7f..b51c82295703 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/constants.go +++ b/sdk/resourcemanager/servicebus/armservicebus/constants.go @@ -11,7 +11,7 @@ package armservicebus const ( moduleName = "armservicebus" - moduleVersion = "v2.0.0-beta.3" + moduleVersion = "v2.0.0-beta.4" ) type AccessRights string diff --git a/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfigs_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfigs_client_example_test.go deleted file mode 100644 index 4c4ebb790d92..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/disasterrecoveryconfigs_client_example_test.go +++ /dev/null @@ -1,328 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasList.json -func ExampleDisasterRecoveryConfigsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListPager("ardsouzatestRG", "sdk-Namespace-8860", 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.ArmDisasterRecoveryListResult = armservicebus.ArmDisasterRecoveryListResult{ - // Value: []*armservicebus.ArmDisasterRecovery{ - // { - // Name: to.Ptr("sdk-DisasterRecovery-3814"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8860/disasterRecoveryConfig/sdk-DisasterRecovery-3814"), - // Properties: &armservicebus.ArmDisasterRecoveryProperties{ - // PartnerNamespace: to.Ptr("sdk-Namespace-37"), - // ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded), - // Role: to.Ptr(armservicebus.RoleDisasterRecoveryPrimary), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasCreate.json -func ExampleDisasterRecoveryConfigsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().CreateOrUpdate(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-Namespace-8860", armservicebus.ArmDisasterRecovery{ - Properties: &armservicebus.ArmDisasterRecoveryProperties{ - AlternateName: to.Ptr("alternameforAlias-Namespace-8860"), - PartnerNamespace: to.Ptr("sdk-Namespace-37"), - }, - }, 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.ArmDisasterRecovery = armservicebus.ArmDisasterRecovery{ - // Name: to.Ptr("sdk-Namespace-8860"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-8860/disasterRecoveryConfig/sdk-Namespace-8860"), - // Properties: &armservicebus.ArmDisasterRecoveryProperties{ - // AlternateName: to.Ptr("alternameforAlias-Namespace-8860"), - // PartnerNamespace: to.Ptr("sdk-Namespace-37"), - // ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded), - // Role: to.Ptr(armservicebus.RoleDisasterRecoveryPrimary), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasDelete.json -func ExampleDisasterRecoveryConfigsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDisasterRecoveryConfigsClient().Delete(ctx, "SouthCentralUS", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasGet.json -func ExampleDisasterRecoveryConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().Get(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", 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.ArmDisasterRecovery = armservicebus.ArmDisasterRecovery{ - // Name: to.Ptr("sdk-DisasterRecovery-3814"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ardsouzatestRG/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-37/disasterRecoveryConfig/sdk-DisasterRecovery-3814"), - // Properties: &armservicebus.ArmDisasterRecoveryProperties{ - // PartnerNamespace: to.Ptr("sdk-Namespace-8860"), - // PendingReplicationOperationsCount: to.Ptr[int64](0), - // ProvisioningState: to.Ptr(armservicebus.ProvisioningStateDRSucceeded), - // Role: to.Ptr(armservicebus.RoleDisasterRecoverySecondary), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBEHAliasBreakPairing.json -func ExampleDisasterRecoveryConfigsClient_BreakPairing() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDisasterRecoveryConfigsClient().BreakPairing(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasFailOver.json -func ExampleDisasterRecoveryConfigsClient_FailOver() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDisasterRecoveryConfigsClient().FailOver(ctx, "ardsouzatestRG", "sdk-Namespace-8860", "sdk-DisasterRecovery-3814", &armservicebus.DisasterRecoveryConfigsClientFailOverOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleListAll.json -func ExampleDisasterRecoveryConfigsClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListAuthorizationRulesPager("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", 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.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{ - // Value: []*armservicebus.SBAuthorizationRule{ - // { - // Name: to.Ptr("RootManageSharedAccessKey"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/RootManageSharedAccessKey"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsManage), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-1067"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1067"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-1684"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1684"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-Authrules-4879"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleGet.json -func ExampleDisasterRecoveryConfigsClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().GetAuthorizationRule(ctx, "exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", "sdk-Authrules-4879", 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-Authrules-4879"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/DisasterRecoveryConfig/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasAuthorizationRuleListKey.json -func ExampleDisasterRecoveryConfigsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().ListKeys(ctx, "exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", "sdk-Authrules-1746", 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.AccessKeys = armservicebus.AccessKeys{ - // AliasPrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), - // AliasSecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), - // KeyName: to.Ptr("sdk-Authrules-1746"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/disasterRecoveryConfigs/SBAliasCheckNameAvailability.json -func ExampleDisasterRecoveryConfigsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDisasterRecoveryConfigsClient().CheckNameAvailability(ctx, "exampleResourceGroup", "sdk-Namespace-9080", armservicebus.CheckNameAvailability{ - Name: to.Ptr("sdk-DisasterRecovery-9474"), - }, 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 = armservicebus.CheckNameAvailabilityResult{ - // Message: to.Ptr(""), - // NameAvailable: to.Ptr(true), - // Reason: to.Ptr(armservicebus.UnavailableReasonNone), - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/go.mod b/sdk/resourcemanager/servicebus/armservicebus/go.mod index 8d4fd25cd1db..6ba58f4e55da 100644 --- a/sdk/resourcemanager/servicebus/armservicebus/go.mod +++ b/sdk/resourcemanager/servicebus/armservicebus/go.mod @@ -4,13 +4,13 @@ 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.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_client_example_test.go deleted file mode 100644 index b3f2357dcfec..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/migrationconfigs_client_example_test.go +++ /dev/null @@ -1,181 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationList.json -func ExampleMigrationConfigsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMigrationConfigsClient().NewListPager("ResourceGroup", "sdk-Namespace-9259", 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.MigrationConfigListResult = armservicebus.MigrationConfigListResult{ - // Value: []*armservicebus.MigrationConfigProperties{ - // { - // Name: to.Ptr("sdk-Namespace-9259"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/migrationconfigurations"), - // ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9259/migrationConfigs/sdk-Namespace-9259"), - // Properties: &armservicebus.MigrationConfigPropertiesProperties{ - // MigrationState: to.Ptr("Active"), - // PostMigrationName: to.Ptr("sdk-PostMigration-9423"), - // ProvisioningState: to.Ptr("Succeeded"), - // TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7454"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json -func ExampleMigrationConfigsClient_BeginCreateAndStartMigration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMigrationConfigsClient().BeginCreateAndStartMigration(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, armservicebus.MigrationConfigProperties{ - Properties: &armservicebus.MigrationConfigPropertiesProperties{ - PostMigrationName: to.Ptr("sdk-PostMigration-5919"), - TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"), - }, - }, 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.MigrationConfigProperties = armservicebus.MigrationConfigProperties{ - // Name: to.Ptr("sdk-Namespace-41"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs"), - // ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default"), - // Properties: &armservicebus.MigrationConfigPropertiesProperties{ - // MigrationState: to.Ptr("Initiating"), - // PostMigrationName: to.Ptr("sdk-PostMigration-5919"), - // ProvisioningState: to.Ptr("Succeeded"), - // TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json -func ExampleMigrationConfigsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewMigrationConfigsClient().Delete(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationGet.json -func ExampleMigrationConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMigrationConfigsClient().Get(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, 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.MigrationConfigProperties = armservicebus.MigrationConfigProperties{ - // Name: to.Ptr("sdk-Namespace-41"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs"), - // ID: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default"), - // Properties: &armservicebus.MigrationConfigPropertiesProperties{ - // MigrationState: to.Ptr("Active"), - // PendingReplicationOperationsCount: to.Ptr[int64](0), - // PostMigrationName: to.Ptr("sdk-PostMigration-5919"), - // ProvisioningState: to.Ptr("Succeeded"), - // TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json -func ExampleMigrationConfigsClient_CompleteMigration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewMigrationConfigsClient().CompleteMigration(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json -func ExampleMigrationConfigsClient_Revert() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewMigrationConfigsClient().Revert(ctx, "ResourceGroup", "sdk-Namespace-41", armservicebus.MigrationConfigurationNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/namespaces_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/namespaces_client_example_test.go deleted file mode 100644 index 9bfcf0cd06bc..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/namespaces_client_example_test.go +++ /dev/null @@ -1,1670 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceList.json -func ExampleNamespacesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNamespacesClient().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.SBNamespaceListResult = armservicebus.SBNamespaceListResult{ - // Value: []*armservicebus.SBNamespace{ - // { - // Name: to.Ptr("NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:40:17.27Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), - // MinimumTLSVersion: to.Ptr(armservicebus.TLSVersionOne2), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:15:30.78Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:50:38.98Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-41dc63f4-0b08-4029-b3ef-535a131bfa65"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-41dc63f4-0b08-4029-b3ef-535a131bfa65.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:58.003Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-df52cf51-e831-4bf2-bd92-e9885f68a996"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-df52cf51-e831-4bf2-bd92-e9885f68a996"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:17:54.997Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-df52cf51-e831-4bf2-bd92-e9885f68a996"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-df52cf51-e831-4bf2-bd92-e9885f68a996.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:44:39.737Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("SBPremium"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/SBPremium"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:01:00.42Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sbpremium"), - // PremiumMessagingPartitions: to.Ptr[int32](1), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://SBPremium.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:01:00.42Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Tier: to.Ptr(armservicebus.SKUTierPremium), - // }, - // }, - // { - // Name: to.Ptr("rrama-ns2"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/sadfsadfsadf/providers/Microsoft.ServiceBus/namespaces/rrama-ns2"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:14:00.013Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-ns2"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://rrama-ns2.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-03T22:53:32.927Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-20e57600-29d0-4035-ac85-74f4c54dcda1"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-20e57600-29d0-4035-ac85-74f4c54dcda1"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:30:49.16Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-20e57600-29d0-4035-ac85-74f4c54dcda1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-20e57600-29d0-4035-ac85-74f4c54dcda1.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:17:58.483Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T18:07:30.05Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-3e538a1a-58fb-4315-b2ce-76f5c944114c"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-3e538a1a-58fb-4315-b2ce-76f5c944114c.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:57.747Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("prem-ns123"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/prem-ns123"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-13T00:02:39.997Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:prem-ns123"), - // PremiumMessagingPartitions: to.Ptr[int32](2), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://prem-ns123.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-13T00:02:39.997Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNamePremium), - // Capacity: to.Ptr[int32](4), - // Tier: to.Ptr(armservicebus.SKUTierPremium), - // }, - // }, - // { - // Name: to.Ptr("NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:01:58.73Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T03:02:59.8Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:22:45.327Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:08:01.207Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-c05e9df3-7737-44ee-a321-15f6e0545b97"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-c05e9df3-7737-44ee-a321-15f6e0545b97"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:29:19.75Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-c05e9df3-7737-44ee-a321-15f6e0545b97"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-c05e9df3-7737-44ee-a321-15f6e0545b97.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:10:35.527Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:34:35.363Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-dcb4152c-231b-4c16-a683-07cc6b38fa46"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-dcb4152c-231b-4c16-a683-07cc6b38fa46.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:33:00.957Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-f501f5e6-1f24-439b-8982-9af665156d40"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-f501f5e6-1f24-439b-8982-9af665156d40"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:25:55.707Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-f501f5e6-1f24-439b-8982-9af665156d40"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-f501f5e6-1f24-439b-8982-9af665156d40.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:42:59.687Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:32:08.227Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:32:57.77Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:54:05.103Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:43:50.313Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-6520cc09-01ac-40a3-bc09-c5c431116e92"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-6520cc09-01ac-40a3-bc09-c5c431116e92"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:49:59.243Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-6520cc09-01ac-40a3-bc09-c5c431116e92"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-6520cc09-01ac-40a3-bc09-c5c431116e92.servicebus.windows-int.net:443"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:15:36.95Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:23:32.083Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-bfba6d5c-a425-42d9-85db-0f4da770e29a"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-bfba6d5c-a425-42d9-85db-0f4da770e29a.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:02:57.433Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("SBPrem"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/SBPrem"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:16:30.87Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sbprem"), - // PremiumMessagingPartitions: to.Ptr[int32](2), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://SBPrem.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T22:16:30.87Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNamePremium), - // Capacity: to.Ptr[int32](1), - // Tier: to.Ptr(armservicebus.SKUTierPremium), - // }, - // }, - // { - // Name: to.Ptr("NS-43b136b4-8716-40b2-97c5-0d77cac0062c"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-43b136b4-8716-40b2-97c5-0d77cac0062c"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:14:50.577Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-43b136b4-8716-40b2-97c5-0d77cac0062c"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-43b136b4-8716-40b2-97c5-0d77cac0062c.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:23:01.067Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-7c0443de-5f88-450c-b574-83f60a097dd1"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-7c0443de-5f88-450c-b574-83f60a097dd1"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:07:15.397Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-7c0443de-5f88-450c-b574-83f60a097dd1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-7c0443de-5f88-450c-b574-83f60a097dd1.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:03:03.097Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:33:50.45Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-62dd7753-a5f9-42fd-a354-ca38a4505d69"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-62dd7753-a5f9-42fd-a354-ca38a4505d69.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:35:33.053Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-ae18a18c-97ab-4089-965d-8acbf4794091"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-ae18a18c-97ab-4089-965d-8acbf4794091"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:43:36.517Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-ae18a18c-97ab-4089-965d-8acbf4794091"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-ae18a18c-97ab-4089-965d-8acbf4794091.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:40:30.587Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:46:03.773Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:43:54.56Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:59:12.1Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:52.23Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:45:09.27Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-d9337efd-9b27-454c-b2a5-dcfea56920d9"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-d9337efd-9b27-454c-b2a5-dcfea56920d9.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:20:31.863Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:34:36.447Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:15:31.607Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-d447fb03-c7da-40fe-b5eb-14f36888837b"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-d447fb03-c7da-40fe-b5eb-14f36888837b"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:53:46.697Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-d447fb03-c7da-40fe-b5eb-14f36888837b"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-d447fb03-c7da-40fe-b5eb-14f36888837b.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:09:41.26Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("ReproSB"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/ReproSB"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:34.523Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:reprosb"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://ReproSB.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:58.64Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-4c90097f-19a8-42e7-bb3c-4ac088994719"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-4c90097f-19a8-42e7-bb3c-4ac088994719"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:35:32.61Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-4c90097f-19a8-42e7-bb3c-4ac088994719"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-4c90097f-19a8-42e7-bb3c-4ac088994719.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:13:52.27Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("rrama-1-23-17"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-1-23-17"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T22:54:40.907Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-1-23-17"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://rrama-1-23-17.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:53:28.777Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:43:25.71Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:05:31.89Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-be903820-3533-46e8-90e4-72c132411848"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-be903820-3533-46e8-90e4-72c132411848"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:24:01.923Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-be903820-3533-46e8-90e4-72c132411848"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-be903820-3533-46e8-90e4-72c132411848.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:09:42.513Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("rrama-namespace1"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-namespace1"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:22.963Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-namespace1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://rrama-namespace1.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:27.297Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:38:02.517Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:03:55.96Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:42:40.01Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:02.363Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T04:28:10.71Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:43:51.587Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("sdk-Namespace-2924"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.76Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.35Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("rrama-sb1"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/rrama-sb1"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-01T21:47:34.903Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:rrama-sb1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://rrama-sb1.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-02T02:10:03.083Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("WhackWhack"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/RapscallionResources/providers/Microsoft.ServiceBus/namespaces/WhackWhack"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T23:39:01.347Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:whackwhack"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://WhackWhack.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:56:32.687Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:51:27.73Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:19:43.383Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T01:14:25.613Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:ns-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:33:01.727Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("bn3-rrama-foo1"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo1"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo1.servicebus.int7.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("bn3-rrama-foo3"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo3"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:09.907Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo3"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo3.servicebus.int7.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:33.233Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("bn3-rrama-foo2"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/bn3-rrama-foo2"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.82Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:bn3-rrama-foo2"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo2.servicebus.int7.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.82Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }, - // { - // Name: to.Ptr("db3-rrama-foo2"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.ServiceBus/namespaces/db3-rrama-foo2"), - // Location: to.Ptr("North Europe"), - // Tags: map[string]*string{ - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:10:43.463Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:db3-rrama-foo2"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://db3-rrama-foo2.servicebus.int7.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:11:09.133Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceListByResourceGroup.json -func ExampleNamespacesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNamespacesClient().NewListByResourceGroupPager("ArunMonocle", 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.SBNamespaceListResult = armservicebus.SBNamespaceListResult{ - // Value: []*armservicebus.SBNamespace{ - // { - // Name: to.Ptr("sdk-Namespace-2924"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.76Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.35Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceCreate.json -func ExampleNamespacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace2924", armservicebus.SBNamespace{ - Location: to.Ptr("South Central US"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - Properties: &armservicebus.SBNamespaceProperties{ - PremiumMessagingPartitions: to.Ptr[int32](2), - }, - SKU: &armservicebus.SBSKU{ - Name: to.Ptr(armservicebus.SKUNamePremium), - Capacity: to.Ptr[int32](4), - Tier: to.Ptr(armservicebus.SKUTierPremium), - }, - }, 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.SBNamespace = armservicebus.SBNamespace{ - // Name: to.Ptr("sdk-Namespace-2924"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.76Z"); return t}()), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"), - // MinimumTLSVersion: to.Ptr(armservicebus.TLSVersionOne2), - // PremiumMessagingPartitions: to.Ptr[int32](2), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.76Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNamePremium), - // Capacity: to.Ptr[int32](4), - // Tier: to.Ptr(armservicebus.SKUTierPremium), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceDelete.json -func ExampleNamespacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewNamespacesClient().BeginDelete(ctx, "ArunMonocle", "sdk-Namespace-3285", 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/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceGet.json -func ExampleNamespacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2924", 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.SBNamespace = armservicebus.SBNamespace{ - // Name: to.Ptr("sdk-Namespace-2924"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.76Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924"), - // MinimumTLSVersion: to.Ptr(armservicebus.TLSVersionOne2), - // PrivateEndpointConnections: []*armservicebus.PrivateEndpointConnection{ - // { - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"), - // ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample/privateEndpointConnections/privateEndpointConnectionName"), - // Properties: &armservicebus.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armservicebus.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.Network/privateEndpoints/NamespaceSample"), - // }, - // PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded), - // }, - // }}, - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.35Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceUpdate.json -func ExampleNamespacesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().Update(ctx, "ArunMonocle", "sdk-Namespace-3285", armservicebus.SBNamespaceUpdateParameters{ - Location: to.Ptr("South Central US"), - Tags: map[string]*string{ - "tag3": to.Ptr("value3"), - "tag4": to.Ptr("value4"), - }, - }, 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.SBNamespace = armservicebus.SBNamespace{ - // Name: to.Ptr("sdk-Namespace-3285"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3285"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // "tag3": to.Ptr("value3"), - // "tag4": to.Ptr("value4"), - // }, - // Properties: &armservicebus.SBNamespaceProperties{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T23:07:58.17Z"); return t}()), - // DisableLocalAuth: to.Ptr(false), - // MetricID: to.Ptr("5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-3285"), - // MinimumTLSVersion: to.Ptr(armservicebus.TLSVersionOne1), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-3285.servicebus.windows-int.net:443/"), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T23:08:45.497Z"); return t}()), - // }, - // SKU: &armservicebus.SBSKU{ - // Name: to.Ptr(armservicebus.SKUNameStandard), - // Tier: to.Ptr(armservicebus.SKUTierStandard), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json -func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().CreateOrUpdateNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", armservicebus.NetworkRuleSet{ - Properties: &armservicebus.NetworkRuleSetProperties{ - DefaultAction: to.Ptr(armservicebus.DefaultActionDeny), - IPRules: []*armservicebus.NWRuleSetIPRules{ - { - Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - IPMask: to.Ptr("1.1.1.1"), - }, - { - Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - IPMask: to.Ptr("1.1.1.2"), - }, - { - Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - IPMask: to.Ptr("1.1.1.3"), - }, - { - Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - IPMask: to.Ptr("1.1.1.4"), - }, - { - Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - IPMask: to.Ptr("1.1.1.5"), - }}, - VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{ - { - IgnoreMissingVnetServiceEndpoint: to.Ptr(true), - Subnet: &armservicebus.Subnet{ - ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"), - }, - }, - { - IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - Subnet: &armservicebus.Subnet{ - ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"), - }, - }, - { - IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - Subnet: &armservicebus.Subnet{ - ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"), - }, - }}, - }, - }, 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.NetworkRuleSet = armservicebus.NetworkRuleSet{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"), - // ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/Default-ServiceBus-AustraliaEast/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default"), - // Properties: &armservicebus.NetworkRuleSetProperties{ - // DefaultAction: to.Ptr(armservicebus.DefaultActionDeny), - // IPRules: []*armservicebus.NWRuleSetIPRules{ - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.1"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.2"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.3"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.4"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.5"), - // }}, - // PublicNetworkAccess: to.Ptr(armservicebus.PublicNetworkAccessFlagEnabled), - // VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{ - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(true), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"), - // }, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json -func ExampleNamespacesClient_GetNetworkRuleSet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().GetNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", 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.NetworkRuleSet = armservicebus.NetworkRuleSet{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"), - // ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/Default-ServiceBus-AustraliaEast/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkruleset/default"), - // Properties: &armservicebus.NetworkRuleSetProperties{ - // DefaultAction: to.Ptr(armservicebus.DefaultActionAllow), - // IPRules: []*armservicebus.NWRuleSetIPRules{ - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.1"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.2"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.3"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.4"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.5"), - // }}, - // PublicNetworkAccess: to.Ptr(armservicebus.PublicNetworkAccessFlagEnabled), - // VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{ - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(true), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"), - // }, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetList.json -func ExampleNamespacesClient_NewListNetworkRuleSetsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNamespacesClient().NewListNetworkRuleSetsPager("ResourceGroup", "sdk-Namespace-6019", 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.NetworkRuleSetListResult = armservicebus.NetworkRuleSetListResult{ - // Value: []*armservicebus.NetworkRuleSet{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/NetworkRuleSet"), - // ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkrulesets/default"), - // Properties: &armservicebus.NetworkRuleSetProperties{ - // DefaultAction: to.Ptr(armservicebus.DefaultActionDeny), - // IPRules: []*armservicebus.NWRuleSetIPRules{ - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.1"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.2"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.3"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.4"), - // }, - // { - // Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow), - // IPMask: to.Ptr("1.1.1.5"), - // }}, - // VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{ - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(true), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"), - // }, - // }, - // { - // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - // Subnet: &armservicebus.Subnet{ - // ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"), - // }, - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleListAll.json -func ExampleNamespacesClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-6914", 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.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{ - // Value: []*armservicebus.SBAuthorizationRule{ - // { - // Name: to.Ptr("RootManageSharedAccessKey"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"), - // ID: to.Ptr("https://sbgm.windows-int.net/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules?api-version=2017-04-01/RootManageSharedAccessKey"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsManage), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }, - // { - // Name: to.Ptr("sdk-AuthRules-1788"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"), - // ID: to.Ptr("https://sbgm.windows-int.net/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules?api-version=2017-04-01/sdk-AuthRules-1788"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleCreate.json -func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6914", "sdk-AuthRules-1788", armservicebus.SBAuthorizationRule{ - Properties: &armservicebus.SBAuthorizationRuleProperties{ - Rights: []*armservicebus.AccessRights{ - to.Ptr(armservicebus.AccessRightsListen), - to.Ptr(armservicebus.AccessRightsSend)}, - }, - }, 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-1788"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleDelete.json -func ExampleNamespacesClient_DeleteAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleGet.json -func ExampleNamespacesClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6914", "sdk-AuthRules-1788", 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-1788"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788/"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleListKey.json -func ExampleNamespacesClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-1788"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=############################################"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=############################################"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleRegenerateKey.json -func ExampleNamespacesClient_RegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-6914", "sdk-AuthRules-1788", armservicebus.RegenerateAccessKeyParameters{ - KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), - }, 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-1788"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=#############################################"), - // PrimaryKey: to.Ptr("#############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6914.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-1788;SharedAccessKey=#############################################"), - // SecondaryKey: to.Ptr("#############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceCheckNameAvailability.json -func ExampleNamespacesClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNamespacesClient().CheckNameAvailability(ctx, armservicebus.CheckNameAvailability{ - Name: to.Ptr("sdk-Namespace-2924"), - }, 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 = armservicebus.CheckNameAvailabilityResult{ - // Message: to.Ptr(""), - // NameAvailable: to.Ptr(true), - // Reason: to.Ptr(armservicebus.UnavailableReasonNone), - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/operations_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/operations_client_example_test.go deleted file mode 100644 index bb25f85501c2..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/operations_client_example_test.go +++ /dev/null @@ -1,334 +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 armservicebus_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/SBOperations_List.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 := armservicebus.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 = armservicebus.OperationListResult{ - // Value: []*armservicebus.Operation{ - // { - // Name: to.Ptr("Microsoft.ServiceBus/checkNameAvailability/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get namespace availability."), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Non Resource Operation"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/register/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Registers the ServiceBus Resource Provider"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("ServiceBus Resource Provider"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create Or Update Namespace "), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace Resource"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/Delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Namespace"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Namespace Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Namespace Authorization Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/listkeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace Listkeys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/authorizationRules/regenerateKeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Resource Regeneratekeys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Queue"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Queue"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/Delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Queue"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Queue Authorization Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr(" Get Queue Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Queue Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/listkeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("List Queue keys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/queues/authorizationRules/regenerateKeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Resource Regeneratekeys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Queue AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Topic"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Topic"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/Delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Topic"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Topic Authorization Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr(" Get Topic Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Topic Authorization Rules"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/listkeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("List Topic keys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/authorizationRules/regenerateKeys/action"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Resource Regeneratekeys"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Topic AuthorizationRules"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update TopicSubscription"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("TopicSubscription"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get TopicSubscription"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("TopicSubscription"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/Delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete TopicSubscription"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("TopicSubscription"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Rule"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Rule"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/topics/subscriptions/rules/Delete"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Delete Rule"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Rule"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/metricDefinitions/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace metrics"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace metrics"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/diagnosticSettings/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace diagnostic settings"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace diagnostic settings"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/diagnosticSettings/write"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Create or Update Namespace diagnostic settings"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace diagnostic settings"), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.ServiceBus/namespaces/logDefinitions/read"), - // Display: &armservicebus.OperationDisplay{ - // Operation: to.Ptr("Get Namespace logs"), - // Provider: to.Ptr("Microsoft Azure ServiceBus"), - // Resource: to.Ptr("Namespace logs"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/privateendpointconnections_client_example_test.go deleted file mode 100644 index a914cd317306..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,164 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionList.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("SDK-ServiceBus-4794", "sdk-Namespace-5828", 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.PrivateEndpointConnectionListResult = armservicebus.PrivateEndpointConnectionListResult{ - // Value: []*armservicebus.PrivateEndpointConnection{ - // { - // Name: to.Ptr("5dc668b3-70e4-437f-b61c-a3c1e594be7a"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"), - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-7182/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5705-new/privateEndpointConnections/5dc668b3-70e4-437f-b61c-a3c1e594be7a"), - // Properties: &armservicebus.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armservicebus.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-7182/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5705-new"), - // }, - // PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionCreate.json -func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-2924", "privateEndpointConnectionName", armservicebus.PrivateEndpointConnection{ - Properties: &armservicebus.PrivateEndpointConnectionProperties{ - PrivateEndpoint: &armservicebus.PrivateEndpoint{ - ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847"), - }, - PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{ - Description: to.Ptr("testing"), - Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusRejected), - }, - ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded), - }, - }, 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.PrivateEndpointConnection = armservicebus.PrivateEndpointConnection{ - // Name: to.Ptr("928c44d5-b7c6-423b-b6fa-811e0c27b3e0"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"), - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateEndpointConnections/928c44d5-b7c6-423b-b6fa-811e0c27b3e0"), - // Properties: &armservicebus.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armservicebus.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"), - // }, - // PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionDelete.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "ArunMonocle", "sdk-Namespace-3285", "928c44d5-b7c6-423b-b6fa-811e0c27b3e0", 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/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionGet.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "SDK-ServiceBus-4794", "sdk-Namespace-5828", "privateEndpointConnectionName", 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.PrivateEndpointConnection = armservicebus.PrivateEndpointConnection{ - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"), - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateEndpointConnections/privateEndpointConnectionName"), - // Properties: &armservicebus.PrivateEndpointConnectionProperties{ - // PrivateEndpoint: &armservicebus.PrivateEndpoint{ - // ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"), - // }, - // PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{ - // Description: to.Ptr("Auto-Approved"), - // Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded), - // }, - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/privatelinkresources_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/privatelinkresources_client_example_test.go deleted file mode 100644 index fae087e97dcd..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,53 +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 armservicebus_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateLinkResourcesGet.json -func ExamplePrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2924", 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.PrivateLinkResourcesListResult = armservicebus.PrivateLinkResourcesListResult{ - // Value: []*armservicebus.PrivateLinkResource{ - // { - // Name: to.Ptr("namespace"), - // Type: to.Ptr("Microsoft.ServiceBus/namespaces/privateLinkResources"), - // ID: to.Ptr("subscriptions/subID/resourceGroups/SDK-ServiceBus-4794/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-5828/privateLinkResources/namespace"), - // Properties: &armservicebus.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("namespace"), - // RequiredMembers: []*string{ - // to.Ptr("namespace")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.servicebus.windows.net")}, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/queues_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/queues_client_example_test.go deleted file mode 100644 index 64a791168348..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/queues_client_example_test.go +++ /dev/null @@ -1,359 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleListAll.json -func ExampleQueuesClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewQueuesClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", 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.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{ - // Value: []*armservicebus.SBAuthorizationRule{ - // { - // Name: to.Ptr("sdk-AuthRules-5800"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleCreate.json -func ExampleQueuesClient_CreateOrUpdateAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", armservicebus.SBAuthorizationRule{ - Properties: &armservicebus.SBAuthorizationRuleProperties{ - Rights: []*armservicebus.AccessRights{ - to.Ptr(armservicebus.AccessRightsListen), - to.Ptr(armservicebus.AccessRightsSend)}, - }, - }, 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-5800"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleDelete.json -func ExampleQueuesClient_DeleteAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewQueuesClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleGet.json -func ExampleQueuesClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-5800"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7982/queues/sdk-Queues-2317/authorizationRules/sdk-AuthRules-5800"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleListKey.json -func ExampleQueuesClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-5800"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleRegenerateKey.json -func ExampleQueuesClient_RegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-7982", "sdk-Queues-2317", "sdk-AuthRules-5800", armservicebus.RegenerateAccessKeyParameters{ - KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), - }, 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-5800"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"), - // PrimaryKey: to.Ptr("############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-Queues-2317"), - // SecondaryKey: to.Ptr("############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueListByNameSpace.json -func ExampleQueuesClient_NewListByNamespacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewQueuesClient().NewListByNamespacePager("ArunMonocle", "sdk-Namespace-3174", &armservicebus.QueuesClientListByNamespaceOptions{Skip: 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.SBQueueListResult = armservicebus.SBQueueListResult{ - // Value: []*armservicebus.SBQueue{ - // { - // Name: to.Ptr("sdk-queues-5647"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-queues-5647"), - // Properties: &armservicebus.SBQueueProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:32.4592931Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableExpress: to.Ptr(false), - // EnablePartitioning: to.Ptr(true), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](163840), - // MessageCount: to.Ptr[int64](0), - // RequiresDuplicateDetection: to.Ptr(false), - // RequiresSession: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.6243761Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueCreate.json -func ExampleQueuesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-3174", "sdk-Queues-5647", armservicebus.SBQueue{ - Properties: &armservicebus.SBQueueProperties{ - EnablePartitioning: 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.SBQueue = armservicebus.SBQueue{ - // Name: to.Ptr("sdk-Queues-5647"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-Queues-5647"), - // Properties: &armservicebus.SBQueueProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.227Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:33.68Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableExpress: to.Ptr(false), - // EnablePartitioning: to.Ptr(true), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](163840), - // MessageCount: to.Ptr[int64](0), - // RequiresDuplicateDetection: to.Ptr(false), - // RequiresSession: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.227Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueDelete.json -func ExampleQueuesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewQueuesClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-183", "sdk-Queues-8708", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueGet.json -func ExampleQueuesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewQueuesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-3174", "sdk-Queues-5647", 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.SBQueue = armservicebus.SBQueue{ - // Name: to.Ptr("sdk-Queues-5647"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Queues"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-3174/queues/sdk-Queues-5647"), - // Properties: &armservicebus.SBQueueProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:32.4592931Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableExpress: to.Ptr(false), - // EnablePartitioning: to.Ptr(true), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](163840), - // MessageCount: to.Ptr[int64](0), - // RequiresDuplicateDetection: to.Ptr(false), - // RequiresSession: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T18:07:34.6243761Z"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/rules_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/rules_client_example_test.go deleted file mode 100644 index 8f6ab74add59..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/rules_client_example_test.go +++ /dev/null @@ -1,233 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleListBySubscription.json -func ExampleRulesClient_NewListBySubscriptionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRulesClient().NewListBySubscriptionsPager("ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", &armservicebus.RulesClientListBySubscriptionsOptions{Skip: 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.RuleListResult = armservicebus.RuleListResult{ - // Value: []*armservicebus.Rule{ - // { - // Name: to.Ptr("sdk-Rules-6571"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"), - // Properties: &armservicebus.Ruleproperties{ - // Action: &armservicebus.Action{ - // }, - // FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter), - // SQLFilter: &armservicebus.SQLFilter{ - // CompatibilityLevel: to.Ptr[int32](20), - // SQLExpression: to.Ptr("1=1"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate_CorrelationFilter.json -func ExampleRulesClient_CreateOrUpdate_rulesCreateCorrelationFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{ - Properties: &armservicebus.Ruleproperties{ - CorrelationFilter: &armservicebus.CorrelationFilter{ - Properties: map[string]*string{ - "topicHint": to.Ptr("Crop"), - }, - }, - FilterType: to.Ptr(armservicebus.FilterTypeCorrelationFilter), - }, - }, 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.Rule = armservicebus.Rule{ - // Name: to.Ptr("sdk-Rules-6571"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"), - // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"), - // Properties: &armservicebus.Ruleproperties{ - // Action: &armservicebus.Action{ - // }, - // CorrelationFilter: &armservicebus.CorrelationFilter{ - // Properties: map[string]*string{ - // "queueHint": to.Ptr("Crop"), - // }, - // }, - // FilterType: to.Ptr(armservicebus.FilterTypeCorrelationFilter), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate.json -func ExampleRulesClient_CreateOrUpdate_rulesCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{}, 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.Rule = armservicebus.Rule{ - // Name: to.Ptr("sdk-Rules-6571"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"), - // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"), - // Properties: &armservicebus.Ruleproperties{ - // Action: &armservicebus.Action{ - // }, - // FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter), - // SQLFilter: &armservicebus.SQLFilter{ - // CompatibilityLevel: to.Ptr[int32](20), - // SQLExpression: to.Ptr("1=1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate_SqlFilter.json -func ExampleRulesClient_CreateOrUpdate_rulesCreateSqlFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRulesClient().CreateOrUpdate(ctx, "resourceGroupName", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", armservicebus.Rule{ - Properties: &armservicebus.Ruleproperties{ - FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter), - SQLFilter: &armservicebus.SQLFilter{ - SQLExpression: to.Ptr("myproperty=test"), - }, - }, - }, 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.Rule = armservicebus.Rule{ - // Name: to.Ptr("sdk-Rules-6571"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"), - // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"), - // Properties: &armservicebus.Ruleproperties{ - // Action: &armservicebus.Action{ - // }, - // FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter), - // SQLFilter: &armservicebus.SQLFilter{ - // CompatibilityLevel: to.Ptr[int32](20), - // SQLExpression: to.Ptr("myproperty=test"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleDelete.json -func ExampleRulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRulesClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleGet.json -func ExampleRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRulesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-1319", "sdk-Topics-2081", "sdk-Subscriptions-8691", "sdk-Rules-6571", 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.Rule = armservicebus.Rule{ - // Name: to.Ptr("sdk-Rules-6571"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions/Rules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1319/topics/sdk-Topics-2081/subscriptions/sdk-Subscriptions-8691/rules/sdk-Rules-6571"), - // Properties: &armservicebus.Ruleproperties{ - // Action: &armservicebus.Action{ - // }, - // FilterType: to.Ptr(armservicebus.FilterTypeSQLFilter), - // SQLFilter: &armservicebus.SQLFilter{ - // CompatibilityLevel: to.Ptr[int32](20), - // SQLExpression: to.Ptr("1=1"), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/subscriptions_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/subscriptions_client_example_test.go deleted file mode 100644 index 545369ac484c..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/subscriptions_client_example_test.go +++ /dev/null @@ -1,197 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionListByTopic.json -func ExampleSubscriptionsClient_NewListByTopicPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSubscriptionsClient().NewListByTopicPager("ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", &armservicebus.SubscriptionsClientListByTopicOptions{Skip: 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.SBSubscriptionListResult = armservicebus.SBSubscriptionListResult{ - // Value: []*armservicebus.SBSubscription{ - // { - // Name: to.Ptr("sdk-Subscriptions-2178"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"), - // ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"), - // Properties: &armservicebus.SBSubscriptionProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CountDetails: &armservicebus.MessageCountDetails{ - // ActiveMessageCount: to.Ptr[int64](0), - // DeadLetterMessageCount: to.Ptr[int64](0), - // ScheduledMessageCount: to.Ptr[int64](0), - // TransferDeadLetterMessageCount: to.Ptr[int64](0), - // TransferMessageCount: to.Ptr[int64](0), - // }, - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true), - // DeadLetteringOnMessageExpiration: to.Ptr(true), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // EnableBatchedOperations: to.Ptr(true), - // ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"), - // ForwardTo: to.Ptr("sdk-Topics-3065"), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MessageCount: to.Ptr[int64](0), - // RequiresSession: to.Ptr(false), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionCreate.json -func ExampleSubscriptionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSubscriptionsClient().CreateOrUpdate(ctx, "ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", "sdk-Subscriptions-2178", armservicebus.SBSubscription{ - Properties: &armservicebus.SBSubscriptionProperties{ - EnableBatchedOperations: 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.SBSubscription = armservicebus.SBSubscription{ - // Name: to.Ptr("sdk-Subscriptions-2178"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"), - // ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"), - // Properties: &armservicebus.SBSubscriptionProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CountDetails: &armservicebus.MessageCountDetails{ - // ActiveMessageCount: to.Ptr[int64](0), - // DeadLetterMessageCount: to.Ptr[int64](0), - // ScheduledMessageCount: to.Ptr[int64](0), - // TransferDeadLetterMessageCount: to.Ptr[int64](0), - // TransferMessageCount: to.Ptr[int64](0), - // }, - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true), - // DeadLetteringOnMessageExpiration: to.Ptr(true), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // EnableBatchedOperations: to.Ptr(true), - // ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"), - // ForwardTo: to.Ptr("sdk-Topics-3065"), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MessageCount: to.Ptr[int64](0), - // RequiresSession: to.Ptr(false), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionDelete.json -func ExampleSubscriptionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSubscriptionsClient().Delete(ctx, "ResourceGroup", "sdk-Namespace-5882", "sdk-Topics-1804", "sdk-Subscriptions-3670", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionGet.json -func ExampleSubscriptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSubscriptionsClient().Get(ctx, "ResourceGroup", "sdk-Namespace-1349", "sdk-Topics-8740", "sdk-Subscriptions-2178", 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.SBSubscription = armservicebus.SBSubscription{ - // Name: to.Ptr("sdk-Subscriptions-2178"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/Subscriptions"), - // ID: to.Ptr("/subscriptions/Subscriptionid/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1349/topics/sdk-Topics-8740/subscriptions/sdk-Subscriptions-2178"), - // Properties: &armservicebus.SBSubscriptionProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CountDetails: &armservicebus.MessageCountDetails{ - // ActiveMessageCount: to.Ptr[int64](0), - // DeadLetterMessageCount: to.Ptr[int64](0), - // ScheduledMessageCount: to.Ptr[int64](0), - // TransferDeadLetterMessageCount: to.Ptr[int64](0), - // TransferMessageCount: to.Ptr[int64](0), - // }, - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // DeadLetteringOnFilterEvaluationExceptions: to.Ptr(true), - // DeadLetteringOnMessageExpiration: to.Ptr(true), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // EnableBatchedOperations: to.Ptr(true), - // ForwardDeadLetteredMessagesTo: to.Ptr("sdk-Topics-3065"), - // ForwardTo: to.Ptr("sdk-Topics-3065"), - // LockDuration: to.Ptr("PT1M"), - // MaxDeliveryCount: to.Ptr[int32](10), - // MessageCount: to.Ptr[int64](0), - // RequiresSession: to.Ptr(false), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-04T18:02:20.5992764Z"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/servicebus/armservicebus/topics_client_example_test.go b/sdk/resourcemanager/servicebus/armservicebus/topics_client_example_test.go deleted file mode 100644 index 8dd7198c7b5a..000000000000 --- a/sdk/resourcemanager/servicebus/armservicebus/topics_client_example_test.go +++ /dev/null @@ -1,356 +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 armservicebus_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/servicebus/armservicebus/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleListAll.json -func ExampleTopicsClient_NewListAuthorizationRulesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTopicsClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", 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.SBAuthorizationRuleListResult = armservicebus.SBAuthorizationRuleListResult{ - // Value: []*armservicebus.SBAuthorizationRule{ - // { - // Name: to.Ptr("sdk-AuthRules-4310"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleCreate.json -func ExampleTopicsClient_CreateOrUpdateAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", armservicebus.SBAuthorizationRule{ - Properties: &armservicebus.SBAuthorizationRuleProperties{ - Rights: []*armservicebus.AccessRights{ - to.Ptr(armservicebus.AccessRightsListen), - to.Ptr(armservicebus.AccessRightsSend)}, - }, - }, 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-4310"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleGet.json -func ExampleTopicsClient_GetAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", 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.SBAuthorizationRule = armservicebus.SBAuthorizationRule{ - // Name: to.Ptr("sdk-AuthRules-4310"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310"), - // Properties: &armservicebus.SBAuthorizationRuleProperties{ - // Rights: []*armservicebus.AccessRights{ - // to.Ptr(armservicebus.AccessRightsListen), - // to.Ptr(armservicebus.AccessRightsSend)}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleDelete.json -func ExampleTopicsClient_DeleteAuthorizationRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTopicsClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-6261", "sdk-Topics-1984", "sdk-AuthRules-4310", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleListKey.json -func ExampleTopicsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().ListKeys(ctx, "Default-ServiceBus-WestUS", "sdk-Namespace8408", "sdk-Topics2075", "sdk-Authrules5067", 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-4310"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"), - // PrimaryKey: to.Ptr("#############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"), - // SecondaryKey: to.Ptr("#############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleRegenerateKey.json -func ExampleTopicsClient_RegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().RegenerateKeys(ctx, "Default-ServiceBus-WestUS", "sdk-Namespace8408", "sdk-Topics2075", "sdk-Authrules5067", armservicebus.RegenerateAccessKeyParameters{ - KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey), - }, 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.AccessKeys = armservicebus.AccessKeys{ - // KeyName: to.Ptr("sdk-AuthRules-4310"), - // PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"), - // PrimaryKey: to.Ptr("#############################################"), - // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-6261.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-4310;SharedAccessKey=#############################################;EntityPath=sdk-Topics-1984"), - // SecondaryKey: to.Ptr("#############################################"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicListByNameSpace.json -func ExampleTopicsClient_NewListByNamespacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTopicsClient().NewListByNamespacePager("Default-ServiceBus-WestUS", "sdk-Namespace-1617", &armservicebus.TopicsClientListByNamespaceOptions{Skip: 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.SBTopicListResult = armservicebus.SBTopicListResult{ - // Value: []*armservicebus.SBTopic{ - // { - // Name: to.Ptr("sdk-topics-5488"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-topics-5488"), - // Properties: &armservicebus.SBTopicProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:31.4442694Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableBatchedOperations: to.Ptr(true), - // EnableExpress: to.Ptr(true), - // EnablePartitioning: to.Ptr(false), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](10240), - // RequiresDuplicateDetection: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // SubscriptionCount: to.Ptr[int32](0), - // SupportOrdering: to.Ptr(true), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:52:32.2092264Z"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicCreate.json -func ExampleTopicsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", armservicebus.SBTopic{ - Properties: &armservicebus.SBTopicProperties{ - EnableExpress: 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.SBTopic = armservicebus.SBTopic{ - // Name: to.Ptr("sdk-Topics-5488"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-Topics-5488"), - // Properties: &armservicebus.SBTopicProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.32Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.1Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableBatchedOperations: to.Ptr(true), - // EnableExpress: to.Ptr(true), - // EnablePartitioning: to.Ptr(false), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](10240), - // RequiresDuplicateDetection: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // SubscriptionCount: to.Ptr[int32](0), - // SupportOrdering: to.Ptr(true), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:34.32Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicDelete.json -func ExampleTopicsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTopicsClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/5e24fa8e30bff0cb321494a0b550b1c1282a8a3c/specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicGet.json -func ExampleTopicsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicebus.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopicsClient().Get(ctx, "ArunMonocle", "sdk-Namespace-1617", "sdk-Topics-5488", 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.SBTopic = armservicebus.SBTopic{ - // Name: to.Ptr("sdk-Topics-5488"), - // Type: to.Ptr("Microsoft.ServiceBus/Namespaces/Topics"), - // ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-1617/topics/sdk-Topics-5488"), - // Properties: &armservicebus.SBTopicProperties{ - // AccessedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00Z"); return t}()), - // AutoDeleteOnIdle: to.Ptr("P10675199DT2H48M5.4775807S"), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:50:31.4442694Z"); return t}()), - // DefaultMessageTimeToLive: to.Ptr("P10675199DT2H48M5.4775807S"), - // DuplicateDetectionHistoryTimeWindow: to.Ptr("PT10M"), - // EnableBatchedOperations: to.Ptr(true), - // EnableExpress: to.Ptr(true), - // EnablePartitioning: to.Ptr(false), - // MaxMessageSizeInKilobytes: to.Ptr[int64](10240), - // MaxSizeInMegabytes: to.Ptr[int32](10240), - // RequiresDuplicateDetection: to.Ptr(false), - // SizeInBytes: to.Ptr[int64](0), - // Status: to.Ptr(armservicebus.EntityStatusActive), - // SubscriptionCount: to.Ptr[int32](0), - // SupportOrdering: to.Ptr(true), - // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T20:52:32.2092264Z"); return t}()), - // }, - // } -}